On Feb 22, 2007, at 20:34, Ramakrishna wrote:

Hi,

I tried to print with the .fo file instead of giving the xml and xsl files but still it printed all the pages. There is slight variation in the command usage

I gave the command as
java -Dstart=2 -Dend=2 org.apache.fop.cli.Main infile.fo -print

The following command gives Exception in thread "main" java.lang.NoSuchMethodError: main
java -Dstart=2 -Dend=2 org.apache.fop.apps.Fop infile.fo -print
From this we can tell that you use FOP 0.92b or higher.
Unfortunately, it seems like this functionality was broken in the trunk code at some point. :(

I'd try looking at it myself, but am currently focusing on other parts of the code, and don't feel much for switching context ATM, so it could take a while.

In the meantime, a possible workaround for you could be to always render to PDF and print the desired pages from it with an external tool like GhostScript or pdftk. This has the benefit of the printed output matching the PDF much closer. While substantial efforts have been made to make the different renderers' outputs as close to each other as possible, this is not guaranteed to be the case for PDF and Print output (the PrintRenderer depends on Java AWT, the PDFRenderer does not; in borderline cases this could even lead to the printed result having slightly different page-breaks, although that should be very rare)

If your printer understands PS, then you could also consider that format. The basis of the PDF and PS renderers are the same.


HTH!

Cheers,

Andreas

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to