PDF SDK Documentation

Comprehensive Guide for Developers: Features, Integration, and API Reference

Loading...
Searching...
No Matches
document_optimizer.h File Reference

The PDF Document Optimizer API. More...

#include <pdfsdk/core.h>

Go to the source code of this file.

Classes

struct  PDFOptimizeOptions
 Options for the optimization process. More...
 

Macros

#define PDF_DOCOPTIMIZER_API   PDFSDK_IMPORT_
 

Typedefs

typedef uint32_t PDFOptimizeFlags
 Flags that control the optimization process.
 

Enumerations

enum  PDFOptimizeFlagsBits {
  kPDFOptimizeRemoveHiddenObjects = 1 << 0 , kPDFOptimizeDownsampleImages = 1 << 1 , kPDFOptimizeRemoveMetadata = 1 << 2 , kPDFOptimizeRemoveStructTree = 1 << 3 ,
  kPDFOptimizeRemoveAttachments = 1 << 4 , kPDFOptimizeRemoveBookmarks = 1 << 5 , kPDFOptimizeRemoveAcroform = 1 << 6 , kPDFOptimizeRemoveOCProperties = 1 << 7 ,
  kPDFOptimizeRemoveAnnotations = 1 << 8 , kPDFOptimizeRemoveOpenActions = 1 << 9 , kPDFOptimizeRemoveJavaScript = 1 << 10 , kPDFOptimizeRemoveInfo = 1 << 11
}
 Flags that control the optimization process. More...
 

Functions

PDFSDK_IMPORT_ PDErrCode PDFSDK_CALLCONV PDFOptimizeDocument (PDDoc sourceDoc, const wchar_t *destPath, const PDFOptimizeOptions *options, const PDProgressMonitor *progress, void *progressData)
 Optimizes the specified document and saves it to the specified path.
 

Detailed Description

The PDF Document Optimizer API.

The PDF Document Optimizer API provides functionality to optimize PDF documents. The API allows you to remove hidden objects, downsample images, remove metadata, and more.

Typedef Documentation

◆ PDFOptimizeFlags

typedef uint32_t PDFOptimizeFlags

Flags that control the optimization process.

See also
PDFOptimizerFlagsBits

Enumeration Type Documentation

◆ PDFOptimizeFlagsBits

Flags that control the optimization process.

Enumerator
kPDFOptimizeDownsampleImages 

Remove hidden objects.

kPDFOptimizeRemoveMetadata 

Downsample images.

kPDFOptimizeRemoveStructTree 

Remove metadata.

kPDFOptimizeRemoveAttachments 

Remove structure tree.

kPDFOptimizeRemoveBookmarks 

Remove attachments.

kPDFOptimizeRemoveAcroform 

Remove bookmarks.

kPDFOptimizeRemoveOCProperties 

Remove AcroForm.

kPDFOptimizeRemoveAnnotations 

Remove optional content properties.

kPDFOptimizeRemoveOpenActions 

Remove annotations.

kPDFOptimizeRemoveJavaScript 

Remove open actions.

kPDFOptimizeRemoveInfo 

Remove JavaScript.

Function Documentation

◆ PDFOptimizeDocument()

PDFSDK_IMPORT_ PDErrCode PDFSDK_CALLCONV PDFOptimizeDocument ( PDDoc sourceDoc,
const wchar_t * destPath,
const PDFOptimizeOptions * options,
const PDProgressMonitor * progress,
void * progressData )

Optimizes the specified document and saves it to the specified path.

Parameters
sourceDocThe document to optimize.
destPathThe path to save the optimized document.
optionsThe options for the optimization process.
progressThe progress monitor for the optimization process (optional).
progressDataThe user data for the progress monitor.
Returns
A PDErrCode error code.