DL Logo

pdflattener Enumerations

PDFlattenerColorCompSet

Header: PDFlattenerExpT.h:27

Description

Enumeration for setting compression scheme for flattened color images.

Value options for ACSwatchBook.

Enum Constants

kPDFlattenerJpegCompression
kPDFlattenerZipCompression
kPDFlattenerJpeg2000Compression

Used In

PDFlattenerGrayscaleCompSet

Header: PDFlattenerExpT.h:36

Description

Enumeration for setting the compression scheme for the Flattened Grayscale images.

Enum Constants

kPDFlattenerGrayJpegCompression
kPDFlattenerGrayZipCompression
kPDFlattenerGrayJpeg2000Compression

Used In

PDFlattenerMonochromeCompSet

Header: PDFlattenerExpT.h:45

Description

Enumeration for setting the compression scheme for the Flattened Monochrome images.

Enum Constants

kPDFlattenerMonoCCITTGroup3Compression
kPDFlattenerMonoCCITTGroup4Compression
kPDFlattenerMonoZipCompression
kPDFlattenerMonoRunLengthCompression

Used In

PDFlattenerQualitySetting

Header: PDFlattenerExpT.h:55

Description

Enumeration for setting the Quality setting for the JPEG or JPEG2000 images.

Enum Constants

kPDFlattenerMinimum=0
kPDFlattenerLow
kPDFlattenerMedium
kPDFlattenerHigh
kPDFlattenerMaximum
kPDFlattenerJpeg2000Lossless

Used In

kPDFlattenerFlags

Header: PDFlattenerExpT.h:183

Enum Constants

kPDFlattenerCompressColorImagesZIP=0x01
Setting this flag will choose the ZIP compression scheme (Flate encoding) for compressing the color images. Otherwise we will stick to the current default behavior and try to use JPEG compression wherever possible.

pdflattener Callback Signatures

FlattenProgressMonitor

Header: PDFlattenerExpT.h:90

Description

Prototype of the callback which is registered by the client with the plug-in

Syntax

ASBool FlattenProgressMonitor(ASInt32 pageNum, ASInt32 totalPages, float current, ASInt32 reserved, void *clientData);

Parameters

pageNum
The current page which is processed by the plug-in. Indexed at 0.
totalPages
The total number of pages which will be flattened.
current
The progress of the flattening process in percentage from 0-100.
reserved
Kept for future use. Default to 0.
clientData
The data which client registered while calling the PDFlattenerConvertEx API.

Returns

If the client wants to abort the process then it should return value 1. Value 0 will allow process to continue normally.

Used By

Used In

pdflattener Structures

PDFlattenerUserParams

Header: PDFlattenerExpT.h:93

Syntax

struct PDFlattenerUserParams {
size_t size;
Set this to be the size of this struct.
PDFlatten flattenParams;
Flatten Params Input parameters for flattening.
float transQuality;
Raster/Vector Balance.
FlattenProgressMonitor flattenProgress;
Client registered progress monitor callback which will be called to report the progress.
void *progressClientData;
Client registered data send back along with the progress monitor callback.
ASText profileDesc;
Profile Descriptions for use with this parameter can be found with ACMakeProfileList and ACProfileListItemDescription. The best practice, however, is generally to leave this parameter as null so that defaults can be used. If this parameter is set, it overrides the values set by PDPageSetBlendingProfile and PDPresetDefaultBlendingProfile, and will be used as the blending space for each page prior to flattening. It will override any existing page blending spaces. This will be true regardless of how the existing page blending space was defined. If the parameter is null, the blending space for each page will be either the value previously set by PDPageSetBlendingSpace, or the value contained in the Group entry of the page, which defines it's Blending space. If neither of these has been used, it will be the value in PDPresefSetDefaultBlendingColorSpace if this is set. If none of the above are true, it will be the Working Space for CMYK. If that working space is not used, the profile for U.S. Web Coated SWOP (v2) will be used. Note that within a page, there may be transparency groups. These groups will contain their own blending profile, and their contents will blend via that profile. The group as a whole will then blend into the page using the page's blending profile.
PDFlattenerColorCompSet colorCompression;
Color Compression Setting for Flattened color Images.
PDFlattenerGrayscaleCompSet grayCompression;
Compression Setting for Flattened Grayscale Images.
Compression Setting for Flattened Monochrome Images.
PDFlattenerQualitySetting colorImageQuality;
Quality Setting for Flattened JPEG and JPEG2000 colored Images. This is valid only if the value of colorCompression is equal to kPDFlattenerJpegCompression or kPDFlattenerJpeg2000Compression
PDFlattenerQualitySetting grayImageQuality;
Quality Setting for Flattened JPEG and JPEG2000 gray scale Images. This is valid only if the value of grayCompression is equal to kPDFlattenerGrayJpegCompression or kPDFlattenerGrayJpeg2000Compression
} PDFlattenerUserParamsRec, *PDFlattenerUserParams;

