简体   繁体   中英

Coordinates in iTextSharp in visible CropBox

In iTextSharp:

Is pagesize.getTop(0) same as pagesize.Top? and similarly for other coordinates like pagesize.getLeft(0) and pagesize.Left?

See following code:

PdfReader PDFReader = new PdfReader("c:\\file.pdf");
iTextSharp.text.Rectangle PageSize = PDFReader.GetCropBox(1);
PageSize.Left;
PageSize.GetLeft(0);
PageSize.Top;
PageSize.GetTop(0);

Is pagesize.GetTop(0) same as pagesize.Top ? and similarly for other coordinates like pagesize.GetLeft(0) and pagesize.Left ?

Yes.

The methods GetTop(float) allows you to automatically have a margin value applied to the border, and for a margin of 0 you get the original border.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM