fop

Where can I find good tutorials on XSL-FO (Formating/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 the time to get my hands dirty on XSL-FO. I'm thinking of implementing something in the ...

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 Programming' from 2003 (an excellent book!), the suggestion is XML-FO (XML Formatting Objects), bu...

Returning a PDF file from a Java Bean to a JSP

EDIT: See my working code in the answers below. In brief: I have a JSP file which calls a method in a Java Bean. This method creates a PDF file and in theory, returns it to the JSP so that the user can download it. However, upon loading the PDF, Adobe Reader gives the error: File does not begin with '%PDF-'. In detail: So far, the JS...

Configuring FOP from a Cocoon sitemap

I see in the FOP docs that there's a setting in the renderer section to do the right thing with rotating pages when the paper is portrait but what you're printing should be landscape. But I can't seem to figure out how to tell Cocoon to tell FOP to use that setting. I'm guessing it should go in the section for mime-type="application/p...

Creating a PDF from Java and Displaying it in a webpage

Currently I am using FOP to generate a pdf from java code and an xslt document. The FOP spits out a PDF file that is displayed (embeded) into a webpage. The documents can range between one and several thousand pages long, and it can take some time to generate them. Is there a better tool that and do this? Is FOP the best option in the ...

Exact placement for XSL-FO

I have an item in an XML-FO page ( running through FOP ) when needs exact placement for an OCR. Whenever the page is edited (or an included page) its very difficult to get the OCR line back into place. Is it possible with FOP to specify exact placement. rather than having the item being pushed around by the previous items on the page? ...

Apache fop-0.95 error on FopFactory.newInstance() command

I am using Apache fop-0.95 to build pdf files from a JSP web application on IBM iSeries V5R4 using Websphere 6.0. Everything works perfect in my development using Websphere Development Studio client. When I put the application on the server, I get an error at this line. FopFactory fopFactory = FopFactory.newInstance(); The error ...

Problem with FOP Image scaling in Java

Okay, so here's my problem: We use FOP for creating "pretty" report output. We use the pdf option if the user wants a file, AWT for previewing, and the -print option for printing them. We are using FOP 0.25.x, which I fully recognize is not the newest version, but upgrading to 0.95 appears to be a non-trivial task that I don't necessa...

Problem using XSL to produce PDF in JAVA. No LayoutManager maker for class class org.apache.fop.fo.flow.TableAndCaption

Got a problem using XSL to produce PDF in JAVA. Always get "No LayoutManager maker for class class org.apache.fop.fo.flow.TableAndCaption". Here's the XSL source: <?xml version="1.0" encoding="Windows-1251"?> <xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" exclu...

FOP: fo:block width attribute ignored?

Hi all, I'm managing to generate a PDF with one line-chart from google-chart, but the quality of the generated columns titles doesn't fit our needs, so I want to generate by myself. This task should be done using [fo:table] but I'm not able to positionate succesfully the titles (widths and margins/paddings). In sum up, I want to put t...

What is the sense of "Feature Oriented Programming" (FOP) in C++, and would it make sense in Java and C#?

Hello! Sadly, I can't remember where I read it, but... ...in C++ you can derive a class from a template parameter. Im pretty sure it was called Feature Oriented Programming (FOP) and meant to be somehow useful. It was something like: template <class T> class my_class : T { // some very useful stuff goes here ;) } My questions abo...

NFOP performance problem

We're using NFOP in a project (C#, ASP.NET 2.0) to ultimately return PDF files to the user. The process currently goes like this: Stored Procedure -> XML XML -> XSLT -> XSL-FO XSL-FO -> NFOP -> PDF This works fine, the PDF is generated BEAUTIFULLY. The problem is that it takes 300+ seconds to do it. The ANTS profiler indicates tha...

Embedding fonts

I'm using Apache FOP with an XML document, and I'm trying to render a pdf. I have to embed a font into the resultant pdf file because it has to use international characters. Does anyone know how to do this? ...

XSL:FO, Floats in F.O.P.

A while ago I found out that FOP doesn't allow you to use floats, and a few other features in Xsl-Fo 1.0. I've tried a few different ways to emulate them, but I have had no success. If anyone has had success in this, or has an idea. I would really appreciate enlightenment. ...

Need instream-foreign-object and text to both align to the bottom in XSL-FO

I have an XSL-FO stylesheet that is used for generating a barcode with a piece of description text immediately after it. When I run it through the Ibex FO application, the text properly lines up with the bottom of the barcode. When I run it through Apache FOP (it's an older version 0.3x... I CAN'T change this), the text lines up with t...

Processing FOP with parameters

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> .... ...

Apache FOP: Displaying UTF-8 Characters in PDF (without embed?)

Hi, I'm trying to use FOP to export a PDF with UTF-8 characters, preferably without needing to embed the font. The following code: <fo:block font="10pt Helvetica" text-align="justify" space-after="10pt" space-before="8pt" keep-with-previous="auto" keep-together.within-page="auto"> <fo:block font-weight="bold" color="gray">Summary</fo...

Add non destructive Bleeds to pdf programmatically

Hi, I've working on something at the moment and we've created a pdf output using FOP which is working fine. Now however the printhouse wants to have bleeds all around the pdf. Is it possible to resize the existing pdf and add the bleeds in a non destructive manner programmatically via a .net or java api (preferrably .net)? Although FOP...

Using FOP to generate french PDF document, having problem with œ character.

I am using iso-8859-15 encoding both in xml data and in the xslt style sheet. But when I try convert XML doc to FO document 'œ' does'nt show up it shows up as '?' Below is the example of the problem I am facing. The xml data is as follows: Nous sommes sous l'emprise du Divin cœur de Celui que mon fils vénère par-dessus in the fo fil...

Invoking Apache-FOP from C++

Hi, Has anyone experience or had problems implementing a JNI wrapper for apache FOP? Bonus points: Any other options for processing xsl-fo from C++? ...