apache-fop

FOP for Android?

我怕爱的太早我们不能终老 提交于 2019-11-28 13:26:15
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 snippet for the button click that calls FOP: // Add button listener btnCreatePDF.setOnClickListener(new

FO to PDF/a Conversion with Apache FOP Java Library

妖精的绣舞 提交于 2019-11-28 10:23:38
问题 I'm trying to convert .fo files to PDF/a with Apache FOP 2.1 with the exemple code given in the documentation. I managed to convert the helloworld.fo file into PDF but, when I tried to convert it into PDF/a file I get this error: org.apache.fop.pdf.PDFConformanceException: For PDF/A-1a, all fonts, even the base 14 fonts, have to be embedded! Offending font: /Helvetica That's why I tried to embedded fonts in the fop.xconf file: <fonts> <font kerning="yes" embed-url="C:/Users/thinkpad/workspace

What is the recommended toolchain for formatting XML DocBook? [closed]

安稳与你 提交于 2019-11-28 03:24:15
I've seen Best tools for working with DocBook XML documents , but my question is slightly different. Which is the currently recommended formatting toolchain - as opposed to editing tool - for XML DocBook? In Eric Raymond's 'The Art of Unix Programming' from 2003 (an excellent book!), the suggestion is XML-FO (XML Formatting Objects), but I've since seen suggestions here that indicated that XML-FO is no longer under development (though I can no longer find that question on StackOverflow, so maybe it was erroneous). Assume I'm primarily interested in Unix/Linux (including MacOS X), but I wouldn

XSL-FO fop. Long text flows into adjacent cells/block, obscuring stuff there

匆匆过客 提交于 2019-11-28 02:56:34
问题 Could anyone suggest me a way to make long words (like serial numbers) to be wrapped? I tried some commercial software and there is no such issue. Is it a fop bug or probably there is a solution available? I can't insert zero length space after each character of every word in document. This solution sounds insane for me. 回答1: You can specify the wrap-option attribute in your fo:block like so: <fo:block wrap-option="wrap"> ... stuff </fo:block> Here's the XSL-FO specification for this

Apache FOP in a Java Applet - No ImagePreloader found for data

不羁岁月 提交于 2019-11-28 00:32:48
I'm looking at an issue in a mature commercial product. In a nutshell, we are using part of the Apache POI library to read in a Word .DOC or .DOCX file, and convert it into XSL-FO so that we can do token replacements. We then use FOP – embedded into the Java program - to convert the FO data into a PDF for printing. The catch is, all this is being done on the client inside a Java applet running inside Internet Explorer. Originally we were using FOP 0.93, which worked reasonably well. However, it was not able to utilise the fonts inside the DOC file when generating the PDF and would map

Resolving relative paths when loading XSLT files

霸气de小男生 提交于 2019-11-27 22:56:55
I need to do an XSL transformation using Apache FOP and I had code like this: //Setup FOP Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF, out); //Setup Transformer Source xsltSrc = new StreamSource(new File(xslPath)); Transformer transformer = tFactory.newTransformer(xsltSrc); //Make sure the XSL transformation's result is piped through to FOP Result res = new SAXResult(fop.getDefaultHandler()); //Setup input Source src = new StreamSource(new File(xmlPath)); //Start the transformation and rendering process transformer.transform(src, res); where xslPath is the path where my XSLT file is

PDF Generation Library for Java [closed]

我只是一个虾纸丫 提交于 2019-11-27 06:33:43
I know this has been asked before, but I'm still undecided on which PDF generation framework to use for my current project. My requirements on-the-fly generation of PDF documents (mainly order forms, invoices) Java based easy to layout should be open source easy to change layout A lot of people seem to use iText , but I have some concerns (apart from the changed licence) regarding separation of concerns: In an HTML context there's good MVC support, where I usually stick to Spring MVC and FreeMarker to separate logic and layout. I'm a little bit worried that with iText you end up mixing code

What is the recommended toolchain for formatting XML DocBook? [closed]

偶尔善良 提交于 2019-11-27 00:02:27
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 2 years ago . I've seen Best tools for working with DocBook XML documents, but my question is slightly different. Which is the currently recommended formatting toolchain - as opposed to editing tool - for XML DocBook? In Eric Raymond's 'The Art of Unix Programming' from 2003 (an excellent book!

Apache FOP in a Java Applet - No ImagePreloader found for data

試著忘記壹切 提交于 2019-11-26 21:43:43
问题 I'm looking at an issue in a mature commercial product. In a nutshell, we are using part of the Apache POI library to read in a Word .DOC or .DOCX file, and convert it into XSL-FO so that we can do token replacements. We then use FOP – embedded into the Java program - to convert the FO data into a PDF for printing. The catch is, all this is being done on the client inside a Java applet running inside Internet Explorer. Originally we were using FOP 0.93, which worked reasonably well. However,

PDF Generation Library for Java [closed]

岁酱吖の 提交于 2019-11-26 12:04:07
问题 I know this has been asked before, but I\'m still undecided on which PDF generation framework to use for my current project. My requirements on-the-fly generation of PDF documents (mainly order forms, invoices) Java based easy to layout should be open source easy to change layout A lot of people seem to use iText , but I have some concerns (apart from the changed licence) regarding separation of concerns: In an HTML context there\'s good MVC support, where I usually stick to Spring MVC and