Image Viewer CP ActiveX Control

PDFGetPageSize

 

Get the page size from PDF file. The Page Size will return Centimeters. This feature is useful if you need add PDF annotation on PDF, you may call this method to know the page size first.

Public Function PDFGetPageSize( _
   ByVal strPDFFile As String, _
   ByVal iPageNumber As Integer, _
   ByRef strPageWidthCM As String, _
   ByRef strPageHeightCM As String,
) As bool

 

Parameter

strPDFFile
 specifies the path of PDF file.

iPageNumber
 specifies page no. for get the page size The first page is zero index.


strPageWidthCM
 return the width of page, the unit is Centimeters.

strPageHeightCM
 return the width of page, the unit is Centimeters.


Return Value

Return true if successful.
Return false if failed.


Example

   

Visual Basic Syntax
ImageViewer1.PDFGetPageSize "c:\yourfolder\yourfile.pdf", strPageWidth, strPageHeight