There are two options to crop a page. First is using a UI component that can crop or reset pages. Second is an API guide to programmatically crop a page.
With the Apryse library you can crop pages manually or automatically, as well as reset document pages to their original size. The UserCropDialogFragment
allows a user to adjust the page's crop box which can then be applied to a subset of pages or to all the pages in a document.
To show a user crop pages dialog in your activity, create a new instance of UserCropDialogFragment
by calling newInstance()
and setting the PDFViewCtrl
:
In order to view user cropped pages in PDFViewCtrl
make sure you set Page.e_user_crop
as the default page box:
To crop a page in a PDF document.
The crop box defines the region to which the contents of the page are to be clipped (cropped) when displayed or printed. Unlike other types of boxes, the crop box has no defined meaning in terms of physical page geometry or intended use; it merely imposes clipping on the page contents. The default value is the page's media box. A new crop box can be imposed on a page with Page.SetCropBox()
.
Did you find this helpful?
Trial setup questions?
Ask experts on DiscordNeed other help?
Contact SupportPricing or product questions?
Contact Sales