Starting PDF pages with an offset

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Starting PDF pages with an offset

kevinsima
I'd like to make an adoc for only part of a doc (no title page or TOC) to be merged with an existing PDF file.  So I'd like to be able to specify a starting page (offset) in the theme file, so I can later merge PDF files and the pages will be continuous.
Reply | Threaded
Open this post in threaded view
|

Re: Starting PDF pages with an offset

Alexander Schwartz
I'm not aware of such a feature.

But another feature might help you to achieve something similar: You can import PDF pages into asciidoctor-pdf at generation time:
https://github.com/asciidoctor/asciidoctor-pdf#importing-pdf-pages
Alexander Schwartz (alexander.schwartz@gmx.net)
https://www.ahus1.de
Reply | Threaded
Open this post in threaded view
|

Re: Starting PDF pages with an offset

kevinsima
In reply to this post by kevinsima
One way I just found...

Add a 'declaration' of a counter like so, such that it doesn't show in the output.  Make it one less than the start page.  'define-steps' is not used:

:define-steps: {counter:steps:6}

Then in the style YAML, for example in the footer content use:

{counter:steps}

which will start at 7 in this case.