DL Logo

PDDoc Enumerations

PDDocEmbedFontFlags

Header: DLExtrasExpT.h:50

Description

Flags for PDDocEmbedFonts.

Enum Constants

kDocEmbedSubset=0x01
Fonts will be subset when embedded. Otherwise the entire font will be embedded. Full fonts should only be embedded if the information in the fonts indicates it can be used for editible embedding. Fonts that have more than 2048 characters will be subset embedded regardless of the setting of this flag. This flag implies a scan of the document text to ensure that all required characters are in the subset.
kDocEmbedSubsetOfEmbeddedFont=0x02
If set, fonts that have already been embedded but are not subset fonts, will be reembedded as a subset font. If clear, already embedded fonts will not be re-scanned for embedding at all, subset or no.

PDFOptimizationCompressQuality

Header: DLExtrasExpT.h:106

Description

Compression quality options

Enum Constants

PDFOptimizerCompressQualityUnset=0
PDFOptimizerCompressMinimum
PDFOptimizerCompressLowQuality
PDFOptimizerCompressMediumQuality
PDFOptimizerCompressHighQuality
PDFOptimizerCompressMaximumQuality
PDFOptimizerCompressLossless

Used By

PDFOptimizerCompressImageType

Header: DLExtrasExpT.h:117

Description

Image types for PDFOptimizer compression

Enum Constants

PDFOptimizerColor=1
Compress colored images
PDFOptimizerGray
Compress Gray scale Images
PDFOptimizerMonochrome
Compress B/W images

Used By

PDFOptimizerCompressionType

Header: DLExtrasExpT.h:84

Description

types of compression for PDFOptimizer

Enum Constants

PDFOptimizerRecompressNone=0
Used only when original image is not compressed
PDFOptimizerRecompressSame
Compress using the same compression
PDFOptimizerRecompressFlate
Compress image using Flate
PDFOptimizerRecompressJpeg
Compress image using Jpeg
PDFOptimizerRecompressJP2k
Compress image using JPEG2000
PDFOptimizerRecompressJBig
Compress image using JBig2
PDFOptimizerRecompressCCITTG4
Compress image using CCITTG4
PDFOptimizerRecompressCCITTG3
Compress image using CCITTG3
PDFOptimizerRecompressFlateJpeg
Compress using Flate and Jpeg

Used By

Used In

PDFOptimizerObjectCompressionType

Header: DLExtrasExpT.h:127

Description

Object Compression types for PDFOptimizer

Enum Constants

PDFOptimizerObjectCompressionAll=0
Compress all objects.
PDFOptimizerObjectCompressionNone
No object compression is used.
PDFOptimizerObjectCompressionStructure
Compress objects related to Logical Structure of a document.
PDFOptimizerObjectCompressionLeaveUnchanged
Leave object compression unchanged.

Returned From

Used By

PDFOptimizerOption

Header: DLExtrasExpT.h:143

Description

PDFOptimizer Options

Enum Constants

