On Wednesday 15 August 2007 08:49, Andreas L Delmelle wrote:
> On Aug 14, 2007, at 10:08, Philipp Wagner wrote:
>
> Hi
>
> > I am currently trying to convert WordML-documents to XSL-FO and
> > then PDF
> > using the wordml2fo XSL Script by RenderX and Microsoft [1]. This
> > embeds images into the FO file like that:
> >
> > <fo:external-graphic
> >  
> > src="url(&#34;data:image/auto;base64,H4sIAAAAcBZxWR==&#xA;&#34;)"/>
> >
> > (shortened, no valid base64-string any more)
> > This seems to use a URI scheme described in RFC 2397 [2].
> > FOP 0.93 doesn't seem to support this URI scheme and this way of
> > embedding images.
>
> Strange... I seem to remember that we did add support for data-URIs
> at some point.
>
> Can you post more details? What is the exact error message you
> receive?

Oh, I was drawing conclusions a bit too fast then. After a bit of 
further investigation, it turned out:
* the base64-encoded image was a gzipped wmf-file
* data URLs work fine with the supported image types (e.g. PNG)

But two things may be improved a bit:
* add a short note to 
http://xmlgraphics.apache.org/fop/0.93/graphics.html, that data urls 
are supported and are a way of embedding graphics into a fo file.

* the error message I got from fop was (shortened the base64-string, as 
it is always displayed completeley):

[EMAIL PROTECTED]:~/Documents/wordml2fo> fop test3-simple.fo -pdf test3.pdf
[Fatal Error] :1:1: Content is not allowed in prolog.
16.08.2007 09:11:10 org.apache.fop.image.analyser.XMLReader 
createDocument
WARNUNG: Error while constructing image from XML
org.xml.sax.SAXParseException: Content is not allowed in prolog.
[stacktrace skipped]
16.08.2007 09:11:10 org.apache.fop.image.ImageFactory loadImage
SCHWERWIEGEND: Error while recovering image information 
(data:image/auto;base64,H4ACC33cBZxW...bHJQmAAJ==) : null
java.lang.NullPointerException
16.08.2007 09:11:10 org.apache.fop.fo.flow.ExternalGraphic bind
SCHWERWIEGEND: Image not available: 
url("data:image/auto;base64,H4sIAAA...RIxHJRU

(SCHWERWIEGEND = FATAL)

Maybe an error message could be implemented which gives a bit more clue 
about the real problem, the unsupported image format.

Thank you for your help!

Philipp

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

Reply via email to