Page 1 of 1
How to restart pages counter at start of each chapter
Posted: Tue Jun 25, 2024 4:02 pm
by mariom
I'm testing PDF Chemistry and am currently testing page numbering. Currently I need to test Page 1 of #, (# is a total number of pages in a chapter). I can't find an example of how to do this via PDF Chemistry. The pages counter cannot be reset according the spec. How can I get the number of pages a chapter has?
I'm testing PDF Chemistry via the command line.
kr
Mario
Re: How to restart pages counter at start of each chapter
Posted: Tue Jun 25, 2024 4:57 pm
by julien_lacour
Hello Mario,
Unfortunately there's no additional page counter for the total number of pages in a chapter, Oxygen PDF Chemistry only allows you to get the current page number and the document total number of pages.
Regards,
Julien
Re: How to restart pages counter at start of each chapter
Posted: Tue Jun 25, 2024 6:30 pm
by mariom
Thanks for your quick reply. I'll be adding this to the feature request then.
kr
Mario
Re: How to restart pages counter at start of each chapter
Posted: Wed Jun 26, 2024 5:06 pm
by julien_lacour
Hello Mario,
I added the feature request to our tracking system, I will notify this thread once it will be available.
Just for clarification it is possible to reset the "page" counter but not the "pages" counter using CSS, for example with a rule similar to this one:
Code: Select all
article {
counter-reset: page 1;
}
For DITA, a similar rule is already implemented in the default p-numbering-deep-chapter-scope.css stylesheet.
If you are using the DITA Map PDF - based on HTML5 & CSS transformation scenario you can control the page counter using the args.css.param.numbering parameter.
For more detailed information, you can refer to the
Numbering and
How to Make Chapters Look Like Individual Publications sections in the Oxygen XML documentation.
Regards,
Julien