Some test text!

Get started

keyboard_arrow_down
Download PDFTron SDKIntegrate with GradleIntegrate manuallyRun samplesAdd PDFTron license keyQuick start - view a documentProGuardUpdate to latest versionTroubleshooting

Document Viewer

keyboard_arrow_down

Document Viewer components

keyboard_arrow_down
PDFViewCtrlReflowFloating context menuCustomize floating context menuAnnotation toolbarAnnotation style dialogCustomize annotation style dialogPage sliderAnnotation listDocument outlineUser bookmark listList containerThumbnail browserAdd pages dialogRotate pages dialogView mode dialogCrop pages dialog

Annotation and collaboration

keyboard_arrow_down
OverviewSet up ToolManagerRead only modeDisable annotation creation/editingDefault annotation propertiesAnnotation propertiesEventsOverride annotation handlingShow and hide existing annotationsUndo and redoRealtime collaboration

Advanced customization

keyboard_arrow_down
Add a custom view to a pageCreate a custom toolPage coloring modePage fit modePage layout mode

Conversion

keyboard_arrow_down
Convert documents to PDFConvert HTML to PDF

Search

keyboard_arrow_down

Other Frameworks

keyboard_arrow_down

Advanced topics

keyboard_arrow_down
Understand coordinatesDocument savingDocument lockingGenerate page thumbnailsTool class hierarchy

FAQ

keyboard_arrow_down
System RequirementsRun project in Android StudioRun project with source codePDFTron full vs. standardLocalizationIcon cheat sheetReduce size of APKEnable multidexOut of memory when rotating device multiple timesReduce memory consumptionDetachCurrentThread warning

PDF Processing API

keyboard_arrow_down
What is PDFNet?Opening a documentSerializing (saving) a documentWorking with pagesWorking with Page ContentWorking with BookmarksWorking with Interactive Forms (AcroForms)PDF SecurityLow-level PDF APIError handling

Rotating PDF pages

In this document
chevron_rightRotating PDFViewCtrl
chevron_rightRotating a PDF page
chevron_rightRotating PDF pages
PDFTron's library has a rotate pages dialog which allows users to rotate pages easily. For more information, see: rotate pages dialog.

There are two options for rotating PDF pages. The first is rotating PDFViewCtrl, it will rotate all PDF pages temporarily. The second is rotating PDF pages using Page class, it will rotate selected PDF pages permanently.

linkRotating PDFViewCtrl

If you want to rotate a PDFViewCtrl by 90 degrees clockwisely, just simply call PDFViewCtrl.rotateClockwise (). If you want to rotate the PDFViewCtrl by 90 degrees counter clockwisely, call PDFViewCtrl.rotateCounterClockwise (). After rotation, update the PDFViewCtrl pages layout by calling PDFViewCtrl.updatePageLayout().



where pdfViewCtrl is the instance of PDFViewCtrl.

linkRotating a PDF page

To rotate a PDF page by 90 degrees, call Page.setRotation(int). The parameter of this method is the rotation value, which is one of [0, 1, 2, 3]. It represents [0 degree, 90 degree, 180 degree, 270 degree] correspondingly. After rotation, update the PDFViewCtrl pages layout by calling PDFViewCtrl.updatePageLayout().

To rotate a PDF page, you must lock PDFViewCtrl first, see: document locking.


linkRotating PDF pages

To rotate PDF pages, traverse each page and call Page.setRotation(int). The following example shows how to rotate all pages of a PDF document.