Page number as a runtime parameter?

Hi,

Is it possible to continue page numbering even when using another datamapper and another designer template?

I want to run through the first datamapper and template and generate a document with a number of pages. then I want to store that PDF-file in a folder and continue to another datamapper and designer template and continue. Then I want to combine those two PDF-files to one big report.

If above is possible, how do I know the total number of pages when generating the first PDF-file? Do I need to run through everything twice and store the total number of pages in a variable maybe?

Hi @kalle.bystrom,

Could you please tell us whether the first and/or second run each exists of multiple records or a single record?

I would like to inform you, in any case, that you can make use of the following solution to get the total number of pages of the PDF document generated by the first run: ‘PDF Page Count using the Alambic API - OL Learn (link)’

Hi Marten,

Both runs can each exist of one or multiple records. it really depends on what the user choose when generating the input data in our system.

I will look at the document you attached.

Hi @kalle.bystrom,

Does the page numbering also have to continue over these records, like for example:

  • Record 1: Page 1 of 4
  • Record 2: Page 2 of 4
  • Record 3: Page 3 of 4
  • Record 3: Page 4 of 4

Yes, that is correct.

Hi @kalle.bystrom,

Were you able to continue the page numbering in another Data Mapper and Template?

If not, then I would like to let you know that I assume that you will have to parse the value which is returned by the script as mentioned in my ‘post’ as a runtime parameter (‘Runtime parameters - PlanetPress Connect 2022.1 User Guide’) and that you will have to add/calculate the page numbering by the “Add additional content” option available by creating a Output Creation preset.

Thank you Marten,

I’ve not solved it yet, but I will try your solution. Sounds like it should work.