apache-fop

Xslt - iterate nodes in chunks

只谈情不闲聊 提交于 2019-12-20 04:13:15
问题 I have an existing xslt script which creates a PDF with FOP, problem is that its running out of memory when doing apply-template on a specific nodetype when the node count exceeds a certain limit. In order to fix the memory issue I need to break up the result derived from that template call into several <fo:page-sequence> , but I dont want a page-sequence for each node, more like for each 100 node. My first thought was to use position() and simply add new sequence tags every 100th, but as

Fop exception when FopFactory.newInstance()

浪尽此生 提交于 2019-12-19 10:15:08
问题 i'm using struts 2 and i'm trying to use fop to create a pdf file from xml and xsl. I develop my code in base this two url http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/examples/embedding/java/embedding/ExampleXML2PDF.java?view=markup and http://justcode.wordpress.com/2009/01/16/generare-pdf-con-struts2-fop-xml-e-xslt/ here's my code, i'm trying using two different ways public class JspToPdfTest extends ActionSupport{ private InputStream inputStream; private Xml2PdfManager xml2PdfManager

Embedding Font into Apache FOP

六月ゝ 毕业季﹏ 提交于 2019-12-18 12:38:58
问题 I am tring to get Apache FOP to use Arial as font. So far, without luck. In my config.xml it says: <fonts> <font kerning="yes" embed-url="file:///C:/Windows/Fonts/Arial.ttf" encoding-mode="auto">> <font-triplet name="Arial" style="normal" weight="normal"/> </font> </fonts> But it doesnt seem to work. When I start FOP on the command line it says font Arial normal not found. I have tried to generate the Arial.xml file from the ttf with TTFReader in FOP but that, too, hasnt worked (even

How can I sum up some values per page in a table in XSL-FO?

让人想犯罪 __ 提交于 2019-12-18 07:25:46
问题 I'm using XSL-FO to generate an account statement print out. The PDF is actually just a simple table with a simple header on every page. The difficulty is that I have to display transaction volumes per page, e.g. Page 1 +------------------------------+-----------+-----------+---------------------+ | Text | Credit | Debit | Balance | +------------------------------+-----------+-----------+---------------------+ | Previous month | | | (*1) 1000 | | abc | 1000 | | 2000 | | abc | | 500 | 1500 | |

How can I sum up some values per page in a table in XSL-FO?

限于喜欢 提交于 2019-12-18 07:25:12
问题 I'm using XSL-FO to generate an account statement print out. The PDF is actually just a simple table with a simple header on every page. The difficulty is that I have to display transaction volumes per page, e.g. Page 1 +------------------------------+-----------+-----------+---------------------+ | Text | Credit | Debit | Balance | +------------------------------+-----------+-----------+---------------------+ | Previous month | | | (*1) 1000 | | abc | 1000 | | 2000 | | abc | | 500 | 1500 | |

Compare these products for PDF generation with Java given requirements inside: iText, Apache PDFBox or FOP? [closed]

余生长醉 提交于 2019-12-17 22:30:10
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 3 years ago . There were questions on that but not recently and technology must have gone ahead since then. Requirements: generating pdf documents based on predefined template (I can use either pdf forms or xsl-fo) being able to fill textual data being able to fill graphical data (generated bar codes) being able to alter pdf

FOP for Android?

谁说我不能喝 提交于 2019-12-17 21:01:29
问题 I recently compiled an Android app using FOP as I want to convert some XML into a PDF file. However I don't think the FOP JAR files are mean't to work on Android. Are there any versions of FOP available for Android? Or any other XML to PDF converter I could use within my app instead of connecting to a FOP enabled server on the Internet? I've tried including fop.jar and the xmlgraphics.jar but even with those added to my project, the call to FopFactory.newInstance() fails. Here's my code

Does FOP 2.1 support ViewerPreferences?

北慕城南 提交于 2019-12-17 20:52:40
问题 I'm using FOP 2.1 and am trying to set ViewerPreferences, e.g. DisplayDocTitle -> true. I'm trying (from this question <fo:declarations> <pdf:dictionary type="Catalog" xmlns:pdf="http://xmlgraphics.apache/org/fop/extensions/pdf"> <pdf:dictionary type="normal" key="ViewerPreferences"> <pdf:entry key="DisplayDocTitle" type="boolean">true</pdf:entry> </pdf:dictionary> </pdf:dictionary> <x:xmpmeta xmlns:x="adobe:ns:meta/"> ... but getting Jul 13, 2016 11:18:31 AM org.apache.fop.events

Wrap within table-cell with long word in FOP

倾然丶 夕夏残阳落幕 提交于 2019-12-17 19:09:16
问题 I have a table in FOP and it is working nicely until I get a very long word. The word then overwrites the cell ending in the table. I tried the wrap-option="wrap" within the table-cell and/or the block of the cell but it doesn't work **Total Edit** since I guess it is to complicated to just show bits here is the complete xsl file: <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format"

How to show correctly tabulation in xsl-fo?

痴心易碎 提交于 2019-12-13 16:22:28
问题 I have an XML document and I am creating an XSL-FO file to convert it to pdf with apache-fop. In the xml, there are sections <code> to show... code. In the xsl-fo, I added the white-space="pre" sentence to preserve the code format, but tabulations are shown like single space: XML section: <code><![CDATA[ function callback( widget ) { var ui = widget; // It should be a tab } ]]></code> XSL-FO section: <xsl:template match="code"> <fo:block font-size="10pt" font-family="monospace" white-space=