Apache PDFBox - Rotate Pages
π§ Operation Name
Apache PDFBox - Rotate Pages
rotatePages
π§Ύ Description
Rotates one or more pages in a PDF document clockwise by 90, 180, or 270 degrees. You can optionally limit the rotation to specific pages using a page range.
β
Inputs
PDF File [Binary]
InputStream (Binary)
β
The PDF file to rotate.
Degrees
Integer
β
The rotation angle: must be one of 90, 180, or 270.
Page Range
String
β (Optional)
A comma-separated list of pages and/or ranges to rotate (e.g., 1,3,5-6). If not provided, all pages will be rotated.
π€ Output
Payload:
InputStream(Binary) A new binary PDF stream with the specified pages rotated.Attributes:
PdfBoxFileAttributesIncludes original PDF metadata such as:numberOfPagestitle,author, etc.
π§ͺ MuleSoft Flow Example
Hereβs how to call this operation in a MuleSoft flow:
This example uses both Filter and Rotate as our test pdf is password protected so we use a filter to effectively make a copy

π Notes
Degrees must be one of:
90,180, or270. Other values will trigger a validation error.If
pageRangeis omitted, all pages will be rotated.Rotation is applied clockwise from the current orientation.
Useful for correcting scanned documents or preparing them for display.
Underlying Application Interface:
Last updated