Class: Optimizer

PDFNet. Optimizer


new Optimizer()

The Optimizer class provides functionality for optimizing/shrinking output PDF files. 'pdftron.PDF.Optimizer' is an optional PDFNet Add-On utility class that can be used to optimize PDF documents by reducing the file size, removing redundant information, and compressing data streams using the latest in image compression technology. PDF Optimizer can compress and shrink PDF file size with the following operations: - Remove duplicated fonts, images, ICC profiles, and any other data stream. - Optionally convert high-quality or print-ready PDF files to small, efficient and web-ready PDF. - Optionally down-sample large images to a given resolution. - Optionally compress or recompress PDF images using JBIG2 and JPEG2000 compression formats. - Compress uncompressed streams and remove unused PDF objects.

Classes

ImageSettings
MonoImageSettings
OptimizerSettings
TextSettings

Methods


<static> createImageSettings()

Method to create an ImageSettings object
Returns:
A promise that resolves to a PDFNet.Optimizer.ImageSettings.
Type
Promise.<PDFNet.Optimizer.ImageSettings>

<static> createMonoImageSettings()

Method to create an MonoImageSettings object
Returns:
A promise that resolves to a PDFNet.Optimizer.MonoImageSettings.
Type
Promise.<PDFNet.Optimizer.MonoImageSettings>

<static> createOptimizerSettings()

Method to create an OptimizerSettings object
Returns:
A promise that resolves to a PDFNet.Optimizer.OptimizerSettings.
Type
Promise.<PDFNet.Optimizer.OptimizerSettings>

<static> createTextSettings()

Method to create an TextSettings object
Returns:
A promise that resolves to a PDFNet.Optimizer.TextSettings.
Type
Promise.<PDFNet.Optimizer.TextSettings>

<static> optimize(doc [, optimizerSettings])

Optimize the given document using the optimizers settings
Parameters:
Name Type Argument Description
doc PDFNet.PDFDoc | PDFNet.SDFDoc | PDFNet.FDFDoc the document to optimize
optimizerSettings Object <optional>
the settings for the optimizer
Returns:
Type
Promise.<void>