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

Optimize Method

Optimizes (reduce file size) a PDF file.

Sub Optimize(InputFileName As String,
             OutputFileName As String,
             [Password])

void Optimize(string InputFileName,
              string OutputFileName,
              string Password)

void Optimize(String InputFileName,
              String OutputFileName,
              String Password)

Parameters

Return Values

N/A.

Remarks

The file size increases whenever you modify a PDF file (even when you delete pages). When you are done modifying the PDF file, you can use this method to reduce the file size.

Example Usage

Set oProcessor = CreateObject("easyPDF.PDFProcessor.8")
 
' Delete page 1 and 2
oProcessor.DeletePages "input.pdf", "modified.pdf", 0, 1
 
' Rotate page 5
oProcessor.RotatePages "modified.pdf", "modified.pdf", 4, 4
 
' Optimize PDF file
oProcessor.Optimize "C:\test\modified.pdf", C:\test\optimized.pdf"