Skip Navigation LinksHome  /  Support  /  Forums  /  DynamicPDF CoreSuite for COM/ActiveX (v6)  /  AddImportedPage

DynamicPDF CoreSuite for COM/ActiveX (v6) Forum

 Feb 12 2014 10:46 AM

Is there a way to know how many pages an imported pdf has?
I would like to use AddImportedPage in a loop to pull in all the pages.

 Feb 12 2014 12:22 PM
Posted by a ceTe Software moderator
Hello Adam,

Yes, you can get the page count of the input PDF document without any problem using our DynamicPDF Merger for COM/ActiveX product. You will need to create PdfDocument object by loading  input PDF. Then you can retrieve the page count using pageCount property. Below is the code sample for it.

    Dim pdf As New DynamicPDF.PdfDocument
    pdf.LoadPdf "C:\Temp\DocumentA.pdf", ""
    Dim pageCount As Integer
    pageCount = pdf.pageCount

ceTe Software Support Team.

All times are US Eastern Standard time. The time now is 4:37 PM.