jambalaya Posted September 22, 2009 Share Posted September 22, 2009 Hi. Could someone please tell me at which stage is the total number of pages known?I configured a PDF exporter to export only page 1 (the second one), and to my surprise the "page 1 of X" field worked correctly. So, how is the page count known, how does this work?1. the number of pages is somehow known before the actual PDF document generation is done, but I fail to see how this can beor2. the whole document is created (3 pages in this case), and then only the bytes for page 1 are written to the stream I supplied, plues all necessary PDF headers and trailersor3. some other ingenious way I cannot see nowWhich one is the case? Best regards. Link to comment Share on other sites More sharing options...
Teodor Danciu Posted September 22, 2009 Share Posted September 22, 2009 Hi, JR works like in #2.When you fill a report template with data, you get a JasperPrint object, which is a complete document in JR's proprietary format. Then this document can be exporter to PDF or other formats. Or, you can export pieces of it. Like the second page. I hope this helps.Teodor Link to comment Share on other sites More sharing options...
jambalaya Posted September 22, 2009 Author Share Posted September 22, 2009 Thank you for the explanation.Cheers. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now