Skip to main content

Rotate Page - Page Orientation API

PDF4me Rotate Page is a powerful enterprise-grade solution that rotates specific pages in PDF documents through advanced API integration. This comprehensive PDF page rotation service efficiently processes PDF documents, providing intelligent page selection, automated page rotation, document orientation management, and advanced PDF processing capabilities for enhanced document management and workflow optimization. The API processes page rotation by receiving source PDF documents through REST API calls, utilizing advanced page analysis algorithms and intelligent rotation processing for accurate page orientation and professional PDF processing. With comprehensive support for multiple rotation types, intelligent page selection, automated rotation processing, and professional PDF handling, this solution is ideal for document management, automated page rotation, PDF optimization, and enterprise workflows that require reliable page rotation with guaranteed accuracy and consistent output quality. Rotate Pages in PDF documents easily with API for advanced PDF processing and document orientation management.

Related Blog Posts
No blog post yet for this feature — coming soon.
In the meantime, browse the PDF4me blog for tutorials and workflows across every platform.
Visit the blog →

Authenticating Your API Request​

To access the PDF4me REST API, every request must include proper authentication credentials. Authentication ensures secure communication and validates your identity as an authorized user of the REST API.

Key Features​

  • Multiple Rotation Types: Support for various rotation angles and orientations
  • Flexible Page Selection: Rotate specific pages using page numbers and ranges
  • Intelligent Processing: Advanced algorithms for accurate page identification and rotation
  • Quality Preservation: Maintain PDF quality during page rotation operations
  • Seamless API Integration: RESTful API designed for automated PDF processing workflows and enterprise system integration

REST API Endpoint​

The PDF4me REST API uses standard HTTP methods to interact with resources. All page rotation operations are performed through a single endpoint:

  • Method: POST
  • Endpoint: /api/v2/RotatePage

Supported PDF Page Rotation Features​

The API provides comprehensive support for various PDF page rotation and orientation capabilities:

Rotation Types​

  • Multiple Angles: Support for 90°, 180°, and 270° rotation angles
  • Intelligent Processing: Advanced algorithms for accurate rotation processing
  • Quality Preservation: Maintain PDF quality during rotation operations
  • Professional Results: High-quality PDF processing with accurate rotation
  • Advanced Processing: Support for complex page structures and rotation requirements

Page Selection​

  • Flexible Selection: Choose specific pages or page ranges for rotation
  • Intelligent Processing: Advanced algorithms for accurate page identification
  • Multiple Formats: Support for various page selection formats and patterns
  • Professional Results: High-quality page analysis with accurate selection
  • Advanced Processing: Support for complex page structures and selection requirements

Document Orientation​

  • Orientation Management: Manage document orientation and page alignment
  • Quality Preservation: Maintain PDF quality during orientation changes
  • Professional Results: High-quality PDF processing with accurate orientation
  • Advanced Processing: Support for complex document structures and orientation requirements

REST API Parameters​

Complete list of parameters for the Rotate Page REST API. Parameters are organized by category for better understanding and implementation.

Important: Parameters marked with an asterisk (*) are required and must be provided for the API to function correctly.

ParameterRequiredWhat it doesExample
jobIdExtOptionalYour own reference for this call. It is stored with the API call log so you can correlate calls with your jobs. Type: string.
integrationsOptionalIntegration identifiers, forwarded unchanged with the job's notification settings. Type: array.
isAsyncOptionalSet to `true` to process the action asynchronously and get a job to poll at `/api/v2/GetActionStatus`. Only honoured by actions that support asynchronous processing. Type: boolean.
docNameOptionalSource file name including its extension. Several actions dispatch on the extension, so it should always be set; when omitted a per-action default is used. Type: string.document.pdf
docContentRequiredThe source file. Accepts the base64-encoded file content, a `pdf4meblobid://<id>` reference to a previously uploaded blob, or an `https` URL to the source document. Required: an empty value fails with `File is empty`. Type: string.JVBERi...
docContentBytesOptionalAlternative raw byte payload for the source file. Type: string.
callBackUrlOptionalOptional URL notified when an asynchronous job completes. Type: string.
rotationTypeOptionalAn unrecognised value is rejected with 400. Type: string.90
pageOptionalRequired. Number of the single page to rotate, e.g. `2`. A missing or non-positive value is rejected with 400 (`Invalid Page Number`). Type: string.

Output​

The PDF4me Rotate Page REST API returns a response that can be viewed in multiple formats. Choose the view that best fits your needs:

JSON Response Format

The raw JSON response from the API:

{
"File Content": "Output file content from the PDF4me action",
"File Name": "Output file name from the PDF4me action"
}

Request Example​

Content-Type: application/json
Authorization: YOUR_API_KEY

Note: Get your API key from the PDF4me Dashboard

Payload​

{
"docContent": "Please put PDF base64 content",
"docName": "document.pdf",
"rotationType": "90",
"pages": "1,3,5"
}

Code Samples​

The PDF4me Rotate Page REST API provides code samples in multiple programming languages. Choose the language that best fits your development environment:

C# (CSharp) Sample

Complete C# implementation for page rotation:

PDF Page Rotation Features​

Rotation Types​

  • Multiple Angles: Support for 90°, 180°, and 270° rotation angles
  • Intelligent Processing: Advanced algorithms for accurate rotation processing
  • Quality Preservation: Maintain PDF quality during rotation operations
  • Professional Results: High-quality PDF processing with accurate rotation
  • Advanced Processing: Support for complex page structures and rotation requirements

Page Selection​

  • Flexible Selection: Choose specific pages or page ranges for rotation
  • Intelligent Processing: Advanced algorithms for accurate page identification
  • Multiple Formats: Support for various page selection formats and patterns
  • Professional Results: High-quality page analysis with accurate selection
  • Advanced Processing: Support for complex page structures and selection requirements

Document Orientation​

  • Orientation Management: Manage document orientation and page alignment
  • Quality Preservation: Maintain PDF quality during orientation changes
  • Professional Results: High-quality PDF processing with accurate orientation
  • Advanced Processing: Support for complex document structures and orientation requirements

Industry Use Cases & Applications​

Use Cases

  • Document Orientation: Correct page orientation in scanned documents
  • Print Management: Rotate pages for proper printing and presentation
  • Archive Management: Correct orientation in archived documents
  • Content Management: Rotate pages in content management systems
  • Workflow Automation: Automate page rotation workflows for enterprise operations
  • Batch Processing: Process large volumes of PDFs with automated page rotation
  • Document Processing: Rotate pages for better presentation and usability
  • Content Distribution: Rotate pages for proper content distribution and sharing

Get Help​