首页 \ 问答 \ Whtmltopdf pdf生成(Whtmltopdf pdf generation)

Whtmltopdf pdf生成(Whtmltopdf pdf generation)

我们正在使用wkhtml2pdf生成pdf它正常工作垂直方向现在我的客户需要垂直方向,请提供图像,以便我可以轻松理解。 在此处输入图像描述


We are using wkhtml2pdf for generating pdf it working fine for vertical orientation now my client required vertical orientation please reffer image so I can understand easily.enter image description here


原文:https://stackoverflow.com/questions/36791885
更新时间:2023-09-26 08:09

最满意答案

这是适合我的配置。 看看它是否对你有所帮助。

<plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>${version.plugin.maven.surefire}</version>
            <configuration>
                <failIfNoTests>false</failIfNoTests>
                <excludedGroups>org.jboss.arquillian.junit.Arquillian</excludedGroups>
            </configuration>
        </plugin>

        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-failsafe-plugin</artifactId>
            <version>${version.plugin.maven.failsafe}</version>
            <configuration>
                <groups>org.jboss.arquillian.junit.Arquillian</groups>
                <testFailureIgnore>false</testFailureIgnore>
                <systemPropertyVariables>
                    <arquillian.launch>jbossas-remote-7</arquillian.launch>
                </systemPropertyVariables>
            </configuration>
            <executions>
                <execution>
                    <goals>
                        <goal>integration-test</goal>
                        <goal>verify</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>

        <plugin>
            <groupId>org.jacoco</groupId>
            <artifactId>jacoco-maven-plugin</artifactId>
            <version>${jacoco-plugin.version}</version>
            <configuration>
                <includes>
                </includes>
                <excludes>
                    <exclude>.....</exclude>
                </excludes>
            </configuration>
            <executions>
                <execution>
                    <id>default-prepare-agent</id>
                    <goals>
                        <goal>prepare-agent</goal>
                    </goals>
                </execution>
                <execution>
                    <id>default-prepare-agent-integration</id>
                    <goals>
                        <goal>prepare-agent-integration</goal>
                    </goals>
                    <configuration>
                        <destFile>${project.build.directory}/jacoco-it.exec</destFile>
                    </configuration>
                </execution>
                <execution>
                    <id>Create Unit Test Report</id>
                    <phase>prepare-package</phase>
                    <goals>
                        <goal>report</goal>
                    </goals>
                </execution>
                <execution>
                    <id>Create Integration Test Report</id>
                    <goals>
                        <goal>report-integration</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>

This is the configuration that works for me. See if it helps you.

<plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>${version.plugin.maven.surefire}</version>
            <configuration>
                <failIfNoTests>false</failIfNoTests>
                <excludedGroups>org.jboss.arquillian.junit.Arquillian</excludedGroups>
            </configuration>
        </plugin>

        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-failsafe-plugin</artifactId>
            <version>${version.plugin.maven.failsafe}</version>
            <configuration>
                <groups>org.jboss.arquillian.junit.Arquillian</groups>
                <testFailureIgnore>false</testFailureIgnore>
                <systemPropertyVariables>
                    <arquillian.launch>jbossas-remote-7</arquillian.launch>
                </systemPropertyVariables>
            </configuration>
            <executions>
                <execution>
                    <goals>
                        <goal>integration-test</goal>
                        <goal>verify</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>

        <plugin>
            <groupId>org.jacoco</groupId>
            <artifactId>jacoco-maven-plugin</artifactId>
            <version>${jacoco-plugin.version}</version>
            <configuration>
                <includes>
                </includes>
                <excludes>
                    <exclude>.....</exclude>
                </excludes>
            </configuration>
            <executions>
                <execution>
                    <id>default-prepare-agent</id>
                    <goals>
                        <goal>prepare-agent</goal>
                    </goals>
                </execution>
                <execution>
                    <id>default-prepare-agent-integration</id>
                    <goals>
                        <goal>prepare-agent-integration</goal>
                    </goals>
                    <configuration>
                        <destFile>${project.build.directory}/jacoco-it.exec</destFile>
                    </configuration>
                </execution>
                <execution>
                    <id>Create Unit Test Report</id>
                    <phase>prepare-package</phase>
                    <goals>
                        <goal>report</goal>
                    </goals>
                </execution>
                <execution>
                    <id>Create Integration Test Report</id>
                    <goals>
                        <goal>report-integration</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>

