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 Oliver Hirschi <o....@bluewin.ch> on 2008/04/07 13:00:48 UTC
Apache FOP: Embedding PDF, EPS
Hi there again
Is there a way to embed a PDF or an EPS as a graphic using apache fop
0.94?
With PDF, I get the error "[Fatal Error] :1:1: Content is not allowed
in prolog. [WARN] No ImageReader found for file:/t:/test/2.pdf"...
With EPS, I get no error, but the graphic is not embedded...
Thanks & kind regard,
Oliver Hirschi
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Apache FOP: Embedding PDF, EPS
Posted by Oliver Hirschi <o....@bluewin.ch>.
"Peter Coppens" <pc...@gmail.com> schrieb im Newsbeitrag
news:DFD9F96B-DD30-4750-BF97-8CCCEEE72575@gmail.com...
> For pdf, checkout
> http://www.jeremias-maerki.ch/development/fop/index.html
>
I'm really confused. Due to I am using fop-0.94, I downloaded
fop-pdf-images-1.0-bin.zip, extract it and copied the two jars
"fop-pdf-images-1.0.jar" and "PDFBox-0.7.4-dev.jar" into my classpath
and I still get the same error:
------------------------------
[WARN] No ImageReader found for file:/t:/__Oli/000/2.pdf
[ERROR] No ImageReader for this type of image (t:\__Oli\000\2.pdf)
[ERROR] Image not available: t:\__Oli\000\2.pdf
------------------------------
The relevant extract of the fo is:
------------------------------
<fo:block text-align="center">
<fo:external-graphic src="t:\__Oli\000\2.pdf" content-width="100.0mm"
content-height="96.33114mm"/>
</fo:block>
------------------------------
The 2.pdf containes only one page, but I tried also with
src="t:\__Oli\000\2.pdf#page=1" without success.
In the README of the downloaded fop-pdf-images-1.0-bin.zip, I saw the
following information:
------------------------------
* This package does not work with FOP 0.93, 0.94 or any earlier
version.
You will need a later release or the code from FOP Trunk.
------------------------------
What about that? On the download page is written "Version 1.0 (for
Apache FOP 0.94)"?
Thanks in advanced,
Oliver Hirschi
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Apache FOP: Embedding PDF, EPS
Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
I'm sorry for the confusion. That was a mistake. There were changes
necessary in FOP to allow this plug-in. I've done them around the time
0.94 was released but they were done on a branch which was merged back
into Trunk only after the 0.94 release. Somehow I seem to have messed
that up when I released new versions of the plug-in. What's in the
README file is correct. The download page is wrong. I'll fix that when
I'm back home after ApacheCon. Basically, you should probably move to
0.95beta and use the latest version of the plug-in. It has a few
important bugfixes.
On 10.04.2008 10:34:42 Oliver Hirschi wrote:
> "Jeremias Maerki" <de...@jeremias-maerki.ch> schrieb im Newsbeitrag
> news:20080407150919.2990.60BA733C@jeremias-maerki.ch...
> >
> > On 07.04.2008 13:08:33 Peter Coppens wrote:
> >> For pdf, checkout
> >> http://www.jeremias-maerki.ch/development/fop/index.html
> >
> > Yep. ;-)
>
> I'm really confused. Due to I am using fop-0.94, I downloaded
> fop-pdf-images-1.0-bin.zip, extract it and copied the two jars
> "fop-pdf-images-1.0.jar" and "PDFBox-0.7.4-dev.jar" into my classpath
> and I still get the same error:
> ------------------------------
> [WARN] No ImageReader found for file:/t:/__Oli/000/2.pdf
> [ERROR] No ImageReader for this type of image (t:\__Oli\000\2.pdf)
> [ERROR] Image not available: t:\__Oli\000\2.pdf
> ------------------------------
>
> The relevant extract of the fo is:
> ------------------------------
> <fo:block text-align="center">
> <fo:external-graphic src="t:\__Oli\000\2.pdf" content-width="100.0mm"
> content-height="96.33114mm"/>
> </fo:block>
> ------------------------------
>
> The 2.pdf containes only one page, but I tried also with
> src="t:\__Oli\000\2.pdf#page=1" without success.
>
> In the README of the downloaded fop-pdf-images-1.0-bin.zip, I saw the
> following information:
> ------------------------------
> * This package does not work with FOP 0.93, 0.94 or any earlier
> version.
> You will need a later release or the code from FOP Trunk.
> ------------------------------
> What about that? On the download page is written "Version 1.0 (for
> Apache FOP 0.94)"?
>
> Thanks in advanced,
> Oliver Hirschi
>
Jeremias Maerki
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Apache FOP: Embedding PDF, EPS
Posted by Oliver Hirschi <o....@bluewin.ch>.
"Jeremias Maerki" <de...@jeremias-maerki.ch> schrieb im Newsbeitrag
news:20080407150919.2990.60BA733C@jeremias-maerki.ch...
>
> On 07.04.2008 13:08:33 Peter Coppens wrote:
>> For pdf, checkout
>> http://www.jeremias-maerki.ch/development/fop/index.html
>
> Yep. ;-)
I'm really confused. Due to I am using fop-0.94, I downloaded
fop-pdf-images-1.0-bin.zip, extract it and copied the two jars
"fop-pdf-images-1.0.jar" and "PDFBox-0.7.4-dev.jar" into my classpath
and I still get the same error:
------------------------------
[WARN] No ImageReader found for file:/t:/__Oli/000/2.pdf
[ERROR] No ImageReader for this type of image (t:\__Oli\000\2.pdf)
[ERROR] Image not available: t:\__Oli\000\2.pdf
------------------------------
The relevant extract of the fo is:
------------------------------
<fo:block text-align="center">
<fo:external-graphic src="t:\__Oli\000\2.pdf" content-width="100.0mm"
content-height="96.33114mm"/>
</fo:block>
------------------------------
The 2.pdf containes only one page, but I tried also with
src="t:\__Oli\000\2.pdf#page=1" without success.
In the README of the downloaded fop-pdf-images-1.0-bin.zip, I saw the
following information:
------------------------------
* This package does not work with FOP 0.93, 0.94 or any earlier
version.
You will need a later release or the code from FOP Trunk.
------------------------------
What about that? On the download page is written "Version 1.0 (for
Apache FOP 0.94)"?
Thanks in advanced,
Oliver Hirschi
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Apache FOP: Embedding PDF, EPS
Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
On 07.04.2008 13:08:33 Peter Coppens wrote:
> For pdf, checkout http://www.jeremias-maerki.ch/development/fop/index.html
Yep. ;-)
> For eps, you probably get "expected" behavior (but I am not sure) -
> see http://xmlgraphics.apache.org/fop/0.94/graphics.html#eps
Right. I have not reimplemented EPS support for the new image support
(i.e. FOP 0.95beta or later) by the way. As the link above indicates,
EPS support in PDF is deprecated since a few years, it's not recommended.
Since we don't have a good, nicely licensed PostScript interpreter we
cannot convert the EPS to PDF instructions. You could however, convert
the EPS to PDF externally (with GhostScript) and use the PDF with the
PDF plug-in above.
In FOP 0.94, embedding EPS in PDF works but the EPS only shows up if the
document is printed on a PostScript printer (or with GhostScript) and
the respective settings have been made in Acrobat Reader. The EPS will
never show up in Acrobat Reader because it doesn't contain a PostScript
interpreter. The EPS is embedded in the PDF as-is. It is not converted
for the reasons indicated above.
> Hth,
>
> Peter
>
> On 07 Apr 2008, at 13:00, Oliver Hirschi wrote:
> > Hi there again
> >
> > Is there a way to embed a PDF or an EPS as a graphic using apache
> > fop 0.94?
> >
> > With PDF, I get the error "[Fatal Error] :1:1: Content is not
> > allowed in prolog. [WARN] No ImageReader found for file:/t:/test/
> > 2.pdf"...
> > With EPS, I get no error, but the graphic is not embedded...
> >
> > Thanks & kind regard,
> > Oliver Hirschi
> >
Jeremias Maerki
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Apache FOP: Embedding PDF, EPS
Posted by Peter Coppens <pc...@gmail.com>.
For pdf, checkout http://www.jeremias-maerki.ch/development/fop/index.html
For eps, you probably get "expected" behavior (but I am not sure) -
see http://xmlgraphics.apache.org/fop/0.94/graphics.html#eps
Hth,
Peter
On 07 Apr 2008, at 13:00, Oliver Hirschi wrote:
> Hi there again
>
> Is there a way to embed a PDF or an EPS as a graphic using apache
> fop 0.94?
>
> With PDF, I get the error "[Fatal Error] :1:1: Content is not
> allowed in prolog. [WARN] No ImageReader found for file:/t:/test/
> 2.pdf"...
> With EPS, I get no error, but the graphic is not embedded...
>
> Thanks & kind regard,
> Oliver Hirschi
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org