Topics
All
MacOS
(Only)
Windows
(Only)
Linux
(Only, Not)
iOS
(Only, Not)
Components
Crossplatform Mac & Win
Server
Client
Old
Deprecated
Guides
Examples
Videos
New in version:
10.1
10.2
10.3
10.4
10.5
11.0
11.1
11.2
11.3
11.4
Statistic
FMM
Blog
Sets the rotation angle for the page in degrees.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
PDFKit | 2.9 | ✅ Yes | ❌ No | ❌ No | ✅ Yes, on macOS | ✅ Yes |
Parameter | Description | Example |
---|---|---|
A container value with the PDF content from a media field. Or a text with an URL. Or a PDF reference from PDFKit.Open. | ||
index | The index of the page. From zero to PDFKit.GetPDFPageCount-1. | 1 |
rotation | The new rotation value. | 90 |
Returns OK on success.
Rotate page and set title:
# open PDF from container
Set Variable [$ref; Value:MBS("PDFKit.OpenContainer"; combine pdf::result)]
# Set title for PDF
Set Variable [$result; Value:MBS("PDFKit.SetPDFAttribute"; $ref; "Title"; combine pdf::title)]
# Rotate first page by 90°
Set Variable [$result; Value:MBS("PDFKit.SetPDFPageRotation"; $ref; 0; 90)]
# save document to container
Set Field [combine pdf::result; MBS("PDFKit.GetPDFDocument"; $ref; "result.pdf")]
# free memory
Set Variable [$result; Value:MBS("PDFKit.Release"; $ref)]
Created 18th August 2014, last changed 25th April 2016
PDFKit.SetPDFPageDisplayAnnotation - PDFKit.SetPrintOption
Feedback: Report problem or ask question.