相关问答

更多
  • 以下是我想到的: protected String doLoginPost(String url, String username, String password) throws Exception { HttpClient client = new DefaultHttpClient(); HttpPost post = new HttpPost(url); List urlParameters = new ArrayList
  • 尽管我的大部分代码是实现一切功能的良好垫脚石,但我缺少触发嵌入式测试的两个关键组件,开始测试的正确注释以及等待jms的正确方法。 @Test @OperateOnDeployment("my-service") public void testMessageInTopic() throws Exception { // insert the message into the topic final TextMessage message = (TextMessage) consumer.re ...
  • 是。 您可以通过TestNG中的依赖关系链来对测试方法进行排序。 它会像下面的那样 @Test public void test1() { // test something (1) } @Test(dependsOnMethods = { "test1" }) public void test2() { // test something (2) } 请参阅以下内容以获取更多信息 http://www.tutorialspoint.com/testng/testng_dependency_test.h ...
  • 这是适合我的配置。 看看它是否对你有所帮助。 org.apache.maven.plugins maven-surefire-plugin ${version.plugin.maven.surefire} < ...
  • 令人遗憾的是,测试套件尚未得到支持,但它们正在路线图上 。 Sadly test suites are not yet supported, but they are on the roadmap.
  • 不会.Arquillian测试会将其自定义ear / war部署到jboss并执行测试用例。 No. Arquillian tests will deploy its custom ear/war to jboss and execute test cases.
  • public class AccountRestIT与public class AccountEntityFacadeTest surefire-maven-plugin无法识别以*IT结尾的测试。 您应该将其名称更改为*Test或使用其他技术。 参考看这个答案。 public class AccountRestIT vs. public class AccountEntityFacadeTest surefire-maven-plugin does not recognize tests that end ...
  • 不会为Arquillian测试中使用的测试类实例调用@PostConstruct 。 虽然Arquillian对测试类实例的注入点执行非上下文CDI注入,但它不负责构造实例本身(JUnit或TestNG执行此操作),也不构造由CDI容器管理的测试类实例或任何其他服务容器(这解释了为什么忽略@PostConstruct )。 你最好的选择是使用@Before 。 尽管如此,您确实提出了一个好处,并且可能值得研究JUnit和TestNG运行程序是否提供挂钩,以便CDI或其他DI提供程序可以管理或挂钩测试实例生命 ...
  • 在某种程度上,这取决于您的Maven设置的详细信息,这些不在您的问题中。 这是一些一般性的建议。 1)你应该在哪里放置arquillian-jacoco和jacoco依赖项? 这些依赖关系可能应该放在Arquillian其余依赖关系的任何地方。 我的理解是它只是让这些依赖项触发Arquillian使用JaCoCo,而不是插件声明; 即使这些依赖关系在POM的父级中并且具有实际的Arquillian测试,Arquillian测试类仍应进行检测。 您不会将这些依赖项放在兄弟模块中与测试模块,因为它们需要由集成测 ...
  • 由于已经有Maven支持和结构,因此您可以使用Maven属性并替换占位符值。 很简单 我猜你的Arquillian.xml是在src / test / resources / arquillian.xml下吗? 然后,您可以使用属性替换绝对值。 ${jboss.home} 上面的属性可以在你的pom的属性部分中定义,也可以在mvn executuon中使用 ...

相关文章

更多

最新问答

更多
  • 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
  • 如何通过引用返回对象?(How is returning an object by reference possible?)
  • 矩阵如何存储在内存中?(How are matrices stored in memory?)
  • 每个请求的Java新会话?(Java New Session For Each Request?)
  • css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
  • 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
  • xcode语法颜色编码解释?(xcode syntax color coding explained?)
  • 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
  • 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
  • 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
  • 西安哪有PLC可控制编程的培训
  • 在Entity Framework中选择基类(Select base class in Entity Framework)
  • 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
  • 电脑二级VF有什么用
  • Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
  • 金华英语角.
  • 手机软件如何制作
  • 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
  • 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
  • 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
  • Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
  • 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
  • python的访问器方法有哪些
  • DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
  • 在Ruby中对组合进行排序(Sorting a combination in Ruby)
  • 网站开发的流程?
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。