BCL easyPDF SDK
easyPDF SDK Usermanual
PDF Creator Programming API  |  Download Free Trial  |  Contact Us to Purchase

RotatePages Method

Rotates one or more pages from a PDF file.

Sub RotatePages(From As Long,
                To As Long,
                Rotation As prcPageRotation)

void RotatePages(int From,
                 int To,
                 prcPageRotation Rotation)

void RotatePages(int From,
                 int To,
                 prcPageRotation Rotation) throws PDFProcessorException

Parameters

Return Values

N/A.

Remarks

The page number uses zero-based index, meaning that page number starts from 0.

Example Usage in VBScript

Set oProcessor = CreateObject("easyPDF.PDFProcessor.8")
Set oProcessorHandle = oProcessor.OpenFile("C:\test\input.pdf", "C:\test\input.pdf") 

' rotate first 5 pages by 90 degrees
oProcessorHandle.RotatePages 0, _
                             4, _
                             PRC_ROT_90_DEG
oProcessorHandle.Close

Example Usage in VB.NET

Dim oProcessor As PDFProcessor = New PDFProcessor

   Dim oProcessorHandle As PDFProcessorHandle = oProcessor.OpenFile("C:\test\input.pdf", "C:\test\input.pdf")
   oProcessorHandle.RotatePages(0, _
                                4, _
                                prcPageRotation.PRC_ROT_90_DEG)
oProcessorHandle.Close()

Example Usage in C#

 PDFProcessor oProcessor = new PDFProcessor();
 PDFProcessorHandle oProcessorHandle = oProcessor.OpenFile(@"C:\test\input.pdf", @"C:\test\input.pdf", null);
    oProcessorHandle.RotatePages(0, 
                                 4, 
                                 prcPageRotation.PRC_ROT_90_DEG);
 oProcessorHandle.Close();