AW: Calculate number of pages without complete rendering-process was: Re: Counting the number of pages generated in the pdf file

2003-02-07 Thread "Zieseniß, Markus"
I also do not understand the wrapper example to count all pages of a
document. Has anybody tested that and can explain how to implement?

greetings Markus

> -Ursprüngliche Nachricht-
> Von:  J.Pietschmann [SMTP:[EMAIL PROTECTED]
> Gesendet am:  Mittwoch, 5. Februar 2003 22:32
> An:   [EMAIL PROTECTED]
> Betreff:  Re: Calculate number of pages without complete
> rendering-process was: Re: Counting the number of pages generated in the
> pdf file
> 
> alex elsholz wrote:
> > but thats not what i want.
> > 
> > I'm looking for an solution to calculate the number of pages without the
> > complete rendering process.
> 
> Great idea. If you tell me how to do it, I'll implement it.
> Note: In general, you can't know how many pages a text fills
> unless you actually filled the pages with the text.
> 
> > an own wrapper? why doesnt exists a default-wrapper? How could i
> implemet
> > this?
> I took the freedom to delete the code you generously pseudo-quoted
> from the FAQ and which does exactly what you described.
> 
> J.Pietschmann
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: AW: Calculate number of pages without complete rendering-process was: Re: Counting the number of pages generated in the pdf file

2003-02-07 Thread J.Pietschmann
Zieseniß, Markus wrote:
I also do not understand the wrapper example to count all pages of a
document. Has anybody tested that and can explain how to implement?
I don't understand what's the problem.
1. Write an XML file, let's say foo.xml:
 
  
 
2. write an XSLT file which transforms this into a FO document.
Let's suppose we generate a page sequence for each page element.
Therefore foo.xsl:
http://www.w3.org/1999/XSL/Transform";
  xmlns:fo="http://www.w3.org/1999/XSL/Format";>
  
  

  

  

  
  

  
  

  
Page 
   of 
  

  

3. Copy&paste the code from the FAQ into a file rendtest.java.
4. Compile the file.
5. Run it
 java -classpath .;lib/fop.jar;lib/xml-apis.jar;lib/xercesImpl-2.2.1.jar;
  lib/xalan-2.4.1.jar;lib/avalon-framework-cvs-20020806.jar;lib/batik.jar
  rendtest foo.xml foo.xsl foo.pdf
The PDF file should contain "Page 1 of 5", "Page 2 of 5" and so on.
How to adapt this to your specific problem, and how to optimize
this is another matter.
J.Pietschmann
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]