You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Leonardo Battagli <ba...@sdb.it> on 2002/09/11 16:29:12 UTC

Content is not allowed

>Hi there,

While trying to print a pdf document I have this error.
the test.pdf file is a proper PDF file.

[ERROR] FOP 0.20.4
[ERROR] Logger not set
[INFO] building formatting object tree
[ERROR]: Content is not allowed in prolog.
[ERROR] Content is not allowed in prolog.
[Fatal Error] test.pdf:1:1: Content is not allowed in prolog.

My code is very simple

       options = new org.apache.fop.apps.CommandLineOptions(this.args);
       org.apache.fop.apps.Starter starter = 
(org.apache.fop.apps.Starter)options.getStarter();
       starter.run();

where args contains only the filename and the -print option

Tips?
Leonardo


Re: Content is not allowed

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Leonardo Battagli wrote:
> While trying to print a pdf document I have this error.
> the test.pdf file is a proper PDF file.
> 
> [ERROR] FOP 0.20.4
> [ERROR] Logger not set
> [INFO] building formatting object tree
> [ERROR]: Content is not allowed in prolog.
> [ERROR] Content is not allowed in prolog.
> [Fatal Error] test.pdf:1:1: Content is not allowed in prolog.

FOP is not a tool for printing PDF files. It expects as it's
input a specific XML vocabulary, XSLFO, and will format it
*into* PDF (or one of a few other formats), or format and
print it.
If you want to print PDF files, use Acrobat Reader, xpdf,
ghostscript or some other PDF related tool.

J.Pietschmann