PDFOptimizerDownsampleColor=1
Defaults to ON
PDFOptimizerRecompressColor
Defaults to ON
PDFOptimizerDownsampleGray
Defaults to ON
PDFOptimizerRecompressGray
Defaults to ON
PDFOptimizerDownsampleBW
Defaults to ON
PDFOptimizerRecompressBW
Defaults to ON
PDFOptimizerDownsampleRecompressOnlyIfSmaller
Defaults to ON
PDFOptimizerDiscardAlternateImages
Defaults to ON
PDFOptimizerSubsetAllEmbeddedFonts
Defaults to ON
PDFOptimizerRemoveAllEmbeddedFonts
Defaults to OFF
PDFOptimizerRemoveAllBase14Fonts
Defaults to ON
PDFOptimizerMergeDuplicateFonts
Defaults to ON
PDFOptimizerDiscardBookmarks
Defaults to OFF
PDFOptimizerDiscardAcroforms
Defaults to OFF
PDFOptimizerDiscardOutputIntent
Defaults to ON
PDFOptimizerDiscardThumbnails
Defaults to ON
PDFOptimizerDiscardPageLabels
Defaults to ON
PDFOptimizerDiscardNameTrees
Defaults to ON
PDFOptimizerDiscardStructureTrees
Defaults to ON
PDFOptimizerDiscardFileAttachments
Defaults to ON
PDFOptimizerDiscardXMPPadding
Defaults to ON Remove padding from XMP Metadata
PDFOptimizerDiscardUnusedForms
Defaults to ON
PDFOptimizerDiscardPieceData
Defaults to ON
PDFOptimizerCompressStreams
Defaults to ON, indicates if Uncompressed Streams will be compressed when possible.
PDFOptimizerReplaceLZW
Defaults to ON
PDFOptimizerDiscardMetadata
Defaults to ON
PDFOptimizerDiscardDocumentInfo
Defaults to ON
PDFOptimizerOptimizeContentStreams
Defaults to ON
PDFOptimizerLinearize
Defaults to OFF
PDFOptimizerDiscardDuplicateForms
Defaults to OFF
PDFOptimizerDiscardDuplicateObjects
Defaults to ON
PDFOptimizerDiscardASCIIFilters
Defaults to ON
PDFOptimizerDiscardComments
Defaults to OFF
PDFOptimizerDiscardAnnotations
Defaults to OFF
PDFOptimizerDiscardJavaScriptActions
Defaults to OFF
PDFOptimizerFlattenOptionalContent
Defaults to OFF
PDFOptimizerResubsetSubsetFonts
Defaults to ON. The related option PDFOptimizerSubsetAllEmbeddedFonts must be Enabled for this option to have an effect. Fonts which are already Embedded Subset will be Re-subset. If the document being optimized represents an extraction of pages from a larger document, or if the document has been edited to remove Content, this can result in savings. NOTE: This can ONLY remove glyphs from an already subset font. It doesn't add missing glyphs.
PDFOptimizerDownConvert16To8BpcImages
Defaults to ON
PDFOptimizerDiscardUnusedImages
Defaults to ON
PDFOptimizerDiscardUnusedFonts
Defaults to ON
PDFOptimizerIncludeIndexedImages
Defaults to ON. Controls if Indexed images are eligible for compression and downsampling or not. When true, if possible, Indexed images are recompressed and/or downsampled. When false, Indexed images aren't recompressed or downsampled.
PDFOptimizerDoNotPersistFileAttributes
Defaults to OFF
PDFOptimizerLastOption

Used By

PDDoc Typedefs

PDFOptimizationParams

Header: DLExtrasExpT.h:246

Description

An opaque type collecting together the PDFOptimizerOption parameters for PDDocumentOptimize.

Syntax

typedef struct _t_PDFOptimizationParamsRec *PDFOptimizationParams;

Returned From

Used By

PDDoc Structures

OptimizedFont

Header: DLExtrasExpT.h:293

Description

Structure representing an Optimized Font.

Syntax

struct OptimizedFont {
ASAtom name;
The name of the Font.
ASInt32 previousSizeInBytes;
The size of the Embedded Font file in bytes prior to Optimization.
ASInt32 currentSizeInBytes;
The size of the Embedded Font file in bytes after Optimization.
CosObj fontObj;
The Font object.
ASBool reSubset;
This font was re-subset during Optimization.
} OptimizedFontRec, *OptimizedFont;

Used In

OptimizedImage

Header: DLExtrasExpT.h:277

Description

Structure representing an Optimized Image.

Syntax

struct OptimizedImage {
ASInt32 previousDPI;
The DPI of the Image prior to Optimization.
ASInt32 currentDPI;
The DPI of the Image after Optimization, this may be unchanged from the value prior to Optimization if downsampling was not used.
PDFOptimizerCompressionType previousCompression;
The compression of the Image prior to Optimization.
PDFOptimizerCompressionType currentCompression;
The compression of the Image prior to Optimization.
ASInt32 previousSizeInBytes;
The size of the Image in bytes prior to Optimization.
ASInt32 currentSizeInBytes;
The size of the Image in bytes after Optimization.
} OptimizedImageRec, *OptimizedImage;

Used In

PDDocTextFinderConfig

Header: DLExtrasExpT.h:392

Description

Structure representing configuration options for DocTextFinder.

Syntax

struct PDDocTextFinderConfig {
ASSize_t recSize;
This is always sizeof(PDDocTextFinderConfigRec).
ASBool preserveLineBreaks;
If true, inserts \n chars instead of spaces wherever ends of lines are detected within extracted text.
} PDDocTextFinderConfigRec, *PDDocTextFinderConfig;

Used By

PDFOptimizerReport

Header: DLExtrasExpT.h:307

Description

Structure representing data reported from the optimization process.

Syntax

