开发者

Get page size using AlivePDF

开发者 https://www.devze.com 2023-04-10 16:29 出处:网络
Is it possible to get the page width and page height for a PDF during creation with AlivePDF? I need this to place a shape to the right side of the page, no margin or pa开发者_开发知识库dding, sticke

Is it possible to get the page width and page height for a PDF during creation with AlivePDF?

I need this to place a shape to the right side of the page, no margin or pa开发者_开发知识库dding, sticked to the right side.


Hopefully this will help you. Looking at the AlivePDF API documentation for the Page object (See here) I've found the public properties "width" and "height".

In my code, given a PDF object called myPDF, I use:

var sizeWidth:int = myPDF.getPage(i).width;
var sizeHeight:int = myPDF.getPage(i).height;

to get the width and height of page i.

0

精彩评论

暂无评论...
验证码 换一张
取 消