Re: Getting number of rendered pages

2001-09-13 Thread Petr Zeman

Sorry, 

but after calling command from your example

  

is variable "loc" empty. Could't you why? I tried fop 0.20.1.

My tested version:





  

 page :  
 page:  
 mod :  
 id :  




Petr Zeman

- Original Message - 
From: "GALLO Jean-Claude" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, July 30, 2001 9:46 AM
Subject: RE: Getting number of rendered pages


Erik

try java-extensions. This help you to write external Java classes directly
callable from your XSL transformation rules.


a simple exmaple :
http://www.w3.org/1999/XSL/Transform"; version="1.0"
 xmlns:fo="http://www.w3.org/1999/XSL/Format";
 xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax";
 xmlns:xjava="xalan:://mycompany.util.PrintInfo"
 xmlns:java="http://www.apache.org/xslt/java";
exclude-result-prefixes="java">




  
  
  
   


Re: Getting number of rendered pages

2001-07-30 Thread Keiron Liddle


I new you where going to ask how to do it.
So here it is.

I have attached a simple example of how to add an extension to fop. This
prints out the page that the extension is placed into.
To build you will need to add a "lib" dir and put the necessary libs in.
(not there for obvious reasons).
There is an example fo file in the docs dir. All you need to get it to run
is to place the counter.jar in the class path.

Simple isn't it?

You will need to do more to get the information to the database.

On Mon, 30 Jul 2001 11:02:31 Erik Rehrmann wrote:
> Hi Keiron,
> 
>   >- define you own namespace, with elements and props
> 
> ok
> 
>   >- put the markup at the end of the document, where it can read
> the page number
> 
> ok
> 
>   >- provide some sort of connection with you other code
> 
> maybe I'm currently too tired to understand, but what exactly to you mean
> by this?

 counter.jar

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


Re: Getting number of rendered pages

2001-07-30 Thread Jeremias Maerki

> does anybody know if it's possible to get the number of rendered pages? I searched 
>the docs, but couldn't find anything about it.
> 
> I think it should be possible, because the PDFRenderer prints the current page 
>number to the message system.
> 
> We have to print a book divided into several chapters and every chapter has to be 
>rendered separately, but must begin with the right page number (information of every 
>chapter is in a database table to keep track of chapter sequence and page numbering). 
> 
> Any help is greatly appreciated.

Driver.format() returns the number of generated pages as an integer.

Jeremias Märki

mailto:[EMAIL PROTECTED]

OUTLINE AG
Postfach 3954 - Rhynauerstr. 15 - CH-6002 Luzern
Fon +41 (41) 317 2020 - Fax +41 (41) 317 2029
Internet http://www.outline.ch


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




RE: Getting number of rendered pages

2001-07-30 Thread GALLO Jean-Claude

Erik

try java-extensions. This help you to write external Java classes directly
callable from your XSL transformation rules.


a simple exmaple :
http://www.w3.org/1999/XSL/Transform"; version="1.0"
 xmlns:fo="http://www.w3.org/1999/XSL/Format";
 xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax";
 xmlns:xjava="xalan:://mycompany.util.PrintInfo"
 xmlns:java="http://www.apache.org/xslt/java";
exclude-result-prefixes="java">




  
  
  
-Message d'origine-
> De: Erik Rehrmann [mailto:[EMAIL PROTECTED]]
> Date: 29 July 2001 18:10
> À: '[EMAIL PROTECTED]'
> Objet: Getting number of rendered pages
> 
> 
> Hi all,
> 
> does anybody know if it's possible to get the number of 
> rendered pages? I searched the docs, but couldn't find 
> anything about it.
> 
> I think it should be possible, because the PDFRenderer prints 
> the current page number to the message system.
> 
> We have to print a book divided into several chapters and 
> every chapter has to be rendered separately, but must begin 
> with the right page number (information of every chapter is 
> in a database table to keep track of chapter sequence and 
> page numbering). 
> 
> Any help is greatly appreciated.
> 
> 
> Erik Rehrmann
> IOn AG - [EMAIL PROTECTED]
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
> 


__
Jean Claude GALLO
[EMAIL PROTECTED]


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




Re: : Getting number of rendered pages

2001-07-29 Thread Enrico Schnepel

Hi Erik,

Yes, I have a Idea...

externaly from FOP:
You redirect stdout from FOP and use the last opening bracket "[" and the 
following number as pagenumber.

within FOP:
You write your own class derived from PageSequence or 
PageNumberGenerator and write the last pagenumber (may be in the destructor) 
directly to your database or to a file.

Regards,
Enrico

Am Sonntag, 29. Juli 2001 20:45 schrieben Sie:
> Hi Enrico,
>
> this is a way to use the page number within the same transformation
> process, but I need to have the page count in my application to write it in
> a database table and to use it in a different transformation as starting
> page.
>
> Any idea?
>
> Regards,
> 
> Erik Rehrmann
> IOn AG - [EMAIL PROTECTED]
>
>
> -Ursprüngliche Nachricht-
> Von: Enrico Schnepel [mailto:[EMAIL PROTECTED]]
> Gesendet: Sonntag, 29. Juli 2001 20:37
> An: [EMAIL PROTECTED]
> Betreff: Re: Getting number of rendered pages
>
>
> Hi Erik
>
> I am writing a
>
>  font-size="1pt">
>
> before  and display the page number with
>
> Page  of 
>
> within my region-before or region-after. This should result in
>
> Page 1 of 3
>
> I don't know wether this is the recomended way of getting the last page
> number but it's working fine.
>
> Regards
> Enrico
>
> Am Sonntag, 29. Juli 2001 18:10 schrieben Sie:
> > Hi all,
> >
> > does anybody know if it's possible to get the number of rendered
> > pages? I searched the docs, but couldn't find anything about it.
> >
> > I think it should be possible, because the PDFRenderer prints the
> > current page number to the message system.
> >
> > We have to print a book divided into several chapters and every
> > chapter has to be rendered separately, but must begin with the right
> > page number (information of every chapter is in a database table to
> > keep track of chapter sequence and page numbering).
> >
> > Any help is greatly appreciated.
> >
> > 
> > Erik Rehrmann
> > IOn AG - [EMAIL PROTECTED]
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, email: [EMAIL PROTECTED]
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]

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




Re: Getting number of rendered pages

2001-07-29 Thread Enrico Schnepel

Hi Erik

I am writing a 



before  and display the page number with 

Page  of 

within my region-before or region-after. This should result in

Page 1 of 3

I don't know wether this is the recomended way of getting the last page 
number but it's working fine.

Regards
Enrico


Am Sonntag, 29. Juli 2001 18:10 schrieben Sie:
> Hi all,
>
> does anybody know if it's possible to get the number of rendered pages? I
> searched the docs, but couldn't find anything about it.
>
> I think it should be possible, because the PDFRenderer prints the current
> page number to the message system.
>
> We have to print a book divided into several chapters and every chapter has
> to be rendered separately, but must begin with the right page number
> (information of every chapter is in a database table to keep track of
> chapter sequence and page numbering).
>
> Any help is greatly appreciated.
>
> 
> Erik Rehrmann
> IOn AG - [EMAIL PROTECTED]
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]

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