Get the width and height of a pdf page

PDF-XChange Viewer SDK for Developer's
(ActiveX and Simple DLL Versions)

Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange

AleX_
User
Posts: 4
Joined: Fri May 27, 2011 12:20 pm

Get the width and height of a pdf page

Post by AleX_ »

Hello :?: ,

is there any function to get the width and height of a PDF page page?

Thank you for help.
User avatar
Vasyl - PDF-XChange
Site Admin
Posts: 2445
Joined: Thu Jun 30, 2005 4:11 pm

Re: Get the width and height of a pdf page

Post by Vasyl - PDF-XChange »

Hi, AleX_.

Example pseudocode for first page:

Code: Select all

double w, h;
ctrl.GetDocumentProperty(docId, "Pages[0].Width", out w, 0);
ctrl.GetDocumentProperty(docId, "Pages[0].Height", out h, 0);
Look to [Reference/NamedItems/Objects/Documents/<Item>/Pages/<Item>] section in SDK Help.

HTH.
PDF-XChange Co. LTD (Project Developer)

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.