xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremias Maerki <...@jeremias-maerki.ch>
Subject Re: generating data url external-graphic in PDF
Date Tue, 07 Feb 2006 19:31:36 GMT
The error message is misleading in this case. I assume that FOP thinks
you've specified a filename since it hasn't found support for the "data"
protocol. So, it really looks like the protocol handler isn't properly
registered. Have you looked at the system property yet from inside your

"no base URL is specified" means that you didn't specify a URL that is
used when you specify relative URLs/filenames. If you specify the base
URL as "file:///C:/Temp/" then a URL "test/image.gif" will ultimately
point to "file:///C:/Temp/test/image.gif".

On 07.02.2006 18:12:04 Edward McMasters wrote:
> Thank you for the quick response.  I (did a quick study of logging and) outputted my
log and this is what I saw:
>   [ERROR] Error while creating area : Error with image URL: data:image\gif;base64,R0lGODdhMAAwAPAAAAAAAP\ywAAAAAMAAwAAAC8IyPqcvt3wCcDkiLc7C0qwyGHhSWpjQu5yqmCYsapyuvUUlvONmOZtfzgFzByTB10QgxOR0TqBQejhRNzOfkVJ+5YiUqrXF5Y5lKh\DeuNcP5yLWGsEbtLiOSpa\TPg7JpJHxyendzWTBfX0cxOnKPjgBzi4diinWGdkF8kjdfnycQZXZeYGejmJlZeGl9i2icVqaNVailT6F5iJ90m6mvuTS4OK05M0vDk0Q4XUtwvKOzrcd3iq9uisF81M1OIcR7lEewwcLp7tuNNkM3uNna3F2JQFo97Vriy\Xl4\f1cf5VWzXyym7PHhhx4dbgYKAAA7
(The filename or extension is too long) and no base URL is specified
>   Is there a property that I can set to define how long a filename can be?  This one
does not seem very long.  Is a more appropriate question, "What is meant by 'no base URL is
>   Thanks.
>   Edward
>   > Jeremias Maerki <dev@jeremias-maerki.ch> wrote:
> > Interesting would be to know what the FOP log output looks like. Without
> > being able to see into your environment I'd say you did everything right
> > but I can't be sure. I just verified the solution on my machine:
> > Extracted the two classes from the ZIP into the FOP sources, recompiled
> > FOP and added "-Djava.protocol.handler.pkgs=org.apache.fop.util.protocols"
> > to the command-line. It worked. Try reading the java.protocol.handler.pkgs
> > property at run-time and check that the right value is set. Maybe
> > someone else overwrites the system property. Good luck.
> > 
> > On 07.02.2006 14:46:40 Edward McMasters wrote:
> > > I have an application that needs to generate images in a PDF using a
> > > base64 string using the > src="url('data:image/gif;base64,R0lG . . . format
in my XSL stylesheet. 
> > > I have tried to use the technique referenced in this forum at
> > > (http://marc.theaimsgroup.com/?l=fop-user&m=110875657902117&w=2) of
> > > setting the java.protocol.handler.pkgs property to
> > > "org.apache.fop.util.protocols" and adding in the classes Handler and
> > > RFC2397URLConnection to the package org.apache.fop.util.protocols.data
> > > but when I generate my PDF the image does not get created and (based on
> > > System.out.println) the classes in org.apache.fop.util.protocols.data do
> > > not get used.
> > > 
> > > I think that I must be missing something in my implementation. Note
> > > that as a test I overwrote other classes in org.apache.fop (eg.
> > > org.apache.fop.apps.Driver) and these classes did get referenced. I was
> > > also able to use my XSL in another application that I tried to copy
> > > (that another developer wrote using the same technique above) to
> > > generate the image and my application has not trouble generating images
> > > using src=file.
> > > 
> > > I am using FOP version 0.20.5, as is the application I tried to clone. 
> > > Guessing that perhaps fop or another library (batik, etc) was out of
> > > sync, I copied all of the libraries that the other, working, application
> > > was using and still no success.

Jeremias Maerki

To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org

View raw message