struct PDFOptimizerReport {
ASInt32 size;
Size of the structure.
OptimizedImage **colorImages;
The Color Images Optimized in the document.
ASInt32 colorImagesCount;
The number of Color Images Optimized in the document.
OptimizedImage **grayImages;
The Gray Images Optimized in the document.
ASInt32 grayImagesCount;
The number of Gray Images Optimized in the document.
OptimizedImage **monochromeImages;
The Monochrome Images Optimized in the document.
ASInt32 monochromeImagesCount;
The number of Monochrome Images Optimized in the document.
OptimizedFont **fonts;
The Fonts Optimized in the document.
ASInt32 fontCount;
The number of Fonts Optimized in the document.
ASBool bookmarksRemoved;
Bookmarks (outlines) were removed from the document.
ASBool acroFormsRemoved;
AcroForms were removed from the document.
ASBool outputIntentsRemoved;
Output Intents were removed from the document.
ASBool pageLabelsRemoved;
Page Labels were removed from the document.
ASBool nameTreesRemoved;
Name Trees were removed from the document.
ASBool structureTreeItemsRemoved;
The Structure Tree items were removed from the document.
ASBool optionalContentFlattened;
Optional Content in the document was Flattened.
ASBool linearizationApplied;
Linearization was applied to the document.
ASInt32 pagesWithPieceDataRemoved;
The number of Pages with PieceData removed from the document.
ASInt32 pagesWithAttachmentsRemoved;
The number of Pages with Attachments removed from the document.
ASInt32 pagesWithCommentsRemoved;
The number of Pages with Comments removed from the document.
ASInt32 pagesWithAnnotationsRemoved;
The number of Pages with Annotations removed from the document.
ASInt32 pagesWithThumbnailsRemoved;
The number of Pages with Thumbnails removed from the document.
ASInt32 unusedFormsRemoved;
The number of Unused Form XObjects removed from the document.
ASInt32 unusedImagesRemoved;
The number of Unused Image XObjects removed from the document.
ASInt32 unusedFontsRemoved;
The number of Unused Fonts removed from the document.
ASInt32 itemsWithMetadataRemoved;
The number of items with Metadata streams removed from the document.
ASInt32 itemsWithDocInfoRemoved;
The number of items of Document Info removed from the document.
ASInt32 javaScriptActionsRemoved;
The number of JavaScript Actions removed from the document.
ASInt32 alternateImagesRemoved;
The number of Alternate Images removed from the document.
ASInt32 images16BPCConvertedTo8BPC;
The number of 16 BPC images converted to 8 BPC in the document.
ASBool resubsetOfSubsetFontsAttemped;
Resubsetting of already subset Fonts was attemped.
ASInt32 fullyEmbeddedFontsNowSubset;
The number of fully Embedded Fonts subset in the document.
ASInt32 subsetFontsNowReSubset;
The number of subset Fonts re-subset in the document.
ASInt32 fullyEmbeddedFontsRemoved;
The number of fully Embedded Fonts removed from the document.
ASInt32 base14FullyEmbeddedFontsRemoved;
The number of Base 14 Fully Embedded fonts removed from the document.
} PDFOptimizerReportRec, *PDFOptimizerReport;

Used By

PDDoc Functions

PDDocDeletePagesEx

Header: DLExtrasProcs.h:909

Description

Deletes the specified pages.

Syntax

void PDDocDeletePagesEx(IN PDDoc doc, ASInt32 firstPage, ASInt32 lastPage, ProgressMonitor progMon, void *progMonClientData, PDPageDeleteFlags flags);

Parameters

doc
The document from which pages are deleted.
firstPage
The page number of the first page to delete. The first page is 0.
lastPage
The page number of the last page to delete.
progMon
A progress monitor. Use AVAppGetDocProgressMonitor() to obtain the default progress monitor. NULL may be passed, in which case no progress monitor is used.
progMonClientData
A pointer to user-supplied datapassed to progMon each time it is called. It should be NULL if progMon is NULL.
flags
Page Deletion flags that can be used to modify the how the deletion process works.

PDDocEmbedFonts

Header: DLExtrasProcs.h:198

Description

Routine to embed unembedded fonts in a document.

Note: If the font has information indicating that it cannot be embedded for print and preview, the font will not be embedded in the document.

Syntax

void PDDocEmbedFonts(PDDoc doc, ASUns32 flags, ASStatusMonitorProcs statusMon);

Parameters

