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

CropBox Method

Automatically crops the contents of all pages.

Sub CropBox(InputFileName As String,
            OutputFileName As String,
            CropState As prcCropState,
            CropMarginX As Double,
            CropMarginY As Double)

void CropBox(string InputFileName,
             string OutputFileName,
             prcCropState CropState,
             double CropMarginX,
             double CropMarginY)

void CropBox(String InputFileName,
             String OutputFileName,
             prcCropState CropState,
             double CropMarginX,
             double CropMarginY) throws PDFProcessorException

Parameters

Return Values

N/A.

Remarks

The ability to specify the number of inches of whitespace to leave in the margin works only so long as existing space in the input PDF is being removed. Adding space to the margin is not a cropping operation and is not supported.

Example Usage

Set oProcessor = CreateObject("easyPDF.PDFProcessor.8")
oProcessor.CropBox "C:\test\input.pdf", C:\test\output.pdf", PRC_CROP_AS_CROP_BOX, 0.5, 0.5