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 FOUCAULT Séb <se...@yahoo.fr> on 2004/11/18 12:50:13 UTC

Page X/Y, forward references and iText

Hello,
 
For the moment, i get the "Page X / Y" label in my
footers using the <page-number-citation/> element. But
of course, I get out of memory exceptions for huge
documents (I'm sure that these exceptions come from
these forward references since I successfully get my
PDF documents when the <page-number-citation>'s are
removed and since my page templates are fully
optimized).
 
I read a lot of articles dealing with issues with
forward references in long documents in the mailing
list archives (page x / y). Using a third-party tool
such as iText is a solution often suggested to tackle
this kind of problems. 
 
Has anybody experienced such a solution ? 
- My footers cannot be fully generated by the 3rd
party tool because they can potentially contain
complex layouts (the layouts are designed by report
designers using a graphical editor under Windows).
- What I'd like would be a solution in which I could
simply substitute the <page-number-citation> by a
<block>, be able to identify the corresponding pdf
chunk using the 3rd party tool and replace it by the
real number of pages in the document. 
- I read interesting things in iText about the way to
handle this problem using PDF template. 
- Could the use of PDF templates be a good way to
overcome the more general problem of forward
references (maybe writing a FOP extension) ?
 
Regards
--
sebfoucault2004@yahoo.fr 
 
 




	

	
		
Vous manquez d’espace pour stocker vos mails ? 
Yahoo! Mail vous offre GRATUITEMENT 100 Mo !
Créez votre Yahoo! Mail sur http://fr.benefits.yahoo.com/

Le nouveau Yahoo! Messenger est arrivé ! Découvrez toutes les nouveautés pour dialoguer instantanément avec vos amis. A télécharger gratuitement sur http://fr.messenger.yahoo.com

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


RE: Page X/Y, forward references and iText

Posted by "Andreas L. Delmelle" <a_...@pandora.be>.
> -----Original Message-----
> From: FOUCAULT Séb [mailto:sebfoucault2004@yahoo.fr]

Hi,

> I read a lot of articles dealing with issues with
> forward references in long documents in the mailing
> list archives (page x / y). Using a third-party tool
> such as iText is a solution often suggested to tackle
> this kind of problems.
>  
> Has anybody experienced such a solution ?

I haven't done it myself, but I'm guessing that this would be best achieved
by the following:
- leave all footers as you generate them now, except for the total number of
pages --the current page-number is not what's causing the problem, so this
can remain as is-- maybe you can add an empty block or block-container to
make sure this space remains blank
- only for the total number of pages, use iText to add a text box to each
page at the coördinates where this would appear if you had
computed/generated it via XSL-FO

> - Could the use of PDF templates be a good way to
> overcome the more general problem of forward
> references (maybe writing a FOP extension) ?
>  

Could be. I'd certainly recommend looking at an extension that has been
posted recently on fop-dev:
http://wwwstud.ira.uka.de/~s_hecht/

This is an extension for PDF Forms --maybe you could also achieve the same
effect by adding the total number of pages through iText into a form-field
created with the forms extension... This could maybe avoid having to
generate a text box for every page separately, since the content is
identical for all pages after all.

Hope this helps!


Greetz,

Andreas


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