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 Peter Verhoye <pe...@synergetic-solutions.be> on 2004/08/19 17:44:44 UTC
FOP extension development (newbie)
Hi all,
I'm in the process of writing a FOP extension. To be able to start I was
planning on creating a FOP extension that does something very silly: to
load an jpg file and insert it in a PDF document.
I know, this is already possible but the goal is to be able to insert a
generated image in a PDF document on the fly.
I can't use a servlet so no help there.
Does somebody has some good, very good pointers to help me out as, to be
honest, it's all over my head a bit right now :-S
Thanks in advance
Peter
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org
Re: FOP extension development (newbie)
Posted by Peter Verhoye <pe...@synergetic-solutions.be>.
> Get the image source URL from a style sheet parameter:
> <xsl:stylesheet ...>
> <xsl:param name="image-src"/>
> <xsl:template ...>
> ...
> <fo:external-graphic src="{$image-src}"/>
> ...
>
> See
> http://xml.apache.org/fop/embedding.html#render-with-xslt
> for an example of embedding FOP. You can set the paramter
> by using setParameter on the transformer (details in the
> JavaDoc).
>
> Definitely much easier than implementing a FOP extension.
Could you elaborate more on this? This may be one more step in showing
myself as a complete newbie (which I am) but I don't see how thiscould
help me.
BB
Peter
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org
Re: FOP extension development (newbie)
Posted by "J.Pietschmann" <j3...@yahoo.de>.
Peter Verhoye wrote:
> So, I don't see how to do this using anything else than an extension.
Get the image source URL from a style sheet parameter:
<xsl:stylesheet ...>
<xsl:param name="image-src"/>
<xsl:template ...>
...
<fo:external-graphic src="{$image-src}"/>
...
See
http://xml.apache.org/fop/embedding.html#render-with-xslt
for an example of embedding FOP. You can set the paramter
by using setParameter on the transformer (details in the
JavaDoc).
Definitely much easier than implementing a FOP extension.
J.Pietschmann
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org
Re: FOP extension development (newbie)
Posted by Peter Verhoye <pe...@synergetic-solutions.be>.
> Instead of an extension element--*very* complex--can't
> you use XSLT to generate your FO stylesheet, possibly
> using xsl:param to dynamically choose the graphic
> desired?
I wish I could (and maybe I can, but I'm a XSLT newbie also :-)
The problem I have is as follows. The PDF need to include a graphic which
is specific for each document. Its a kind of watermark that is generated
using data that's found in the XML used to create the document.
For example (and it is an example), the graphic could look like a bunny
rabbit when your name is Peter Verhoye :-)
So, I don't see how to do this using anything else than an extension.
The problem is that I've been looking at existing example, but whenever
they do graphics, they use SVG and the component that I use generates JPG.
This, and the fact that I can even seem to find an example that shows a
very basic extension (like print a text) means my work is kinda hard :-D
BB
Peter
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org
Re: FOP extension development (newbie)
Posted by Glen Mazza <gr...@yahoo.com>.
--- Peter Verhoye
<pe...@synergetic-solutions.be> wrote:
> I know, this is already possible but the goal is to
> be able to insert a
> generated image in a PDF document on the fly.
> I can't use a servlet so no help there.
>
Instead of an extension element--*very* complex--can't
you use XSLT to generate your FO stylesheet, possibly
using xsl:param to dynamically choose the graphic
desired?
Glen
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org