doc
PDDoc to operate on. The fonts will be embedded in this document. To keep the changes the document must be saved. Fonts on the user's system that match the original font definition will be embedded. For the Times Roman and Helvetica and corresponding styles, if displayed with a font alias, then the font alias will be embedded in the file. If the font has information that indicates the font cannot be embedded for print and preview, the font will not be embedded in the document.
flags
One of the following:
If set fonts will be subset when embedded. Otherwise the entire font will be embedded. Full fonts should only be embedded if the information in the fonts indicates it can be used for editible embedding. Fonts that have more than 2048 characters will be subset embedded regardless of the setting of this flag.
If set, fonts that have already been embedded but are not subset fonts, will be reembedded as a subset font.
statusMon
Pointer to a record containing a Progress Monitor, Cancel procedure, and report procedure. The procedures in the progress monitor are called to indicate the progress of the routine. The cancel procedure is called periodically to allow the client to cancel the routine. If the cancel procedure returns false then the routine is canceled. The report procedure will be called to report errors or warnings while embedding the fonts. For each font that cannot be embedded, the report procedure will be called.

PDDocEmbedFontsFromFontArray

Header: DLExtrasProcs.h:241

Description

Routine to embed fonts in a document. This will embed only the fonts listed in an array. The parameters to this routine are them same as described for PDDocEmbedFonts. With the exception of the additional fonts and nFonts parameters described below.

Note: If the font has information indicating that it cannot be embedded for print and preview, then the font will not be embedded in the document.

Related Methods

Syntax

void PDDocEmbedFontsFromFontArray(PDDoc doc, const PDFont *fonts, ASUns32 nFonts, ASUns32 flags, ASStatusMonitorProcs statusMon);

Parameters

doc
PDDoc to operate on. The fonts will be embedded in this document. To keep the changes the document must be saved. Fonts on the user's system that match the original font definition will be embedded. For the Times Roman and Helvetica and corresponding styles, if displayed with a font alias, then the font alias will be embedded in the file. If the font has information that indicates the font cannot be embedded for print and preview, then the font will not be embedded in the document.
fonts
An array of PDFont containing fonts to be embedded.
nFonts
The number of fonts in the fonts array.
flags
One of the following:
If set fonts will be subset when embedded. Otherwise the entire font will be embedded. Full fonts should only be embedded if the information in the fonts indicates it can be used for editible embedding. Fonts that have more than 2048 characters will be subset embedded regardless of the setting of this flag.
If set, fonts that have already been embedded but are not subset fonts, will be reembedded as a subset font.
statusMon
Pointer to a record containing a Progress Monitor, Cancel procedure, and report procedure. The procedures in the progress monitor are called to indicate the progress of the routine. The cancel procedure is called periodically to allow the client to cancel the routine. If the cancel procedure returns false then the routine is canceled. The report procedure will be called to report errors or warnings while embedding the fonts. For each font that cannot be embedded, the report procedure will be called.

PDDocFlattenAcroFormFieldsAsIfPrinted

Header: DLExtrasProcs.h:1506

Description

Flatten a AcroForms Document as if printed. Flattening transforms the document into static PDF page content. All AcroForm fields are removed. The Flattened appearance will take into consideration how the document's appearance should look when printed.

Syntax

void PDDocFlattenAcroFormFieldsAsIfPrinted(PDDoc doc);

Parameters

doc
IN/OUT The PDF document object.

PDDocHasSignature

Header: DLExtrasProcs.h:802

Description

Determines if the document contains a digital signature.

Syntax

ASBool PDDocHasSignature(PDDoc pdDoc);

Parameters

pdDoc
The document.

Returns

If the document has a digital signature.

PDDocOptimizeDefaultParams

Header: DLExtrasProcs.h:652

Description

This will create a set of optimization parameters, set to the default values. These can be examined using "get" methods, and changed with the "set" methods

When these parameters are no longer needed (after the call to PDDocumentOptimize, although they be re-used any number of times), they should be freed by the method PDDocOptimizeReleaseParams.

Syntax

PDFOptimizationParams PDDocOptimizeDefaultParams(void);

Returns

initialized optimization parameters that can be further modified.

PDDocOptimizeGetImageRecompress

Header: DLExtrasProcs.h:736

Description

This will return the values set for one of the three cases of Image Recompression and Downsampling. These values are used in deciding which Images from the set of all Images in the document will be modified by the Optimizer.

Syntax

void PDDocOptimizeGetImageRecompress(PDFOptimizationParams Params, PDFOptimizerCompressImageType imageType, ASInt16 *recompressIfAbove, ASInt16 *recompressTo, PDFOptimizerCompressionType *compressType, PDFOptimizationCompressQuality *compressQuality);

Parameters

