how to get DIN-A format from document?

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

Stifelch
User
Posts: 9
Joined: Tue Oct 01, 2013 8:27 am

how to get DIN-A format from document?

Post by Stifelch »

Hello,

i'm looking for a possibility to get the DIN A Format (0-4) or the pixels in heigth / width from a document, but couldn't find any solution yet.

Some hints would be great :)

Thanks so far,
Chris
User avatar
Stefan - PDF-XChange
Site Admin
Posts: 19913
Joined: Mon Jan 12, 2009 8:07 am

Re: how to get DIN-A format from document?

Post by Stefan - PDF-XChange »

Hi Chris,

You can use JS to obtain the desired page's dimensions (in rotated user space)

Code: Select all

var aRect = this.getPageBox("Media");
var width = aRect[2] - aRect[0];
var height = aRect[1] - aRect[3];
console.println("Page 1 has a width of " + width + " and a height of " + height);
getPageBox ()

Code: Select all

Parameters
--------------
cBox (optional) The type of box. Values are:
     Art
     Bleed
     BBox
     Crop (default)
     Trim
nPage (optional) The 0-based index of the page. The default is 0, the first page in the document.
Stifelch
User
Posts: 9
Joined: Tue Oct 01, 2013 8:27 am

Re: how to get DIN-A format from document?

Post by Stifelch »

Great, thanks!

Probably the easiest way :)
User avatar
Stefan - PDF-XChange
Site Admin
Posts: 19913
Joined: Mon Jan 12, 2009 8:07 am

Re: how to get DIN-A format from document?

Post by Stefan - PDF-XChange »

:)