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.

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



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



def RotatePages(self, From, To, Rotation)



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

function RotatePages($From, $To, $Rotation) 



BclPrcResult RotatePages(BclPDFProcessorHandle* pHandle,
                         int From,
                         int To,
                         BclPrcPageRotation Rotation);
Sub RotatePages(From As Long, _
                To As Long, _
                Rotation As prcPageRotation)

bepproc +Rotate [-angle 0|90|180|270|clockwise|counterclockwise|anticlockwise|upsidedown]
                [-pages <from>-<to> | -page <int>]


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();