Params
IN a PDFOptimizationParams object to be checked
imageType
OUT The class of Images these parameters are to refer to.
recompressIfAbove
OUT The lower limit of resolution (In DPI) of an Image to be Resampled.
recompressTo
OUT The target DPI for Resampling. Images which are Resampled will be changed to this resolution.
compressType
OUT a member of the enumeration PDFOptimizerCompressionType.
compressQuality
OUT a member of the enumeration PDFOptimizationCompressQuality

PDDocOptimizeGetObjectCompression

Header: DLExtrasProcs.h:677

Description

This will get the type of compression used for objects.

Syntax

PDFOptimizerObjectCompressionType PDDocOptimizeGetObjectCompression(PDFOptimizationParams params);

Parameters

params
the PDFOptimizationParams object from which the compression type will be read from.

Returns

PDFOptimizerObjectCompressionType

PDDocOptimizeGetOption

Header: DLExtrasProcs.h:758

Description

This will return the setting of an optimization option.

Syntax

ASBool PDDocOptimizeGetOption(PDFOptimizationParams Params, PDFOptimizerOption option);

Parameters

Params
IN. A PDFOptimizationParams object to be checked
option
IN. A member of the enumeration PDFOptimizerOption, selecting which option to effect.

Returns

If true, the associated option is ON. If false, the option is OFF.

PDDocOptimizeGetPDFOutputLevel

Header: DLExtrasProcs.h:697

Description

Gets the output level for the optimized pdf.

Syntax

void PDDocOptimizeGetPDFOutputLevel(PDFOptimizationParams params, ASInt16 *majorP, ASInt16 *minorP);

Parameters

Params
majorP
(Filled by method) The major version number.
minorP
(Filled by method) The minor version number.

PDDocOptimizeReleaseParams

Header: DLExtrasProcs.h:659

Description

This will completely free the resources used by a PDFOptimizationParams structure.

Syntax

void PDDocOptimizeReleaseParams(PDFOptimizationParams params);

Parameters

params
the PDFOptimizationParams to free.

PDDocOptimizeSetImageRecompress

Header: DLExtrasProcs.h:718

Description

This will set the value for one of the cases of Image Recompression and Downsampling. These values are used in deciding which Images from the set of all Images in the document will be modified by the Optimizer.

Syntax

void PDDocOptimizeSetImageRecompress(PDFOptimizationParams Params, PDFOptimizerCompressImageType imageType, ASInt16 recompressIfAbove, ASInt16 recompressTo, PDFOptimizerCompressionType compressType, PDFOptimizationCompressQuality compressQuality);

Parameters

Params
IN a PDFOptimizationParams object to be modified
imageType
IN The class of Images these parameters are to refer to. This is a member of the Enumeration PDFOptimizerCompressImageType and is one of the set of values "Color", "Gray", or "Monochrome" (B/W).
recompressIfAbove
IN The lower limit of resolution (In DPI) of an Image to be Resampled. Only Images above this limitation will be considered for Resampling.
recompressTo
IN The target DPI for Resampling. Images which are Resampled will be changed to this resolution.
compressType
IN a member of the enumeration PDFOptimizerCompressionType. Images which are either Resampled or Recompressed will be written in this compression type. If the value of this enumeration is either the specifier for "Same", or for "None", then we will not Recompress images which do not require Downsampling.
compressQuality
IN a member of the enumeration PDFOptimizationCompressQuality. NOTE that this enumeration is only meaningful for lossy compression techniques. Note also that it is an error to specify "Lossless" for techniques that cannot support lossless compression.

PDDocOptimizeSetObjectCompression

Header: DLExtrasProcs.h:668

Description

This will set the type of compression used for objects.

Syntax

void PDDocOptimizeSetObjectCompression(PDFOptimizationParams params, PDFOptimizerObjectCompressionType compressionType);

Parameters

params
a PDFOptimizationParams object to be modified.
compressionType
The type of compression to apply to the document.

PDDocOptimizeSetOption

Header: DLExtrasProcs.h:749

Description

This will set one the optimzation option either ON or OFF.

Related Methods

Syntax

void PDDocOptimizeSetOption(PDFOptimizationParams Params, PDFOptimizerOption option, ASBool OnOff);

Parameters

Params
IN. A PDFOptimizationParams object to be modified
option
IN. A member of the enumeration PDFOptimizerOption, selecting which option to effect.
OnOff
IN. If true, set the associated option as ON. If false, set it as OFF.

PDDocOptimizeSetPDFOutputLevel

Header: DLExtrasProcs.h:687

Description

Sets the output level for the optimized pdf.

