From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.


Showing results for 
Search instead for 
Did you mean: 

Number of pages of an existing pdf

Hello all,


I want to write a script, where i can find out the number of pages of a pdf-document.

Is there such a possibility?



When I want two attach some new pages to an existing pdf, I need start the report with the last page + 1.


Thank you and best regards



0 Kudos
Message 1 of 5

If You are interested in the report sheets number You can simply use code below (python): 




This will give You a number of sheets in the current report in Diadem. 


0 Kudos
Message 2 of 5



no, I am not interested in the number of my report in Diadem. 


I am interested in the number of a pdf-document, which is on my computer drive.


Thank you.

0 Kudos
Message 3 of 5

Hello Mark.


If you 're looking for the way to check any PDF from Diadem, this might be a difficult thing.

But in the initial post you mention that you wand to append new pages...


Maybe this could work for you?

call PicPDFExport("MyFileName", true)


By this the new pages will be attached to the existing PDF, after the last existing page...




0 Kudos
Message 4 of 5

Hello Vassily,


how I add new pages to an existing pdf, was not the question.


Thank you.


Best regards.


0 Kudos
Message 5 of 5