DIAdem

cancel
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?

 

Reason: 

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

 

Mark

0 Kudos
Message 1 of 5
(2,069 Views)

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

 

dd.Report.Sheets.Count 

 

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

 

0 Kudos
Message 2 of 5
(2,011 Views)

Hi,

 

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
(2,003 Views)

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...

 

Greetings,

Vassili

0 Kudos
Message 4 of 5
(1,979 Views)

Hello Vassily,

 

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

 

Thank you.

 

Best regards.

Mark

0 Kudos
Message 5 of 5
(1,967 Views)