Bug 18796 - Pagination while conversion to PDF
Summary: Pagination while conversion to PDF
Status: CLOSED WORKSFORME
Alias: None
Product: Fop - Now in Jira
Classification: Unclassified
Component: pdf (show other bugs)
Version: 0.20.5
Hardware: All All
: P3 blocker
Target Milestone: ---
Assignee: fop-dev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-04-08 06:06 UTC by suhas
Modified: 2012-04-01 13:51 UTC (History)
0 users



Attachments
XSL-FO example for "page x of y" (1.06 KB, application/xml)
2003-04-08 09:08 UTC, Jeremias Maerki
Details
Sample stylesheet showing page x of y with multiple subdocuments (1.96 KB, application/xml)
2003-04-08 09:41 UTC, Jeremias Maerki
Details
Sample XML for the stylesheet (155 bytes, application/xml)
2003-04-08 09:41 UTC, Jeremias Maerki
Details

Note You need to log in before you can comment on or make changes to this bug.
Description suhas 2003-04-08 06:06:08 UTC
While converting the XML document to the PDF document, I am not able to show 
the total number of pages on each page. With the current implementation I could 
only show the current page number.
E.g. for the page 1 the footer is like "P 1". For the page n the footer is 
like "P n"
The required is:
"Page 1 of 10" ; "Page 2 of 10" ........"Page n of n" etc...
Is it possible with the FOP project.
Thanks in advance
Suhas
Comment 1 Jeremias Maerki 2003-04-08 06:18:28 UTC
This is a FAQ:
http://xml.apache.org/fop/faq.html#fo_total_pages

Please don't abuse Bugzilla for posting frequently asked questions. Look at 
the following page for getting help in the future:
http://xml.apache.org/fop/gethelp.html
Comment 2 suhas 2003-04-08 08:18:04 UTC
While converting to the PDF from the XML doc. I m not able to show the paging. 
My req. is :
The paging should be shown as :
"Page 1 of 10" ..."Page 4 of 10" ............. "Page n of n"
Regards
Suhas
Comment 3 Jeremias Maerki 2003-04-08 09:08:09 UTC
Created attachment 5688 [details]
XSL-FO example for "page x of y"
Comment 4 suhas 2003-04-08 09:26:32 UTC
 have used 
 
<fo:flow>
..........
..........
<fo:block id="last-page" />
</fo:flow>
 
this is used as a in 
<fo:static-content>
<fo:page-number-citation ref-id="last-page" />
</fo:static-content>
 
but the problem is that I'm running a for loop.....something like this....
 
<xsl:for-each select = 'statement'>  
 
<fo:flow>
..........
..........
<fo:block id="last-page" />
</fo:flow>
 
<fo:static-content>
<fo:page-number-citation ref-id="last-page" />
</fo:static-content>
 
</xsl:for-each>
 
it works well for one iteration but for the next iteration it throws up an 
error.........saying id="last-page" is already defined .........which is 
true.......
 
is there any workaround.......
 
Plzzzz help........
Comment 5 Jeremias Maerki 2003-04-08 09:41:15 UTC
Created attachment 5689 [details]
Sample stylesheet showing page x of y with multiple subdocuments
Comment 6 Jeremias Maerki 2003-04-08 09:41:51 UTC
Created attachment 5690 [details]
Sample XML for the stylesheet
Comment 7 Jeremias Maerki 2003-04-08 09:44:49 UTC
The error message says it all. You've got the same id multiple times. So you 
need to use a different id for each subdocument. At least that's what I think 
you're trying to do. You can use the position() function for that as shown in 
the example XSLT.

If you're running into problems like this, skip FOP and only produce the XSL-
FO generated by your stylesheet. Then you can easily see what's happening.
Comment 8 Glenn Adams 2012-04-01 13:51:27 UTC
batch transition to closed remaining pre-FOP1.0 resolved bugs