Some test text!
With the PDFTron 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.
In order to view user cropped pages in
PDFViewCtrl make sure you set
Page.e_user_crop as the default page box:
You can also set a listener via
setOnUserCropDialogDismissListener(...) to be notified when the user crop dialog is dismissed.
UserCropDialogFragmentdoes not crop pages permanently, it may not handled well by other PDF viewer. To crop pages permanently, see cropping pages permanently
You can also automatically crop the edges of the document based on the position of the content. To do this, you can simply call the utility method
UserCropUtilities.AutoCropInBackgroundTask and pass in your activity and
If you wish to remove user defined cropping for a given page you can call the utility method
Cropping pages using the above methods are at user-level. User-level page-cropping may not be handled well by other PDF viewers. To apply crop pages permanently use