Used By

pdflattener Functions

PDFlattenerConvert

Header: PDFlattenerProcs.h:37

Description

Flatten a PDF file.

Syntax

ASBool PDFlattenerConvert(PDDoc aPDDoc, PDFlatten flattenParams, float transQuality, ASUns32 firstPage, ASUns32 lastPage, ASUns32 *numFlattenedPages, ASUns32 flags);

Parameters

aPDDoc
The input PDDoc which we want to Flatten. The output will be in the same PDDoc.
flattenParams
Input parameters for flattening.
firstPage
The first page of aPDDoc which we want to Flatten.
lastPage
The last page of aPDDoc which we want to Flatten.
flags
Kept for future use. Default to 0.
numFlattenedPages
set to the number of pages that are flattened.

Returns

1 on success.

PDFlattenerConvertEx

Header: PDFlattenerProcs.h:59

Description

Flatten a PDF file.

Syntax

ASBool PDFlattenerConvertEx(PDDoc aPDDoc, PDFlatten flattenParams, float transQuality, ASUns32 firstPage, ASUns32 lastPage, ASUns32 *numFlattenedPages, ASUns32 flags, FlattenProgressMonitor FlattenProgress, void *progressClientData);

Parameters

aPDDoc
The input PDDoc which we want to Flatten. The output will be in the same PDDoc.
flattenParams
Input parameters for flattening.
firstPage
The first page of aPDDoc which we want to Flatten.
lastPage
The last page of aPDDoc which we want to Flatten.
flags
Kept for future use. Default to 0.
numFlattenedPages
set to the number of pages that are flattened.
FlattenProgress
the callback which we want to register with the plug-in.
progressClientData
any client data which client wants to get back with the callback for its own reference.

Returns

1 on success.

PDFlattenerConvertEx2

Header: PDFlattenerProcs.h:71

Description

Flatten a PDF file.

Syntax

ASBool PDFlattenerConvertEx2(PDDoc aPDDoc, ASUns32 firstPage, ASUns32 lastPage, ASUns32 *numFlattenedPages, PDFlattenerUserParams userParams);

Parameters

aPDDoc
The input PDDoc which we want to Flatten. The output will be in the same PDDoc.
firstPage
The first page of aPDDoc which we want to Flatten.
lastPage
The last page of aPDDoc which we want to Flatten.
numFlattenedPages
set to the number of pages that are flattened.
userParams
A structure object defined for user set parameters e.g flattenParams, transquality, Blending Colorspace profile, progress monitor and Compression Settings.

Returns

1 on success.

PDFlattenerConvertEx3

Header: PDFlattenerProcs.h:84

Description

Flatten a PDF file.

Syntax

ASBool PDFlattenerConvertEx3(PDDoc aPDDoc, ASUns32 firstPage, ASUns32 lastPage, ASUns32 *numFlattenedPages, PDFlattenerUserParams userParams, ASBool embedFlattenerProfiles);

Parameters

aPDDoc
The input PDDoc which we want to Flatten. The output will be in the same PDDoc.
firstPage
The first page of aPDDoc which we want to Flatten.
lastPage
The last page of aPDDoc which we want to Flatten.
numFlattenedPages
set to the number of pages that are flattened.
userParams
A structure object defined for user set parameters e.g flattenParams, transquality, Blending Colorspace profile, progress monitor and Compression Settings.
embedFlattenerProfiles
embed Flattener color profiles.

Returns

1 on success.

PDFlattenerInitialize

Header: PDFlattenerProcs.h:25

Description

Initialises the PDFlattener Plug-in.

Syntax

ASBool PDFlattenerInitialize(void);

Returns

An ASBool value.

PDFlattenerTerminate

Header: PDFlattenerProcs.h:45

Description

Terminates the PDFlattener Plug-in.

Syntax

void PDFlattenerTerminate(void);

Returns

void.