简体   繁体   中英

iText: how to detect if a pdf page is LETTER or LEGAL size

I have a pdf documents that contains mixture of LETTER and LEGAL size, and I need to detect pages with LEGAL size and reduce to LETTER size. Can I do this with iText? sample code would be greatly appreciated. Thank you so much.

Either use

Compare the width and height of the Rectangle you get out of this and you know what paper size you're using.

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