apache-fop

XSLT Generate Dynamic Rows and Columns for Apache FOP

北城余情 提交于 2019-12-08 07:28:40
问题 For the following xml file, i need to generate an xsl-fo file to be converted into pdf. I am new to style sheets and struggling to create dynamic table. Please help. Also, the width for each column varies,based on the column.How would i include this into the code? The Column Headers and Column Values are dynamically populated in the xml file. Below is a sample. Can anybody please help in generating xsl-fo or xslt code? <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <ReportData>

apache fop fails to generate pdf with latest jre update (java 8 update 73)

孤人 提交于 2019-12-08 07:09:10
问题 With Java 7 update xx, pdf was generated in my asp.net application. When I updated the Java version to latest , ie Java 8 Update 73 , its fails to generate pdf. No idea on whats the issue. Tried other updates of Jre 8 , always fails, but works with jre 7 update xx 回答1: Baji, while yo're doing things differently, e.g. ASP.Net and IIS instead of tomcat but still using Java 8 this article seems to indicate he got it working with Java 8 and Tomcat. I know it doesnt answer your question 100%, but

Use XSL:FO to add attachments to PDF

孤街浪徒 提交于 2019-12-08 01:28:18
问题 After resolving inline images with help from SO, I need to sort out inline attachments. PDF can contain attachments and I found:fo:declarations - pdf:embedded-file but again it pointed to an external file. How can I attach a file that is part of a MIME message (most likely BASe64)? 回答1: In the latest FOP builds, you can use the same syntax for pdf:embedded-file as for fo:external-graphic and directly append the base64 data: <fo:declarations> <pdf:embedded-file filename="myfile.pdf" src="data

How to use `xsl:include` with apache fop

…衆ロ難τιáo~ 提交于 2019-12-08 00:21:28
问题 I use apache FOP to generate pdf files. I have this xsl code <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format"> <xsl:output method="xml" indent="yes" /> <xsl:template match="/"> <fo:root font-size="11pt" font-family="serif"> <fo:layout-master-set> <fo:simple-page-master master-name="A4-portrait" page-height="29.7cm" page-width="21.0cm" margin-top="1cm" margin-left="1.5cm" margin-right="1cm" margin-bottom="1cm"> <fo

Polish special letters not available while using Apache FOP

谁说我不能喝 提交于 2019-12-07 23:56:07
问题 I've been struggling a lot with generating a PDF using FOP, with Polish letters. I have been reading a lot of posts here on SO but so far no success! Here is my Template: <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl"> <xsl:template match="root"> <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"> <fo:layout-master-set> <fo:simple-page-master

Processing FOP with parameters

旧时模样 提交于 2019-12-07 22:43:09
问题 HI, I want to use FOP to prepare a XML document for printing (ps/pdf). Is it possible to send parameters to FOP to do conditional formating as exist in xsl processors XSL: <xsl:param name="isDuplicate">no</xsl:param> .... <xsl:if test="$isDuplicate='yes'"> <h2 align="center">Copy</h2> </xsl:if> .... 回答1: If you're using the fop batch/shell file that comes with the distribution, you can use the --param argument to fop, as documented on the Fop page -param name value <value> to use for

How to manipulate page number in FOP?

匆匆过客 提交于 2019-12-07 15:48:54
问题 I am using Apache FOP 0.95, and all I want to do is add 1 to the current page number. So, on page 12, I want to show 12 / 13. Then nothing on page 13, of course. Any ideas how I could do this, perhaps by manipulating <fo:page-number /> ? Thanks y'all! 回答1: Short answer for this is that you can't achieve the result you after with straight FO. This is because you can't programatically access the page-numbers until FOP has assigned them, so your XSLT doesn't know what they are. You can get round

Apache Batik Transcoder inside Docker Container Blocking

断了今生、忘了曾经 提交于 2019-12-07 12:46:29
问题 We're running a Spring application within a docker container. Our application can take SVG files and transform them into PDF format to be embedded within a PDF. The application works correctly on osx and transcodes as expected. However when run from inside a docker container, which has a different file system, the transcoder gets stuck and thrashes the cpu in some bizarre recursive file searching loop. java.lang.Thread.State: RUNNABLE at java.io.UnixFileSystem.getBooleanAttributes0(Native

Remove verso and list of tables from DocBook document

狂风中的少年 提交于 2019-12-07 04:37:31
问题 I have problem with customization layer of DocBook XSL. I use Apache FOP to transform document from DocBook XML to PDF. But the book contains second page (so called verso ) and page List of Tables . I just have erased the content of verso, but second page remains empty now. I don't now how to remove second empty page. (I have found one solution only. It is easy - just add <xsl:template name="book.titlepage.verso"/> to your templates, but after this element has been added, second page remains

xls-fo fop 0.94 Using the keep-together with wrap-option=“wrap”

China☆狼群 提交于 2019-12-07 00:51:48
问题 In xls-fo fop 0.94 Using the keep-together along with with wrap-option="wrap" ignores the wrap option ? Is there a way to make them both work? <fo:table-row border="1pt solid black" keep-together="always"> <fo:table-cell> <fo:block overflow="scroll" wrap-option="wrap"> This is a long text It is desired that this text be wrapped in the table cell but just can not make it happen! </fo:block> </fo:table-cell> </fo:table-row> 回答1: keep-together="always" implicitely sets keep-together.within-line=