Questions tagged [apache-fop]

Apache FOP is a document rendering engine that implements the W3C XSL-FO 1.1 Specification.

1304 questions
50
votes
6 answers

PDF Generation Library for Java

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…
Stefan Haberl
  • 9,812
  • 7
  • 72
  • 81
44
votes
7 answers

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

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…
topchef
  • 19,091
  • 9
  • 63
  • 102
31
votes
2 answers

Scale down to fit an image in FOP

I am using FOP version 1.0 to create PDFs. In one of the pages I'd like to display an image (2552 x 4200 pixel) and scale it down if it doesn't fully fit on the page. As far as I could see on the mailing list the recommended way of doing this would…
Benjamin Muschko
  • 32,442
  • 9
  • 61
  • 82
27
votes
3 answers

Convert a string to XML input stream in java

I'm trying to generate a PDF document using FOP and Java. I receive the XML as a string and not as a file. How can I convert this XML string to an XML input stream so that I can call xslfoTransformer.transform(source, res); where source is my XML…
jobinbasani
  • 2,075
  • 6
  • 47
  • 66
24
votes
13 answers

What is the recommended toolchain for formatting XML DocBook?

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…
Jonathan Leffler
  • 730,956
  • 141
  • 904
  • 1,278
21
votes
2 answers

VerifyError on Tomcat 7 production server probably caused by Apache Commons Logging 1.0.4

I'm developing webapp on Tomcat 7. Everything works fine on my local version of Tomcat, but when I deploy it on production server, it throws this exception. java.lang.VerifyError: (class: org/apache/commons/logging/impl/Log4JLogger, method: fatal…
Přemysl Šťastný
  • 1,676
  • 2
  • 18
  • 39
20
votes
4 answers

Resolving relative paths when loading XSLT files

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 =…
Javi
  • 19,387
  • 30
  • 102
  • 135
16
votes
3 answers

How to insert a white space between two (inline) elements?

Context I am creating an XSL-FO document to convert my XML text to PDF. In the XSL-FO, I have two consecutive inline elements, I would like a white space between them: The…
Adrian Maire
  • 14,354
  • 9
  • 45
  • 85
16
votes
1 answer

How to display fixed image height and width using xsl-fo with apache fop 0.95

I am trying to fix the height and width of image in pdf generated using fop 0.95. Here is the code used for it Following also does not work
Thunder
  • 10,366
  • 25
  • 84
  • 114
15
votes
1 answer

How can I display a Unicode character using Apache fop? Showing "?" instead of character.

I been trying to insert a Unicode character ∇ or ▽, so it shows in the PDF generated by Apache FOP. This is what I did so far: First you have to know the correct Unicode codepoint to represent the character according to this basic help Apache…
Juan Marcos
  • 153
  • 1
  • 5
15
votes
4 answers

How to embed font in PDF created from HTML with iText and Flying Saucer?

I have problem with embedding Polish fonts into PDF converted from HTML. My HTML code have style in body: I tried 2 ways of converting such HTML into PDF: FOP with…
Michał Niklas
  • 53,067
  • 18
  • 70
  • 114
14
votes
1 answer

Inline image data in XSL:FO / Apache FOP

I have MIME Multi-Part data that I want to convert to PDF using XSL:FO. I'm comfortable reading MIME using Apache James and I have a grasp on embedded image data in Mime or inline images in HTML. I diligently searched SO for "[xsl-fo] inline…
stwissel
  • 20,110
  • 6
  • 54
  • 101
13
votes
2 answers

PDFBox setting A5 page size

Started playing with PDFBox PDDocument document = new PDDocument(); PDPage page = new PDPage(); document.addPage( page ); PDFont font = PDType1Font.HELVETICA_BOLD; PDPageContentStream contentStream = new PDPageContentStream(document,…
emeraldjava
  • 10,894
  • 26
  • 97
  • 170
13
votes
3 answers

XSL-FO dynamic table column width

As it stands now, I have about 12 columns and all of them are exactly the same width. The problem is that some columns don't require that much space. How do I get the columns to fit their content? The columns need to be a dynamic width. I've…
SeanWM
  • 16,789
  • 7
  • 51
  • 83
13
votes
8 answers

Where can I find good tutorials on XSL-FO (Formatting/ed Objects), the stuff one feeds to fop and get PDF's?

On a company that I've worked, me and my colleagues, implemented a tailored document distribution system on top of XSL-FO. My task was to get the script to deliver the documents and configure the CUPS print server and the Fax server, so I never had…
Gustavo Carreno
  • 9,499
  • 13
  • 45
  • 76
1
2 3
86 87