Hi,
I'm trying to use FOP/Batik to embed an SVG file into a generated
PDF document. My understanding of the best way of doing this is to
use the fo:external-graphic element. However, when I do so, I get
the following error:
[ERROR] Could not load external SVG: Content is not allowed in prolog.
[ERROR] Error while creating area : No ImageReader for this type of image
(file:/home/sam/rpg/yags/habisfern/)
To me, this almost looks like it's trying to load the directory the
file is in, rather than the file itself (the above path is the
directory which all files reside in).
The XML I'm passing to FOP is as follows:
<fo:external-graphic
source-document="words.svg"
width="5cm" height="5cm"
content-width="5cm" content-height="5cm"/>
I've tried various alternatives to the source-document, including
enclosing in an url(), passing the full path etc. I have setup the
baseDir config option, though this appears to default to the working
directory anyway, so has no effect. I've tried most of the possibilities
that I've found on various Google searches.
Is anyone able to tell me what I'm doing wrong? The SVG was created
in Inkscape, and loads fine in other viewers.
I'm using FOP 0.20.5 and Batik 1.5.1. The latter is in the classpath
when I run FOP. The environment is Gentoo Linux/AMD64.
Thanks for any help.
--
Be seeing you, http://www.glendale.org.uk
Sam.
IM: [EMAIL PROTECTED] or [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]