You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by Ullric OGER <og...@mapsys.fr> on 2004/05/25 12:16:14 UTC
generated svg in pdf
Subject : Generated SVG in PDF
Hi,
I'm a new forrest user with a little problem with PDF generation.
I read the faq about image in pdf but there is nothing about generated
image.
I need for my project to generate an image from an xml file.
So I've written a cocoon pipeline to do that thing :
xml file -> xslt transform -> svg file -> svg2jpg -> jpg file
And it works fine for html viewing.
But no image in PDF.
Look at document2fo.xsl to learn that FOP search the jpg in
'resources/images/' which naturally don't contains it.
The matter is the jpeg image doesn't exist until forrest has processed it.
is there any way to explicitly tells forrest to process the jpg before
processing the pdf ?
I know that another solution is to include svg in xsl-fo with an
<fo:instream-foreign-object> but i've already test it and the result
isn't good enough (no pattern, no transparency, and unreadable text)
while including the jpg looks like as i want.
Any idea will help
Thanks.
U. Oger.
Re: generated svg in pdf
Posted by Ullric Oger <og...@mapsys.fr>.
Dave Brondsema a écrit :
>On Tue, 25 May 2004, Ullric OGER wrote:
>
>
>
>>Subject : Generated SVG in PDF
>>
>>Hi,
>>
>>I'm a new forrest user with a little problem with PDF generation.
>>I read the faq about image in pdf but there is nothing about generated
>>image.
>>I need for my project to generate an image from an xml file.
>>So I've written a cocoon pipeline to do that thing :
>>xml file -> xslt transform -> svg file -> svg2jpg -> jpg file
>>
>>And it works fine for html viewing.
>>
>>But no image in PDF.
>>Look at document2fo.xsl to learn that FOP search the jpg in
>>'resources/images/' which naturally don't contains it.
>>
>>The matter is the jpeg image doesn't exist until forrest has processed it.
>>is there any way to explicitly tells forrest to process the jpg before
>>processing the pdf ?
>>
>>I know that another solution is to include svg in xsl-fo with an
>><fo:instream-foreign-object> but i've already test it and the result
>>isn't good enough (no pattern, no transparency, and unreadable text)
>>while including the jpg looks like as i want.
>>
>>Any idea will help
>>
>>Thanks.
>>
>>U. Oger.
>>
>>
>>
>
>copy src/core/context/WEB-INF/cli.xconf to your project's
>src/documentation/conf/cli.xconf. Add a <uri> for the jpg.
>
>That might not make the jpg get generated before the PDF, but it will be
>generated. If it generates the jpg later; you could do:
>forrest -Dproject.start-uri=path/to/my.jpg
>
>But then you would also have to put index.html as a <uri> because the CLI
>crawler would start at the jpg and have now links to follow and then it
>would stop. However, overally this solution isn't very good, especially
>since it doesn't work for multiple images.
>
>
>
it works !
with the uri in cli.conf my diagram is generated first.
Thanks a lot.
U. Oger.
Re: generated svg in pdf
Posted by Dave Brondsema <da...@brondsema.net>.
On Tue, 25 May 2004, Ullric OGER wrote:
> Subject : Generated SVG in PDF
>
> Hi,
>
> I'm a new forrest user with a little problem with PDF generation.
> I read the faq about image in pdf but there is nothing about generated
> image.
> I need for my project to generate an image from an xml file.
> So I've written a cocoon pipeline to do that thing :
> xml file -> xslt transform -> svg file -> svg2jpg -> jpg file
>
> And it works fine for html viewing.
>
> But no image in PDF.
> Look at document2fo.xsl to learn that FOP search the jpg in
> 'resources/images/' which naturally don't contains it.
>
> The matter is the jpeg image doesn't exist until forrest has processed it.
> is there any way to explicitly tells forrest to process the jpg before
> processing the pdf ?
>
> I know that another solution is to include svg in xsl-fo with an
> <fo:instream-foreign-object> but i've already test it and the result
> isn't good enough (no pattern, no transparency, and unreadable text)
> while including the jpg looks like as i want.
>
> Any idea will help
>
> Thanks.
>
> U. Oger.
>
copy src/core/context/WEB-INF/cli.xconf to your project's
src/documentation/conf/cli.xconf. Add a <uri> for the jpg.
That might not make the jpg get generated before the PDF, but it will be
generated. If it generates the jpg later; you could do:
forrest -Dproject.start-uri=path/to/my.jpg
But then you would also have to put index.html as a <uri> because the CLI
crawler would start at the jpg and have now links to follow and then it
would stop. However, overally this solution isn't very good, especially
since it doesn't work for multiple images.
--
Dave Brondsema : dave@brondsema.net
http://www.brondsema.net : personal
http://www.splike.com : programming
http://csx.calvin.edu : student org