Syntax

void PDDocOptimizeSetPDFOutputLevel(PDFOptimizationParams params, ASInt16 majorP, ASInt16 minorP);

Parameters

Params
IN a PDFOptimizationParams object to be modified.
majorP
The major version number.
minorP
The minor version number.

PDDocRemoveAttachment

Header: DLExtrasProcs.h:1514

Description

Removes a PDF attachment that matches the specified name.

Syntax

void PDDocRemoveAttachment(PDDoc doc, char *attachmentNameToRemove);

Parameters

doc
IN The PDF document object.
attachmentNameToRemove
IN The attachment name to remove, this should be a null terminated string.

PDDocReplaceUnembeddedSimpleFonts

Header: DLExtrasProcs.h:862

Description

NOTE: This method should only be used by advanced users. It is useful for applications that need to define precise font substitutions for unembedded fonts rather than relying on the PDF Viewer to find a suitable font on the local system. If you choose a new font replacement that is not similar to the font being replaced, in terms of encoding, metrics, and glyphs, your result may appear distorted or incorrect in a variety of ways. The user must take care when selecting a replacement font. This method replaces Simple (not Type 0 or Composite), Unembedded, non-subset Fonts with a different font. NOTE: Fonts that lack required dictionary entries (e.g. /FontDescriptor) will have default ones created.

Syntax

void PDDocReplaceUnembeddedSimpleFonts(PDDoc doc, ASAtom *currentFontNames, ASAtom *newFontNames, ASUns32 fontNamesLength);

Parameters

doc
IN a PDDoc object (Required)
currentFontNames
IN The names of the fonts to be replaced (Required)
newFontNames
IN The names of the new fonts (Required)
fontNamesLength
IN The number of current font names and the number of new font names (they have to be the same) (Required)

PDDocWillNeedIncrementalSave

Header: DLExtrasProcs.h:810

Description

Determines if the document must be saved incrementally.

Syntax

ASBool PDDocWillNeedIncrementalSave(PDDoc pdDoc);

Parameters

pdDoc
The document.

Returns

If the document requires an Incremental save.

PDDocumentOptimize

Header: DLExtrasProcs.h:637

Description

This function is used to create an optimized document. The types of Optimization performed depend on the optimization parameters. The result of optimization is a new document, saved to a file.

Syntax

ASBool PDDocumentOptimize(PDDoc InputDoc, ASPathName OutputPath, ASFileSys fileSys, PDFOptimizationParams params, ProgressMonitor progMon, void *progMonClientData, ASCancelProc cancelProc, void *cancelProcClientData);

Parameters

InputDoc
IN a PDDoc object (Required)
OutputPath
IN an ASFilePath where the optimized document is to be written (Required)
OutputFileSys
IN a FileSys to write the document to (May be NULL, in which case default file sys will be used)
OptimizationParams
IN a reference to a OptimizationParamsRec structure, used to control optimization. (Required)
ProgMon
IN an optional progress monitor
progMonClientData
IN An optional pointer to client data used by the progress monitor.
cancelProc
IN an optional pointer to a cancel procedure
cancelProcClientData
IN an optional pointer to cancel proc client data

Returns

true if a optimized document is created, false if a document is not created.

PDDocumentOptimizeWithReport

Header: DLExtrasProcs.h:842

Description

This facility is used to create an optimized copy of the original document. Optimization can be in many specific forms, controlled by control records input to the optimizer. The result of optimization is always a new document, saved to a file. This is because some of the optimizations are done at Document save time.

Syntax

ASBool PDDocumentOptimizeWithReport(PDDoc InputDoc, ASPathName OutputPath, ASFileSys fileSys, PDFOptimizationParams params, ProgressMonitor progMon, void *progMonClientData, ASCancelProc cancelProc, void *cancelProcClientData, PDFOptimizerReport report);

Parameters

InputDoc
IN a PDDoc object (Required)
OutputPath
IN an ASFilePath where the optimized document is to be written (Required)
OutputFileSys
IN a FileSys to write the document to (May be NULL, in which case default file sys will be used)
OptimizationParams
IN a reference to a OptimizationParamsRec structure, used to control optimization. (Required)
ProgMon
IN an optional progress monitor
progMonClientData
IN An optional pointer to client data used by the progress monitor
cancelProc
IN an optional pointer to a cancel procedure
cancelProcClientData
IN an optiona pointer to cancel proc client data
report
OUT an PDFOptimizerReport that will be filled by the method

Returns

true if a optimized document is created, false if a document is not created