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 Johannes Franz <jo...@rub.de> on 2004/08/18 22:22:50 UTC

Table-of-Contents Headlines

Hi is it possible to declare certain sentences as a headline and generate autmatically a table-of-contents in JFOR/FOP?
Perhaps somebody could send me an example. 

Greetings,
Johannes.

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


FOP extension development (newbie)

Posted by Peter Verhoye <pe...@synergetic-solutions.be>.
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: Table-of-Contents Headlines

Posted by Johannes Franz <jo...@rub.de>.
Do you have an example for a xslt document that creates a table-of-contents
which is generated at the end of the document?

----- Original Message -----
From: "Johannes Franz" <jo...@rub.de>
To: <fo...@xml.apache.org>; <bo...@hotmail.com>
Sent: Thursday, August 19, 2004 4:43 PM
Subject: Re: Table-of-Contents Headlines


> Ok, i'll try it. Thx for explanation.
> By the way do you know if it is possible and how to use the headline
> function of word/rtf with XSL-FO/JFOR?
> ----- Original Message -----
> From: "Chris Bowditch" <bo...@hotmail.com>
> To: <fo...@xml.apache.org>
> Sent: Thursday, August 19, 2004 1:02 PM
> Subject: Re: Table-of-Contents Headlines
>
>
> > Johannes Franz wrote:
> > > Hi is it possible to declare certain sentences as a headline and
> > > generate autmatically a table-of-contents in JFOR/FOP?
> > > Perhaps somebody could send me an example.
> >
> > No this is not possible in general within XSL-FO. You can do something
in
> > XSLT. Using markers and page-number-citation its possible create a table
> of
> > Contents at back of document, but not at the front :-(
> >
> > Chris
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
> > For additional commands, e-mail: fop-user-help@xml.apache.org
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
> For additional commands, e-mail: fop-user-help@xml.apache.org
>
>


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


Re: Table-of-Contents Headlines

Posted by Johannes Franz <jo...@rub.de>.
Ok, i'll try it. Thx for explanation.
By the way do you know if it is possible and how to use the headline
function of word/rtf with XSL-FO/JFOR?
----- Original Message -----
From: "Chris Bowditch" <bo...@hotmail.com>
To: <fo...@xml.apache.org>
Sent: Thursday, August 19, 2004 1:02 PM
Subject: Re: Table-of-Contents Headlines


> Johannes Franz wrote:
> > Hi is it possible to declare certain sentences as a headline and
> > generate autmatically a table-of-contents in JFOR/FOP?
> > Perhaps somebody could send me an example.
>
> No this is not possible in general within XSL-FO. You can do something in
> XSLT. Using markers and page-number-citation its possible create a table
of
> Contents at back of document, but not at the front :-(
>
> Chris
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
> For additional commands, e-mail: fop-user-help@xml.apache.org
>
>


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


Re: Table-of-Contents Headlines

Posted by Chris Bowditch <bo...@hotmail.com>.
Johannes Franz wrote:
> Hi is it possible to declare certain sentences as a headline and 
> generate autmatically a table-of-contents in JFOR/FOP?
> Perhaps somebody could send me an example.

No this is not possible in general within XSL-FO. You can do something in 
XSLT. Using markers and page-number-citation its possible create a table of 
Contents at back of document, but not at the front :-(

Chris


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