Layer

Additional functionality from Datalogics

22 components215 items
169 Functions 1 Definitions 24 Structures 21 Enums

CosStream

1 items

Functions(1)

CosStreamSetData

void CosStreamSetData(CosObj stream, ASStm sourceP, ASInt32 sourceStart, ASBool encodeTheSourceData, CosObj attributes, CosObj encodeParms, ASInt32 sourceLength)
DLExtrasProcs.h:156

Essentially identical to CosNewStream, except that the result is a modification of an existing stream.

Parameters
stream: CosObj

Stream to be modified

sourceP: ASStm

source stream to be added.

sourceStart: ASInt32

The byte offset to the starting point of the stream to be added.

encodeTheSourceData: ASBool

Flag indicating whether the source data is to encoded via filters specified in the attributes.

attributes: CosObj

dictionary containing string data attributes, including its length and encoding parameters.

encodeParms: CosObj

Parameters to be used for encoding (if any).

sourceLength: ASInt32

length of data to be read from the source, or -1 to read to EOF.

Returns
void
See Also

General

92 items

Functions(70)

ACGetOption

DLExtrasProcs.h:129

Returns the current value for the given AC_OptionCode. This call controls the behavior of colorspace conversions and manipulations carried out via AC-layer calls; it does not impact other Adobe PDF Library color behaviors.

Parameters
code: AC_OptionCode

AC_Option_BlackPointCompensation indicates whether the Acrobat Color Engine will carry out black point compensation when converting between colorspaces with different black points.

value: ASUns32 *

AC_Option_BlackPointCompensation flag value to be retrieved (Filled by the method)

Returns
AC_Error

Indicates if an error occurred.

See Also

ACSetOption

DLExtrasProcs.h:140

Sets the current value for the option specified by the supplied AC_OptionCode. This call controls the behavior of colorspace conversions and manipulations carried out via AC-layer calls; it does not impact other Adobe PDF Library color behaviors.

Parameters
value: ASUns32

The flag value to be set.

Returns
AC_Error

Indicates if an error occurred.

See Also

DLColorConvertPDEImage

DLExtrasProcs.h:1212

Converts the colorspace of a provided image using a new color profile and render intent.

Parameters
document: PDDoc *

A pointer to a PDDoc object containing the PDEImage.

image: PDEImage

The PDEImage in a PDF document that will be converted.

code: AC_ProfileCode

The code of the target profile for the conversion.

intent: AC_RenderIntent

The rendering intent of used to convert the image.

embed: ASBool

A boolian value. If true, embed the target profile. If false the resulting color is Device, if possible.

Returns

DLCreateResampledPDEImage

DLExtrasProcs.h:1249

Create a new PDEImage from an existing one modifying the resolution (dots per inch). This image can be freely modified inside a PDF document.

Parameters
image: PDEImage

The PDEImage in a PDF document.

exportParams: DLPDEImageExportParams *

A pointer to the DLPDEImageExportParams structure used by the PDEImage.
During the function call, ExportHorizontalDPI and ExportVeritcalDPI are updated to using the new resolution.

resolution: ASInt32

The new resolution as a 32 bit integer value.

Returns

DLExportPDEImage

void DLExportPDEImage(PDEImage image, ASPathName outputPath, DLImageExportType exporttype, DLPDEImageExportParams exportParams)
DLExtrasProcs.h:1127

Exports a PDEImage from a document to a specified image type TIFF, JPEG, BMP, PNG, GIF the specified file path.

Parameters
image: PDEImage

The PDEImage in a PDF document.

outputPath: ASPathName

The output path of the image.

exporttype: DLImageExportType

The exported image format (TIFF, JPEG, BMP, PNG, GIF).

exportParams: DLPDEImageExportParams

The DLPDEImageExportParams structure.

Returns
void

DLPDEImageRotate

DLExtrasProcs.h:1157

Rotates an image by theta degrees. A rotation is produced by [cos(theta), sin(theta), -sin(theta), cos(theta), 0, 0], which has the effect of rotating the coordinate system axes by an angle theta (degrees) counterclockwise.

Parameters
image: PDEImage

The PDEImage in a PDF document.

theta: ASDouble

The rotation angle (degrees).

Returns
void

DLPDEImageScale

DLExtrasProcs.h:1148

Scales an image by sx units. A scaling is obtained by [sx 0 0 sy 0 0]. This scales the coordinates so that 1 unit in the horizontal and vertical dimension of the new coordinate system is the same size as sx and sy units, respectively, as in the previous coordinate system.

Parameters
image: PDEImage

The PDEImage in a PDF document.

sx: ASDouble

X scaling factor.

sy: ASDouble

Y scaling factor.

Returns
void

DLPDEImageSetIntent

void DLPDEImageSetIntent(PDEImage inputImage, const char *renderIntent)
DLExtrasProcs.h:1228

Sets the image's Render Intent.

Parameters
inputImage: PDEImage
renderIntent: const char *

A pointer to the string representation of an ASAtom value that will be used to set the image's intent data.

Returns
void

DLPDEImageSetSoftMask

void DLPDEImageSetSoftMask(PDEImage image, PDEImage *softMask)
DLExtrasProcs.h:1199

Uses the specified soft mask and applies it to the PDEImage.

Parameters
image: PDEImage

The PDEImage in a PDF document.

softMask: PDEImage *

The pointer to the PDEImage's soft mask, that will be applied to the PDEImage, or a null pointer which will delete the current soft mask.

Returns
void

DLPDEImageTranslate

DLExtrasProcs.h:1138

Translates an image by (tx,ty) units. A translation is specified as [ 1 0 0 1 tx ty], where tx and ty are the distance to translate from the origin of the coordinate system in the horizontal and vertical dimension, respectively.

Parameters
image: PDEImage

The PDEImage in a PDF document.

tx: ASDouble

X translation distance.

ty: ASDouble

Y translation distance.

Returns
void

PDFLAddFontDirectories

DLExtrasProcs.h:453

This call allows Adobe PDF Library to rescan for fonts without re-initializing. This will allow an operating Library process to detect and update new font directories and resources after startup, without requiring a restart and re-initialization. This will add one or more directories, and the fonts within them, to the set of all directories containing fonts (those specified in the DirList string arrays of resource locations). This call should be followed by a call to PDFLRescanFontDirectories after all new font directories have been loaded.

Parameters
pathCount: ASInt32

Number of new paths to be added.

paths: ASPathName *

Paths to new resource locations to be added.

Returns
ASBool

Indicates if fonts directories were changed.

PDFLReinit

PDFLProcs.h:688

Warm reinitialization of the Adobe PDF Library. Call this method if you closed all documents and other PD/PDE/Cos objects. Releases memory used for cached data.

Parameters
: void
Returns
See Also

PDFLRescanFontDirectories

DLExtrasProcs.h:439

This call allows Adobe PDF Library to rescan for fonts without re-initializing. This will allow an operating Library process to detect and update new font directories and resources after startup, without requiring a restart and re-initialization. This call can, depending on flag settings, force a rescan of font resource areas defined in your dirList array, a rescan of those residing in the System folder, or both. To add new font resources to your dirList array, use the PDFLAddFontDirectories call. Note: This call, as well as the PDFLAddFontDirectories call, will act upon all PDSysFont structures referenced by the font cache that have a reference count of zero. Any pointers to such structures will become invalid after a rescan call has occurred. By default, all referenced PDSysFont structures will be affected, as their reference counts are always zero. To preserve a PDSysFont reference across a rescan call, use PDEAcquire and PDERelease calls to increment and decrement usage counts of a PDSysFont object as like other PDE Object.

Parameters
flags: FontRescanFlags

Flags controlling rescan process.

Returns
ASBool

Indicates if fonts directories were changed.

PDSignDocSaveInitParams

DLExtrasProcs.h:1763

Creates a set of parameters used for saving the document to which a digital signature has been added. The parameters are set to default values and can be examined using "get" methods, and modified via "set" methods. When these parameters are no longer needed (after the call to PDSignDocWithParams, although they can be re-used any number of times), they must be freed by calling PDSignDocSaveReleaseParams().

Parameters
: void
Returns
PDSignDocSaveParams

Initialized document signature parameters that can be further modified.

PDSignDocSetCancelProc

void PDSignDocSetCancelProc(PDSignDocSaveParams params, ASCancelProc cancelProc, void *cancelProcClientData)
DLExtrasProcs.h:1808

Sets the cancel process callback and client data for the callback.

Parameters
params: PDSignDocSaveParams

IN Object to be modified.

cancelProc: ASCancelProc

IN A callback to test whether an operation should be cancelled. A CancelProc is typically passed to some method that takes a long time to complete. At frequent intervals, the method calls the CancelProc. If it returns true, then the method cancels its operation; if false, it continues.

cancelProcClientData: void *

IN Pointer to user-supplied data to pass to cancelProc each time it is called. It must be NULL if cancelProc is NULL.

Returns
void

PDSignDocSetNonPfxPassphrase

void PDSignDocSetNonPfxPassphrase(PDSignDocSignParams params, void *passphrase, ASSize_t passphraseSize, CredentialStorageFmt storageFmt)
DLExtrasProcs.h:1672

Sets the passphrase used to decrypt NonPFX credentials. The passphrase provided must use the exact same character encoding used to encrypt the private key. The application makes no effort whatsoever to re-encode the same.

Parameters
params: PDSignDocSignParams

IN Object to be modified.

passphrase: void *

IN Passphrase used to encrypt NonPFX private key. Should be set to NULL if unencrypted.

passphraseSize: ASSize_t

IN Passphrase size in bytes. Shall be set to 0 if private key is unencrypted or passphrase is stored on disk.

storageFmt: CredentialStorageFmt

IN Storage format for passphrase.

Returns
void

PDSignDocSetNonPfxPrivateKey

void PDSignDocSetNonPfxPrivateKey(PDSignDocSignParams params, void *privateKey, ASSize_t keySize, CredentialStorageFmt storageFmt)
DLExtrasProcs.h:1662

Sets the private key for NonPFX credentials.

Parameters
params: PDSignDocSignParams

IN Object to be modified.

privateKey: void *

IN Private key corresponding to the public key in the signer certificate.

keySize: ASSize_t

IN Size of private key in bytes. Shall be set to 0 if key is stored on disk.

storageFmt: CredentialStorageFmt

IN Storage format for private key.

Returns
void

PDSignDocSetNonPfxSignerCert

void PDSignDocSetNonPfxSignerCert(PDSignDocSignParams params, void *signerCert, ASSize_t certSize, CredentialStorageFmt storageFmt)
DLExtrasProcs.h:1653

Sets the signer certificate for NonPFX credentials.

Parameters
params: PDSignDocSignParams

IN Object to be modified.

signerCert: void *

IN Signer certificate.

certSize: ASSize_t

IN Size of signer certificate in bytes. Shall be set to 0 if certificate is stored on disk.

storageFmt: CredentialStorageFmt

IN Storage format for the signer certificate.

Returns
void

PDSignDocSetPfxPassphrase

void PDSignDocSetPfxPassphrase(PDSignDocSignParams params, void *passphrase, ASSize_t passphraseSize, CredentialStorageFmt storageFmt)
DLExtrasProcs.h:1689

Sets the passphrase used to decrypt PFX/PKCS#12 credentials. The passphrase provided must use the exact same character encoding used to encrypt the PFX credentials. The application makes no effort whatsoever to re-encode the same.

Parameters
params: PDSignDocSignParams

IN Object to be modified.

passphrase: void *

IN Passphrase used to encrypt PFX/PKCS#12 credentials. Shall be set to NULL if credentials are unencrypted.

passphraseSize: ASSize_t

IN Passphrase size in bytes. Shall be set to 0 if PFX credentials are unencrypted or passphrase is stored on disk.

storageFmt: CredentialStorageFmt

IN Storage format for PFX/PKCS#12 credentials.

Returns
void

PDSignDocSetProgressMon

void PDSignDocSetProgressMon(PDSignDocSaveParams params, ASProgressMonitor progMon, void *progMonClientData)
DLExtrasProcs.h:1798

Sets the progress monitor and client data for the monitor.

Parameters
params: PDSignDocSaveParams

IN Object to be modified.

progMon: ASProgressMonitor

IN Progress monitor. Use AVAppGetDocProgressMonitor() to obtain the default. It may be NULL.

progMonClientData: void *

IN A pointer to user-supplied data to pass to mon each time it is called. It must be NULL if mon is NULL.

Returns
void

PDSignDocSetSigPolicy

DLExtrasProcs.h:1727

Adds a signature policy as a signed attribute to the PAdES signature used to sign the document. Signature policies may be applied to PAdES signatures, only. It is required that signature type be defined prior to adding a signature policy.

Parameters
params: PDSignDocSignParams

IN Object to be modified.

oid: ASConstText

IN Object Identifier (OID) that uniquely identifies a specific version of the signature policy to be added.

Returns
ASInt32

Number of signature policies contained within the PAdES signature.

Exceptions
Raises
—

if signature type is undefined or set to a type other than PAdES, or if an invalid policy OID is provided.

PDSignDocSetSigPolicyQualifierURI

DLExtrasProcs.h:1735

Adds an element of type SPuri containing a URI value that specifies the location of the copy of the document of the most recently added signature policy.

Parameters
params: PDSignDocSignParams

IN Object to be modified.

uri: ASConstText

IN URI value where a copy of the document of the most-recently added signature policy can be obtained.

Returns
void
Exceptions
Raises
—

if qualifying an undefined signature policy, or qualifying an existing signature policy with multiple qualifiers.

PDSignDocSetSigPolicyQualifierUserNotice

DLExtrasProcs.h:1750

Adds an element of type SPUserNotice containing information that is intended for being displayed whenever the PAdES signature is validated. The displayText and org attributes can be defined independent of each other. However, a valid org attribute must be defined in order to qualify a PAdES signature policy with the noticeNos attribute.

Parameters
params: PDSignDocSignParams

IN Object to be modified.

displayText: ASConstText

IN Text of the notice to be displayed.

org: ASConstText

IN Organization name that to be specified as part of the NoticeRef field.

noticeNos: ASInt64 *

IN Array of integers that identify a group of textual statements prepared by the organization to allow for retrieval of notices.

numNoticeNos: ASSize_t

IN Size of the array containing notice numbers.

Returns
void
Exceptions
Raises
—

if qualifying an undefined signature policy, qualifying an existing signature policy with multiple qualifiers, or defining a noticeNos attribute without a corresponding org attribute definition.

PDSignDocSetSignerInfo

void PDSignDocSetSignerInfo(PDSignDocSignParams params, PDEImage logo, ASFixed opacity, ASConstText name, ASConstText location, ASConstText reason, ASConstText contactInfo, ASInt32 displayTraits)
DLExtrasProcs.h:1702

Sets signer info attributes that define corresponding signature dictionary entries and signature appearance traits.

Parameters
params: PDSignDocSignParams

IN Object to be modified.

logo: PDEImage

IN Image to display as part of signature appearance.

opacity: ASFixed

IN Opacity of image to display as part of signature appearance.

name: ASConstText

IN Name of the person or authority signing the document.

location: ASConstText

IN CPU host name or physical location of the signing.

reason: ASConstText

IN Reason for signing the document.

contactInfo: ASConstText

IN Information provided by the signer to enable recipients to contact signer for signature verification.

displayTraits: ASInt32

IN DisplayTraits fields to display as part of signature appearance.

Returns
void

PDSignDocWithParams

DLExtrasProcs.h:1525

Adds a digital signature to a document. It is expected that the PDSignDocSaveParams and PDSignDocSignParams structure definitions have been set by the user prior to signing a document. If the document has not been previously signed, signs and saves the entire document. If the document has been previously signed, signs and saves only the portions of the document that have changed. If the document has been previously signed and the path to which the file is saved is NULL or the same as the path specified by the parameter, doc, signs and copies the document, saving only the portions of the document that have changed.

Parameters
doc: PDDoc

IN/OUT The PDF document object.

saveParams: PDSignDocSaveParams

IN A PDSignDocSaveParams structure specifying how the document should be saved.

signParams: PDSignDocSignParams

IN A PDSignDocSignParams structure specifying how the document should be signed.

Returns
void

Structures(10)

DLPDEImageExportParams

DLExtrasExpT.h:482

Structure containing additional image export parameters that can be set by the user.

Fields
ReverseGray: ASBool

Default: false. When set to true reverse GrayScale image. This is only valid for images using the DeviceGray ColorSpace.

TIFFBlackIsOne: ASBool

Default: false. When set to true Photometrically reverse a TIF image. This is only valid for an output image of type TIF.

HalftoneGrayImages: ASBool

Default: false. Convert 8bpc grayscale images to 1bpc (B/W) images using a 45 degree line screen set for 106lpi at 600dpi.

JPEGQuality: ASInt32

Default: 75. Quality of the image(0-100). Note this is only valid for JPEG Images.

ExportHorizontalDPI: ASDouble

Default: 72. This value sets the image's Horizontal DPI (Dots Per Inch), which will be used during the exporting process.

ExportVerticalDPI: ASDouble

Default: 72. This value sets the image's Vertical DPI (Dots Per Inch), which will be used during the exporting process.

TIFFCompression: DLImageCompression

Default: Default. Type of compression to be used in saving the image to a file. Note this is only valid for TIF Images.

MonochromeThreshold: ASUns8

Default: 128. Threshold to use for determining which bits are white or black for Monochrome output(0-255). This is only valid for TIF Images using G3 or G4 compression and HalftoneGrayImages must be set to false.

TIFFCMYKAlpha: ASBool

Default: false. When set to true, if the image data is in CMYK and there is a Soft Mask image present, they will be combined as CMYK + Alpha Channel TIFF output (40-bit). This is only valid for an output image of type TIF.

RaiseExceptionIfNotUsableColor: ASBool

Default: false. When true, an exception will be raised if the image being saved is not in a format this graphic form can save natively. When false, we will automatically convert the image into a form that can be saved natively (Generally, that for will be DeviceRGB, using the sRGB profile.

WriteSeparationColorsToTIFF: ASBool

Default: false. When true, we will output the separation color space to a TIFF image, using the TIFF Photoshop tag. When false, Separation colors will be converted their alternate color space, and rendered as RGB.

DisableAlphaChannelGeneration: ASBool

Default: false. When set to false, if the image data is in RGB and there is a Mask present, they will be combined as RGBA + Alpha Channel output (32-bit). When set to true, if the image date is in RGB and there is a Mask present, they will not be combined and the output will be RGB (24-bit). This is only valid for an output image of type TIF and PNG.

TIFFByteOrder: DLTIFFByteOrder

Default: BigEndian. The byte order used within the TIFF file.

OptimizedFontRec

DLExtrasExpT.h:300

Structure representing an Optimized Font.

Fields
name: ASAtom

The name of the Font.

previousSizeInBytes: ASInt32

The size of the Embedded Font file in bytes prior to Optimization.

currentSizeInBytes: ASInt32

The size of the Embedded Font file in bytes after Optimization.

fontObj: CosObj

The Font object.

reSubset: ASBool

This font was re-subset during Optimization.

OptimizedImageRec

DLExtrasExpT.h:284

Structure representing an Optimized Image.

Fields
previousDPI: ASInt32

The DPI of the Image prior to Optimization.

currentDPI: ASInt32

The DPI of the Image after Optimization, this may be unchanged from the value prior to Optimization if downsampling was not used.

previousCompression: PDFOptimizerCompressionType

The compression of the Image prior to Optimization.

currentCompression: PDFOptimizerCompressionType

The compression of the Image prior to Optimization.

previousSizeInBytes: ASInt32

The size of the Image in bytes prior to Optimization.

currentSizeInBytes: ASInt32

The size of the Image in bytes after Optimization.

PDFOptimizerReportRec

DLExtrasExpT.h:314

Structure representing data reported from the optimization process.

Fields
size: ASInt32

Size of the structure.

colorImages: OptimizedImage **

The Color Images Optimized in the document.

colorImagesCount: ASInt32

The number of Color Images Optimized in the document.

grayImages: OptimizedImage **

The Gray Images Optimized in the document.

grayImagesCount: ASInt32

The number of Gray Images Optimized in the document.

monochromeImages: OptimizedImage **

The Monochrome Images Optimized in the document.

monochromeImagesCount: ASInt32

The number of Monochrome Images Optimized in the document.

fonts: OptimizedFont **

The Fonts Optimized in the document.

fontCount: ASInt32

The number of Fonts Optimized in the document.

bookmarksRemoved: ASBool

Bookmarks (outlines) were removed from the document.

acroFormsRemoved: ASBool

AcroForms were removed from the document.

outputIntentsRemoved: ASBool

Output Intents were removed from the document.

pageLabelsRemoved: ASBool

Page Labels were removed from the document.

nameTreesRemoved: ASBool

Name Trees were removed from the document.

structureTreeItemsRemoved: ASBool

The Structure Tree items were removed from the document.

optionalContentFlattened: ASBool

Optional Content in the document was Flattened.

linearizationApplied: ASBool

Linearization was applied to the document.

pagesWithPieceDataRemoved: ASInt32

The number of Pages with PieceData removed from the document.

pagesWithAttachmentsRemoved: ASInt32

The number of Pages with Attachments removed from the document.

pagesWithCommentsRemoved: ASInt32

The number of Pages with Comments removed from the document.

pagesWithAnnotationsRemoved: ASInt32

The number of Pages with Annotations removed from the document.

pagesWithThumbnailsRemoved: ASInt32

The number of Pages with Thumbnails removed from the document.

unusedFormsRemoved: ASInt32

The number of Unused Form XObjects removed from the document.

unusedImagesRemoved: ASInt32

The number of Unused Image XObjects removed from the document.

unusedFontsRemoved: ASInt32

The number of Unused Fonts removed from the document.

itemsWithMetadataRemoved: ASInt32

The number of items with Metadata streams removed from the document.

itemsWithDocInfoRemoved: ASInt32

The number of items of Document Info removed from the document.

javaScriptActionsRemoved: ASInt32

The number of JavaScript Actions removed from the document.

alternateImagesRemoved: ASInt32

The number of Alternate Images removed from the document.

images16BPCConvertedTo8BPC: ASInt32

The number of 16 BPC images converted to 8 BPC in the document.

resubsetOfSubsetFontsAttemped: ASBool

Resubsetting of already subset Fonts was attemped.

fullyEmbeddedFontsNowSubset: ASInt32

The number of fully Embedded Fonts subset in the document.

subsetFontsNowReSubset: ASInt32

The number of subset Fonts re-subset in the document.

fullyEmbeddedFontsRemoved: ASInt32

The number of fully Embedded Fonts removed from the document.

base14FullyEmbeddedFontsRemoved: ASInt32

The number of Base 14 Fully Embedded fonts removed from the document.

PDSignDocSaveParams

typedef struct _t_PDSignDocSaveParams* PDSignDocSaveParams
DLExtrasExpT.h:690

Type that specifies the parameters required for saving the document to which a digital signature is added.

QREncodeParams

typedef struct _t_QREncodeParamsRec* QREncodeParams
DLExtrasExpT.h:742

An opaque type collecting together QREncodeParams parameters.

Enums(11)

AC_OptionCode

DLExtrasExpT.h:22

Datalogics-specific flags for the Acro Color Layer.

Values
AC_Option_BlackPointCompensation = FOUR_CHAR_CODE('kptc')
—

Controls whether to adjust for differences in black points when converting colors between color spaces. If enabled the full dynamic range of the source space is mapped into the full dynamic range of the destination space. If disabled, the dynamic range of the source space is simulated in the destination space (which can result in blocked or gray shadows) This option is ignored if the rendering intent for the transformation is AC_AbsColorimetric. Default is 0 (zero).

AC_Option_Dither8 = FOUR_CHAR_CODE('dth8')
—

Dither transformations to 8 bit color spaces. This may be ignored by optimized transforms. This option is used by AC_ApplyTransform. Default is 0 (zero).

AC_OptionCode_MaxEnum = 0xFFFFFFFFL
—

CredentialDataFmt

DLExtrasExpT.h:628

Enumeration to specify user-credential format.

Values
NonPFX = 0
—

Base64-encoded or Binary DER (ASN.1 Distinguished Encoding Rules) format.

PFX = 1
—

PKCS#12 format.

CredentialStorageFmt

DLExtrasExpT.h:636

Enumeration to specify whether user-credentials reside on-disk or are cached in memory.

Values
OnDisk = 0
—

Credential resides on-disk.

InMemory = 1
—

Credential is cached in memory.

DLImageCompression

DLExtrasExpT.h:462

Compression values for exporting TIF images.

Values
Compression_Default = 0
—

Use the default for the output image type.

Compression_NONE = 1
—

Use no image compression. Valid for BMP, PNG and TIFF outputs only.

Compression_FLATE = 2
—

Deflate algorithm (PNG only). An open source standard widely used for creating zip files and with PDF.

Compression_LZW = 3
—

Lempel-Ziv-Welch, valid for TIFF output. A lossless algorithm, resulting files are larger but retain original quality.

Compression_G3 = 4
—

CCITT Group3 compression. Valid for TIFF, requires colorModel gray. A lossless algorithm for black and white images that efficiently compresses whitespace.

Compression_G4 = 5
—

CCITT Group4 compression. Valid for TIFF, requires colorModel gray. A lossless algorithm for black and white images based on G3.

Compression_DCT = 6
—

Discrete Cosine Transform. Lossy algorithm, valid for JPEG. Best when used with continuous tone (such as photographs).

DLImageExportType

DLExtrasExpT.h:446

Export Image Types.

Values
ExportType_Invalid = 0
—

Used for error handling

ExportType_TIF = 1
—

Tagged Image File Format

ExportType_JPEG = 2
—

Joint Photographic Experts Group

ExportType_BMP = 3
—

Microsoft Windows Bitmap

ExportType_PNG = 4
—

Portable Network Graphic

ExportType_GIF = 5
—

Graphics Interchange Format

DigestCategory

DLExtrasExpT.h:644

Enumeration to specify cryptographic hash functions that generate variable-length message digests required for digital signature creation.

Values
sha1 = 0
—

SHA-1 message digest comprised of a 160-bit hash value.

sha224 = 1
—

SHA-2 message digest comprised of a 224-bit hash value.

sha256 = 2
—

SHA-2 message digest comprised of a 256-bit hash value.

sha384 = 3
—

SHA-2 message digest comprised of a 384-bit hash value.

sha512 = 4
—

SHA-2 message digest comprised of a 512-bit hash value.

DisplayTraits

DLExtrasExpT.h:658

Enumeration to specify fields to display as part of signature appearance.

Values
kDisplayNone = 0x0
—

Do not display text labels or logo image. Note that specifying this option results in an empty signature appearance.

kDisplayAll = 0x1
—

Display all available text labels and logo image. Note that the application expects valid data to be supplied for each available label that will be displayed as a result of this option being selected.

kDisplayName = 0x2
—

Display the Name label.

kDisplayReason = 0x4
—

Display the Reason label.

kDisplayLocation = 0x8
—

Display the Location label.

kDisplayDate = 0x10
—

Display the Date label.

kDisplayContactInfo = 0x20
—

Display the ContactInfo label.

kDisplayDN = 0x40
—

Display the Signer Certificate's Distinguished Name label.

kDisplayLogo = 0x80
—

Display logo image.

FontRescanFlags

DLExtrasExpT.h:73

flags for rescanning font directories for additional fonts after Library initialization.

Values
FontRescan_Files = 1
—

This will rescan just the fields defined in dirList, plus those added with PDFLAddFontDirectories.

FontRescan_System = 2
—

This will rescan the system directories.

FontRescan_All = 3
—

This, or an "or" of the previous two, will rescan both.

SignatureFieldID

DLExtrasExpT.h:594

Enumeration to specify identifying information of the form field expected to contain the digital signature.

Values
SearchForFirstUnsignedField = 0
—

Search for the first available signature field, i.e., a field that does not contain a signature. No new signature field is created if none found. Exception raised if not found.

FieldCosObject = 1
—

Cos object of an existing signature field that does not contain a signature. No new signature field is created if not found. Exception raised if not found.

FullyQualifiedFieldName = 2
—

Fully qualified field name of a valid T entry in an existing field dictionary that is expected to contain the digital signature. Refer PDF specification ISO 32000-2:2020, Section 12.7.4.2 for additional information. No new signature field is created if not found. Exception raised if not found.

CreateFieldWithQualifiedName = 3
—

Creates a new signature field to be signed using the T-entry fully qualified field name provided. The signature field created will contain neither parent nor child entries, i.e., the partial field name is the same as the fully qualified field name, per PDF specification ISO 32000-2:2020 Section 12.7.4.2.

Field name provided shall not be separated by a period (.) character. Appearance of the generated signature field is determined by widget annotation attributes specified by signatureBoxInfo. If signatureBoxInfo is undefined, the annotation is not drawn, resulting in the creation of an invisible signature field on the first page.

SignatureType

DLExtrasExpT.h:693

Enumeration to specify the type of signature to be added to the document.

Values
CMS = 0
—

Digital signature based on the Cryptographic Message Syntax (CMS) standard. CMS-based digital signatures contain embedded timestamps, per the RFC3161 specification.

RFC3161 = 1
—

Trusted timestamp based on the Time-Stamp Protocol (RFC3161). Timestamp signatures are not available on 32-bit Linux and 64-bit AIX systems.

PADES = 2
—

PAdES B-T baseline and policy-based digital signatures per the ETSI EN 319 142 European Standard. PAdES signatures are not available on 32-bit Linux and 64-bit AIX systems.

Definitions(1)

JPXColorSpace

1 items

Functions(1)

Metadata

1 items

Functions(1)

PDDocGetXAPMetadataCompactOptional

PDMetadataProcs.h:573

Allow customer to get XML/RDF metadata in a full (non-compact) form Gets the XMP metadata associated with a document. It returns an ASText whose text is the XML text of the XMP metadata associated with the document pdDoc. The ASText becomes the property of the client, which is free to alter or destroy it. The XMP metadata returned always represents all the properties in the pdDoc object's Info dictionary, and can also contain properties not present in the Info dictionary. This call is preferred to PDDocGetInfo(), which only returns properties that are in the Info dictionary (although the older function is supported for compatibility). Note: The term XAP refers to an early internal code name for Adobe's Extensible Metadata Platform (XMP). For more information on this protocol, see the Adobe XMP specification.

Parameters
pdDoc: IN PDDoc

The document containing the metadata.

enableCompactRDF: IN ASBool

True if the XML/RDF output is in compact form.

Returns
ASText

An ASText object containing the XMP metadata associated with the document pdDoc.

Exceptions
pdMetadataErrCouldntCreateMetaXAP

PDDoc

51 items

Functions(35)

PDDocDeletePagesEx

void PDDocDeletePagesEx(IN PDDoc doc, ASInt32 firstPage, ASInt32 lastPage, ProgressMonitor progMon, void *progMonClientData, PDPageDeleteFlags flags)
DLExtrasProcs.h:899

Deletes the specified pages.

Parameters
doc: IN PDDoc

The document from which pages are deleted.

firstPage: ASInt32

The page number of the first page to delete. The first page is 0.

lastPage: ASInt32

The page number of the last page to delete.

progMon: ProgressMonitor

A progress monitor. Use AVAppGetDocProgressMonitor() to obtain the default progress monitor. NULL may be passed, in which case no progress monitor is used.

progMonClientData: void *

A pointer to user-supplied datapassed to progMon each time it is called. It should be NULL if progMon is NULL.

flags: PDPageDeleteFlags

Page Deletion flags that can be used to modify the how the deletion process works.

Returns
void

PDDocEmbedFonts

void PDDocEmbedFonts(PDDoc doc, ASUns32 flags, ASStatusMonitorProcs statusMon)
DLExtrasProcs.h:197

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.

Parameters
doc: PDDoc

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: ASUns32

One of the following:
kDocEmbedSubset
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.

kDocEmbedSubsetOfEmbeddedFont
If set, fonts that have already been embedded but are not subset fonts, will be reembedded as a subset font.

statusMon: ASStatusMonitorProcs

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.

Returns
void

PDDocEmbedFontsFromFontArray

void PDDocEmbedFontsFromFontArray(PDDoc doc, const PDFont *fonts, ASUns32 nFonts, ASUns32 flags, ASStatusMonitorProcs statusMon)
DLExtrasProcs.h:240

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.

Parameters
doc: PDDoc

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: const PDFont *

An array of PDFont containing fonts to be embedded.

nFonts: ASUns32

The number of fonts in the fonts array.

flags: ASUns32

One of the following:
kDocEmbedSubset
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.

kDocEmbedSubsetOfEmbeddedFont
If set, fonts that have already been embedded but are not subset fonts, will be reembedded as a subset font.

statusMon: ASStatusMonitorProcs

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.

Returns
void
See Also

PDDocFlattenAcroFormFieldsAsIfPrinted

DLExtrasProcs.h:1489

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.

Parameters
doc: PDDoc

IN/OUT The PDF document object.

Returns
void

PDDocOptimizeDefaultParams

DLExtrasProcs.h:647

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.

Parameters
: void
Returns
PDFOptimizationParams

initialized optimization parameters that can be further modified.

PDDocOptimizeGetImageRecompress

DLExtrasProcs.h:729

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.

Parameters
Params: PDFOptimizationParams

IN a PDFOptimizationParams object to be checked

imageType: PDFOptimizerCompressImageType

OUT The class of Images these parameters are to refer to.

recompressIfAbove: ASInt16 *

OUT The lower limit of resolution (In DPI) of an Image to be Resampled.

recompressTo: ASInt16 *

OUT The target DPI for Resampling. Images which are Resampled will be changed to this resolution.

compressType: PDFOptimizerCompressionType *

OUT a member of the enumeration PDFOptimizerCompressionType.

compressQuality: PDFOptimizationCompressQuality *

OUT a member of the enumeration PDFOptimizationCompressQuality

Returns
void

PDDocOptimizeSetImageRecompress

DLExtrasProcs.h:712

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.

Parameters
Params: PDFOptimizationParams

IN a PDFOptimizationParams object to be modified

imageType: PDFOptimizerCompressImageType

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: ASInt16

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: ASInt16

IN The target DPI for Resampling. Images which are Resampled will be changed to this resolution.

compressType: PDFOptimizerCompressionType

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: PDFOptimizationCompressQuality

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.

Returns
void

PDDocOptimizeSetOption

DLExtrasProcs.h:741

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

Parameters
Params: PDFOptimizationParams

IN. A PDFOptimizationParams object to be modified

option: PDFOptimizerOption

IN. A member of the enumeration PDFOptimizerOption, selecting which option to effect.

OnOff: ASBool

IN. If true, set the associated option as ON. If false, set it as OFF.

Returns
void

PDDocQREncodeParamsDefault

DLExtrasProcs.h:1871

This will create a set of Encode 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, they should be freed by the method PDDocQREncodeParamsRelease.

Parameters
: void
Returns
QREncodeParams

initialized parameters that can be further modified. NOTE: Typical usage is to specify where the code should be located, what size it should be, what should be encoded etc. The default values are prepopulated to be a small visible barcode on a typical page size.

PDDocRemoveAttachment

void PDDocRemoveAttachment(PDDoc doc, char *attachmentNameToRemove)
DLExtrasProcs.h:1497

Removes a PDF attachment that matches the specified name.

Parameters
doc: PDDoc

IN The PDF document object.

attachmentNameToRemove: char *

IN The attachment name to remove, this should be a null terminated string.

Returns
void

PDDocReplaceUnembeddedSimpleFonts

void PDDocReplaceUnembeddedSimpleFonts(PDDoc doc, ASAtom *currentFontNames, ASAtom *newFontNames, ASUns32 fontNamesLength)
DLExtrasProcs.h:853

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.

Parameters
doc: PDDoc

IN a PDDoc object (Required)

currentFontNames: ASAtom *

IN The names of the fonts to be replaced (Required)

newFontNames: ASAtom *

IN The names of the new fonts (Required)

fontNamesLength: ASUns32

IN The number of current font names and the number of new font names (they have to be the same) (Required)

Returns
void

PDDocumentOptimize

ASBool PDDocumentOptimize(PDDoc InputDoc, ASPathName OutputPath, ASFileSys fileSys, PDFOptimizationParams params, ProgressMonitor progMon, void *progMonClientData, ASCancelProc cancelProc, void *cancelProcClientData)
DLExtrasProcs.h:633

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.

Parameters
InputDoc: PDDoc

IN a PDDoc object (Required)

OutputPath: ASPathName

IN an ASFilePath where the optimized document is to be written (Required)

fileSys: ASFileSys
progMonClientData: void *

IN An optional pointer to client data used by the progress monitor.

cancelProc: ASCancelProc

IN an optional pointer to a cancel procedure

cancelProcClientData: void *

IN an optional pointer to cancel proc client data

Returns

PDDocumentOptimizeWithReport

ASBool PDDocumentOptimizeWithReport(PDDoc InputDoc, ASPathName OutputPath, ASFileSys fileSys, PDFOptimizationParams params, ProgressMonitor progMon, void *progMonClientData, ASCancelProc cancelProc, void *cancelProcClientData, PDFOptimizerReport report)
DLExtrasProcs.h:834

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.

Parameters
InputDoc: PDDoc

IN a PDDoc object (Required)

OutputPath: ASPathName

IN an ASFilePath where the optimized document is to be written (Required)

fileSys: ASFileSys
progMonClientData: void *

IN An optional pointer to client data used by the progress monitor

cancelProc: ASCancelProc

IN an optional pointer to a cancel procedure

cancelProcClientData: void *

IN an optiona pointer to cancel proc client data

report: PDFOptimizerReport

OUT an PDFOptimizerReport that will be filled by the method

Returns

Structures(9)

PDDocTextFinder

typedef struct _t_PDDocTextFinder* PDDocTextFinder
DLExtrasExpT.h:395

Extracts words or phrases that match a regular expression (regex) on a given page range or on all of the pages in a document.

PDDocTextFinderConfigRec

DLExtrasExpT.h:399

Structure representing configuration options for DocTextFinder.

Fields
recSize: ASSize_t

This is always sizeof(PDDocTextFinderConfigRec).

preserveLineBreaks: ASBool

If true, inserts

chars instead of spaces wherever ends of lines are detected within extracted text.

Enums(7)

PDDocEmbedFontFlags

DLExtrasExpT.h:50

Flags for PDDocEmbedFonts.

Values
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

DLExtrasExpT.h:106

Compression quality options

Values
PDFOptimizerCompressQualityUnset = 0
—
PDFOptimizerCompressMinimum = 1
—
PDFOptimizerCompressLowQuality = 2
—
PDFOptimizerCompressMediumQuality = 3
—
PDFOptimizerCompressHighQuality = 4
—
PDFOptimizerCompressMaximumQuality = 5
—
PDFOptimizerCompressLossless = 6
—

PDFOptimizerCompressImageType

DLExtrasExpT.h:117

Image types for PDFOptimizer compression

Values
PDFOptimizerColor = 1
—

Compress colored images

PDFOptimizerGray = 2
—

Compress Gray scale Images

PDFOptimizerMonochrome = 3
—

Compress B/W images

PDFOptimizerCompressionType

DLExtrasExpT.h:84

types of compression for PDFOptimizer

Values
PDFOptimizerRecompressNone = 0
—

Used only when original image is not compressed

PDFOptimizerRecompressSame = 1
—

Compress using the same compression

PDFOptimizerRecompressFlate = 2
—

Compress image using Flate

PDFOptimizerRecompressJpeg = 3
—

Compress image using Jpeg

PDFOptimizerRecompressJP2k = 4
—

Compress image using JPEG2000

PDFOptimizerRecompressJBig = 5
—

Compress image using JBig2

PDFOptimizerRecompressCCITTG4 = 6
—

Compress image using CCITTG4

PDFOptimizerRecompressCCITTG3 = 7
—

Compress image using CCITTG3

PDFOptimizerRecompressFlateJpeg = 8
—

Compress using Flate and Jpeg

PDFOptimizerObjectCompressionType

DLExtrasExpT.h:127

Object Compression types for PDFOptimizer

Values
PDFOptimizerObjectCompressionAll = 0
—

Compress all objects.

PDFOptimizerObjectCompressionNone = 1
—

No object compression is used.

PDFOptimizerObjectCompressionStructure = 2
—

Compress objects related to Logical Structure of a document.

PDFOptimizerObjectCompressionLeaveUnchanged = 3
—

Leave object compression unchanged.

PDFOptimizerOption

DLExtrasExpT.h:143

PDFOptimizer Options

Values
PDFOptimizerDownsampleColor = 1
—

Defaults to ON

PDFOptimizerRecompressColor = 2
—

Defaults to ON

PDFOptimizerDownsampleGray = 3
—

Defaults to ON

PDFOptimizerRecompressGray = 4
—

Defaults to ON

PDFOptimizerDownsampleBW = 5
—

Defaults to ON

PDFOptimizerRecompressBW = 6
—

Defaults to ON

PDFOptimizerDownsampleRecompressOnlyIfSmaller = 7
—

Defaults to ON

PDFOptimizerDiscardAlternateImages = 8
—

Defaults to ON

PDFOptimizerSubsetAllEmbeddedFonts = 9
—

Defaults to ON

PDFOptimizerRemoveAllEmbeddedFonts = 10
—

Defaults to OFF

PDFOptimizerRemoveAllBase14Fonts = 11
—

Defaults to ON

PDFOptimizerMergeDuplicateFonts = 12
—

Defaults to ON

PDFOptimizerDiscardBookmarks = 13
—

Defaults to OFF

PDFOptimizerDiscardAcroforms = 14
—

Defaults to OFF

PDFOptimizerDiscardOutputIntent = 15
—

Defaults to ON

PDFOptimizerDiscardThumbnails = 16
—

Defaults to ON

PDFOptimizerDiscardPageLabels = 17
—

Defaults to ON

PDFOptimizerDiscardNameTrees = 18
—

Defaults to ON

PDFOptimizerDiscardStructureTrees = 19
—

Defaults to ON

PDFOptimizerDiscardFileAttachments = 20
—

Defaults to ON

PDFOptimizerDiscardXMPPadding = 21
—

Defaults to ON Remove padding from XMP Metadata

PDFOptimizerDiscardUnusedForms = 22
—

Defaults to ON

PDFOptimizerDiscardPieceData = 23
—

Defaults to ON

PDFOptimizerCompressStreams = 24
—

Defaults to ON, indicates if Uncompressed Streams will be compressed when possible.

PDFOptimizerReplaceLZW = 25
—

Defaults to ON When set to false, the related option PDFOptimizerOptimizeContentStreams must also be disabled or Page /Contents that are LZW-compressed won't be affected.

PDFOptimizerDiscardMetadata = 26
—

Defaults to ON

PDFOptimizerDiscardDocumentInfo = 27
—

Defaults to ON

PDFOptimizerOptimizeContentStreams = 28
—

Defaults to ON, indicates if Page /Contents will be compressed when possible by removing redundancies and utilizing Flate compression.

PDFOptimizerLinearize = 29
—

Defaults to OFF

PDFOptimizerDiscardDuplicateForms = 30
—

Defaults to OFF

PDFOptimizerDiscardDuplicateObjects = 31
—

Defaults to ON

PDFOptimizerDiscardASCIIFilters = 32
—

Defaults to ON

PDFOptimizerDiscardComments = 33
—

Defaults to OFF, discards Markup Annotations

PDFOptimizerDiscardAnnotations = 34
—

Defaults to OFF, discards any Annotation besides Widgets

PDFOptimizerDiscardJavaScriptActions = 35
—

Defaults to OFF

PDFOptimizerFlattenOptionalContent = 36
—

Defaults to OFF

PDFOptimizerResubsetSubsetFonts = 37
—

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 = 38
—

Defaults to ON

PDFOptimizerDiscardUnusedImages = 39
—

Defaults to ON

PDFOptimizerDiscardUnusedFonts = 40
—

Defaults to ON

PDFOptimizerIncludeIndexedImages = 41
—

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 = 42
—

Defaults to OFF

PDFOptimizerDoNotConvertDeviceNImages = 43
—

Defaults to OFF

PDFOptimizerLastOption = 44
—

QRErrorCorrectionLevel

DLExtrasExpT.h:713

The Error Correction Level of the QR Code

Values
Low = 0
—

Can tolerate 7% of bad codewords.

Medium = 1
—

Can tolerate 15% of bad codewords.

Quartile = 2
—

Can tolerate 25% of bad codewords.

High = 3
—

Can tolerate 30% of bad codewords.

PDDocTextFinder

5 items

Functions(5)

PDDocTextFinderAcquireMatchList

PDDocTextFinderMatchList PDDocTextFinderAcquireMatchList(PDDocTextFinder mObj, PDDoc pdDoc, ASInt32 beginPageNumber, ASInt32 endPageNumber, const char *regexstr)
DLExtrasProcs.h:987

Finds all regular expression (regex) matches for the given page range. Only words within or partially within the page's crop box (see PDPageGetCropBox()) are included. Words outside the crop box are skipped. There can be only one match list in existence at a time; clients must release the previous match list, using PDDocTextFinderReleaseMatchList(), before creating a new one. Available only on Windows, Mac, and Linux platforms

Parameters
mObj: PDDocTextFinder

IN (Required) The document text finder used to acquire the match list.

pdDoc: PDDoc

IN (Required) The document to search for matches.

beginPageNumber: ASInt32

IN (Required) The beginning page number from which to search.
The first page is 0, not 1 as designated in Acrobat.
Pass PDAllPages (see PDExpT.h) to sequentially process all
pages in the document.

endPageNumber: ASInt32

IN (Required) The end page number from which to search to.
If beginPageNumber is set to PDAllPages, this parameter is ignored.

regexstr: const char *
Exceptions
pdErrBadRegex

PDDocTextFinderCreate

PDDocTextFinder PDDocTextFinderCreate(PDWordFinderConfig wfConfig)
DLExtrasProcs.h:919

Creates a document text finder that is used to extract words or phrases that match regular expressions from a PDF file based on words extracted using a given word finder configuration. Available only on Windows, Mac, and Linux platforms

Parameters
wfConfig: PDWordFinderConfig

IN (Required) The word finder configuration to be used to extract the words.

PDDocTextFinderCreateEx

PDDocTextFinder PDDocTextFinderCreateEx(PDWordFinderConfig wfConfig, PDDocTextFinderConfig dtfConfig)
DLExtrasProcs.h:937

Creates a document text finder with additional configurable properties. Available only on Windows, Mac, and Linux platforms

Parameters
wfConfig: PDWordFinderConfig

IN (Required) The word finder configuration to be used to extract the words.

dtfConfig: PDDocTextFinderConfig

IN (Required) The document text finder configuration to be used to configure the extracted text.

PDEContent

3 items

Functions(2)

PDEContentGetAttrsEx

void PDEContentGetAttrsEx(IN PDEContent pdeContent, OUT PDEContentAttrsExP attrsP, IN ASUns32 attrsSize)
PERProcs.h:3426

Obtains PDEContentAttrsEx, which gives matrix and bounding box in ASDouble Gets the attributes of a content.

Parameters
pdeContent: IN PDEContent

IN/OUT A content object.

attrsP: OUT PDEContentAttrsExP

IN/OUT (Filled by the method) A pointer to a PDEContentAttrsEx structure containing the attributes of the content.

attrsSize: IN ASUns32

IN/OUT The size of the attrsP buffer in bytes.

Returns
void
Exceptions
peErrWrongPDEObjectType

PDEContentToCosObjEx

void PDEContentToCosObjEx(IN PDEContent pdeContent, IN ASUns32 flags, IN PDEContentAttrsExP attrs, IN ASUns32 attrsSize, IN CosDoc cosDoc, IN PDEFilterArrayP filtersP, OUT CosObj *contentsP, OUT CosObj *resourcesP)
PEWProcs.h:108

This is the same as PDEContentToCosObj, above, except that the Content Attributes are passed as PDEContentAttrsEx, so as to allow for ASDouble Matrices and Bounding Boxes

Parameters
pdeContent: IN PDEContent
flags: IN ASUns32
attrs: IN PDEContentAttrsExP
attrsSize: IN ASUns32
cosDoc: IN CosDoc
filtersP: IN PDEFilterArrayP
contentsP: OUT CosObj *
resourcesP: OUT CosObj *
Returns
void

Structures(1)

PDEContentAttrsEx

PEExpT.h:492

A structure describing attributes of a PDEContent object. This is the same as the structure PDEContentAttrs, except it uses ASDouble values for Matrix

Fields
flags: ASUns32

PDEContentFlags

cacheDevice: ASFixed

If flags has kPDESetCacheDevice set, the first six cache device values contain the operands for the d1 (setcachedevice) page operator. If flags has kPDESetCacheDevice set, cacheDevice contains two charwidth values.

formType: ASInt32

Only used if PDEContent contains a Form XObject. It corresponds to FormType key in the XObject Form attributes dictionary.

bbox: ASFixedRect

Only used if PDEContent contains a Form. It is the bounding box of the PDEContent object. It corresponds to the BBox key in the XObject Form attributes dictionary.

matrix: ASDoubleMatrix

Only used if PDEContent contains a Form. It is the transformation matrix for the PDEContent object. It corresponds to the Matrix key in the XObject Form attributes dictionary.

XUID: CosObj

Only used if PDEContent contains a Form. It is the form's XUID, which is an ID that uniquely identifies the form. It corresponds to the XUID key in the XObject Form attributes dictionary.

PDEFont

1 items

Functions(1)

PDEFontCheckASTextIsRepresentable

DLExtrasProcs.h:338

Routine to check that the entire contents of an ASText are representable in the font. If the index parameter is not NULL and this function returns FALSE, the index will indicate the first character not representable in the font. An exception will be raised if the supplied font is incompatible with the API. Such may happen, for example, if font is a Type 1 font or if the font is retrieved from an existing PDF document.

Parameters
font: const PDEFont

The PDEFont to check against. Its type must be 'Type0' or 'TrueType'.

text: const ASText

An ASText containing the text to check

index: ASUns32 *

The index of the first character in the Unicode representation of the string that could not be represented in the font. May be NULL if the user wants to ignore this information.

Returns
ASBool

Whether the ASText is representable or not using the font.

PDEForm

7 items

Functions(7)

PDEFormCalcBBox

DLExtrasProcs.h:616

This function allows the BBox stored in a form's XObject to be recalculated after its contents have been modified. The bounding box of a form is set in the COS form, and is usually not changed by any event in the conversions between PDE and COS content. This is done so that the user may set the bounding box of a form so as to specifically clip its contents to a given path (the bounding box). Sometimes the content of a form is changed, and then the user may want to reset the form's bounding box to the size of the current content.

Parameters
form: PDEForm

the PDEForm whose BBox should be recalculated.

Returns
void

PDEGraphicFont

1 items

Functions(1)

PDEImage

2 items

Functions(2)

PDEImageGetColorValue

void PDEImageGetColorValue(IN PDEImage image, IN PDEColorValueP color)
PERProcs.h:3364

Gets an image's Color Value. This call is valid only for a PDEImage which is an Image Mask

Parameters
image: IN PDEImage

IN/OUT The image whose data is obtained.

color: IN PDEColorValueP
Returns
void
Exceptions
peErrUnknownPDEColorSpace
genErrBadParm
peErrWrongPDEObjectType

PDEImageRemoveIndexedColor

DLExtrasProcs.h:786

If the image input uses an indexed color space, a new image will be created from it. The new image will use the base color space. If the image is not using an indexed color model, the original image will be incremented and returned. Note: The image returned must be released when no longer needed.

Parameters
image: PDEImage

The Indexed image inP.

Returns
PDEImage

The new image or the original image.

PDEImageJPX

1 items

Functions(1)

PDEImageJPXGetSMask

DLExtrasProcs.h:1507

Retrieves the SoftMask image contained within the JPX-encoded data.

Parameters
pdeImageJPX: PDEImageJPX

IN The JP2K encoded image object. NOTE: The returned PDEImage must be released using PDERelease() when done using it.

Returns
PDEImage

The PDEImage representing the Soft Mask image of the JPX-encoded data if one is present, otherwise NULL.

PDEPS

1 items

Functions(1)

PDEPSGetCosObj

void PDEPSGetCosObj(IN PDEPS ps, OUT CosObj *cosObjP)
DLExtrasProcs.h:421

Get the CosObj for a Postscript Passthrough.

Parameters
ps: IN PDEPS

IN The PostScript XObject whose Cos object is obtained.

cosObjP: OUT CosObj *

OUT The Cos object of the PostScript XObject.

Returns
void

PDEPath

4 items

Functions(4)

PDEPathGetDataDouble

DLExtrasProcs.h:1100

Gets the size of the path data.

Parameters
path: IN PDEPath

IN The path whose data is obtained.

data: OUT ASDouble *

OUT A pointer to the path data.
If data is non-NULL, it contains a variable-sized array of path operators and operands.
The format is a 32-bit operator followed by 0 to 3 ASDouble values, depending on the operator. Opcodes are codes
for moveto, lineto, curveto, rect, or closepath
operators; operands are ASDouble values. If data is NULL, the number of bytes required for
data is returned by the method. Note that it returns raw path
data. If you want the points in page coordinates, concatenate
the path data points with the PDEElement matrix obtained
from PDEElementGetMatrix().

dataSize: IN ASUns32

IN Specifies the size of the buffer provided in data. If it is less than the
length of the path data, the method copies dataSize bytes.path.

Returns

PDEPathGetDataFloat

PERProcs.h:3407

Superseded by PDEPathGetDataEx(). Get path using float-point values for coordinate values. This effectively removes the PDEPathGetData implementation limit that path coordinate values need to be no larger than +/-32767.0.

Parameters
path: IN PDEPath
data: OUT ASFloat *
dataSize: IN ASUns32
Returns

PDEPathSetDataDouble

void PDEPathSetDataDouble(IN PDEPath path, IN ASDouble *data, IN ASUns32 dataSize)
DLExtrasProcs.h:1081

Sets the size of the path data.

Parameters
path: IN PDEPath

IN The path whose data is set.

data: IN ASDouble *

IN A pointer to the path data. It is a variable-sized array of path operators and operands.
The format is a 32-bit operator followed by zero to three ASDouble values, depending
on the operator. Operators are codes for moveto, lineto,
curveto, rect, or closepath operators, and must be
one of PDEPathElementType. Operands are ASDouble values. The data is copied into the PDEPath object.

dataSize: IN ASUns32

IN The size of the new path data in bytes.

Returns
void

PDEText

2 items

Functions(2)

PDETextAddASText

void PDETextAddASText(PDEText pdeText, ASUns32 flags, ASInt32 index, ASText text, PDEFont font, PDEGraphicStateP gstateP, ASUns32 gstateLen, PDETextStateP tstateP, ASUns32 tstateLen, ASFixedMatrixP textMatrixP)
DLExtrasProcs.h:363

Adds a character or a text run to a PDEText object, taking them from the ASText; thus Unicode characters can be placed in the PDEText. This function will accept characters that are not representable in the given font; such characters will be replaced with the .notdef glyph. An exception will be raised if the supplied font is incompatible with the API. Such may happen, for example, if font is a Type 1 font or if the font is retrieved from an existing PDF document.

Parameters
pdeText: PDEText

The text object to which a character or text run is added.

flags: ASUns32

A PDETextFlags that specifies what kind of text to add.

index: ASInt32

The index after which to add the character or text run.

text: ASText

An ASText containing the text to add

font: PDEFont

The PDEFont for the element. Its type must be 'Type0' or 'TrueType'.

gstateP: PDEGraphicStateP

A pointer to a PDEGraphicStateP structure with the graphics state for the element.

gstateLen: ASUns32

The length of the graphics state for the element.

tstateP: PDETextStateP

A pointer to a PDETextState structure with the text state for the element.

tstateLen: ASUns32

The length of the text state for the element.

textMatrixP: ASFixedMatrixP

A pointer to an ASFixedMatrix that holds the matrix for the element.

Returns
void

PDETextGetASText

void PDETextGetASText(PDEText pdeText, ASUns32 flags, ASInt32 index, ASText text)
DLExtrasProcs.h:412

Gets the text for a text run or character. The PDEFont associated with the PDEText must contain a ToUnicode table unless the descendant CIDFont uses the Adobe-GB1, Adobe-CNS1, Adobe-Japan1, or Adobe-Korea1 character collection.

Parameters
pdeText: PDEText

A text object containing a character or text run whose text is found

flags: ASUns32

A PDETextFlags that specifies whether index refers to a character or a text run.

index: ASInt32

The index of the character or text run in pdeText

text: ASText

An ASText that is filled with the text from the text item

Returns
void

PDETextItem

2 items

Functions(2)

PDETextItemCreateASText

PDETextItem PDETextItemCreateASText(ASText text, PDEFont font, PDEGraphicStateP gStateP, ASUns32 gStateLen, PDETextStateP textStateP, ASUns32 textStateLen, ASFixedMatrixP textMatrixP)
DLExtrasProcs.h:385

Creates a text element containing a character or text run which can be added to a PDEText object. This function will accept characters that are not representable in the given font; such characters will be replaced with the .notdef glyph. An exception will be raised if the supplied font is incompatible with the API. Such may happen, for example, if font is a Type 1 font or if the font is retrieved from an existing PDF document.

Parameters
text: ASText

An ASText containing the text to add. Note that passing an ASText containing an empty string will throw a genErrBadParm.

font: PDEFont

The PDEFont for the element. Its type must be 'Type0' or 'TrueType'.

gStateP: PDEGraphicStateP

A pointer to a PDEGraphicStateP structure with the graphics state for the element.

gStateLen: ASUns32

The length of the graphics state for the element.

textStateP: PDETextStateP

A pointer to a PDETextState structure with the text state for the element. Note that PDFEdit ignores the wasSetFlags flag of the PDETextState structure, so you must initialize the PDETextState fields.

textStateLen: ASUns32

The length of the text state for the element.

textMatrixP: ASFixedMatrixP

A pointer to an ASFixedMatrix that holds the matrix for the element.

Returns
Exceptions
genErrBadParm

PDFileAttachment

3 items

Functions(2)

Enums(1)

AFRelationship

DLExtrasExpT.h:745

Represents the relationship between the component of the PDF document that refers to this attachment and the file denoted by the attachment

Values
Source = 0
—

Original source material.

Data = 1
—

Information used to derive a visual presentation, e.g. table or graph.

Alternative = 2
—

Alternative representation of content, e.g. audio.

Supplement = 3
—

Supplemental representation of the original source or data that may be more easily consumable.

EncryptedPayload = 4
—

Encrypted payload document that should be displayed if the Processor has the cryptographic filter needed to decrypt it.

FormData = 5
—

Data associated with the AcroForm.

Schema = 6
—

Schema definition for the associated object.

UnspecifiedOrUnknown = 7
—

Relationship is not known or can't be described using of the other values.

PDFont

1 items

Functions(1)

PDFontXlateToUCSCanRaise

DLExtrasProcs.h:773

Translates a string from whatever encoding the PDFont uses to Unicode encoding. This may raise an error.

Parameters
fontP: PDFont

The font of the input string inP.

inP: ASUns8 *

A pointer to the string to translate.

inLen: ASInt32

The length of the inP buffer in bytes.

outP: ASUns8 *

(Filled by the method) A pointer to the translated string. If it is NULL, the method returns the size of the translated string.

outLen: ASInt32

The length of the outP buffer in bytes. If it is 0, the method returns the size of the translated string.

Returns
ASInt32

The number of bytes in the translated string in outP.

Exceptions
An
—

genErrBadParm can be raised.

PDPage

13 items

Functions(8)

PDPageAddQRBarcode

ASBool PDPageAddQRBarcode(PDPage page, ASText textToEncode, double x, double y, double width, double height)
DLExtrasProcs.h:1266

Add a QR Two-Dimensional Barcode encoded with the specified Text to the specified PDF page as an image.

Parameters
page: PDPage

The page of the PDF document.

textToEncode: ASText

The Text to be encoded in the barcode

x: double

The horizontal location on the page in points

y: double

The vertical location on the page in points

width: double

The width of the barcode image in points

height: double

The height of the barcode image in points

NOTE: The Error Correction Level is set to Medium.

Returns

PDPageDrawContentsToMemoryWithParams

ASSize_t PDPageDrawContentsToMemoryWithParams(PDPage page, PDPageDrawMParams drawParams)
DLExtrasProcs.h:49

Renders a page to memory. For use in rasterizing pages for viewing or previewing. This call supports the same rasterization parameters as PDPageDrawContentsToMemory, and also allows users to specify these additional arguments: • The destination rectangle (in ASFixed or ASReal notation) • The update rectangle (in ASFixed notation) • The transformation matrix (in ASFixed or ASReal notation) • The colorspace to use, as a named colorspace or as a color profile • The rendering intent to use for rendering • A request to ignore restrictions on content copying & page extraction • Default profile for uncalibrated RGB

Parameters
page: PDPage

The PDPage to be rendered.

drawParams: PDPageDrawMParams

Set of parameters describing how to rasterize the supplied PDPage, rasterizing the PDPage into a memory buffer supplied in the parameter set.

Returns
ASSize_t

the size of the buffer required to rasterize the PDPage if the buffer is not supplied and the length of the buffer is specified as 0.

PDPageDrawContentsToWindowWithParams

void PDPageDrawContentsToWindowWithParams(PDPage page, PDPageDrawWParams drawParams)
DLExtrasProcs.h:68

Renders a page to a (platform-dependent) window. For use in rasterizing pages for viewing or previewing. This API accepts a structure of type PDPageDrawWParams, which includes a set of ASReal-based values in the same manner as PDPageDrawContentsToMemoryWithParams. It is intended to address overflow or underflow issues with the ASFixed-based drawing APIs when rendering a page to a window object. Note: Platform: (!MAC_PLATFORM || (MAC_PLATFORM && !AS_ARCH_64BIT))

Parameters
page: PDPage

The PDPage to be rendered.

drawParams: PDPageDrawWParams

Set of parameters describing how to rasterize the supplied PDPage to a platform-dependent window object.

Returns
void

PDPageSetBlendingProfile

DLExtrasProcs.h:508

This function sets the blending profile for a PD page for the duration of of the PDPage. Effectively, this creates an isolated page level, a non-knockout transparency group with the specified profile for the page. This apparent group will be used in rendering the page, but it is not preserved when the document is saved. In order to create a persistent transparency group, the user must add a "Group" entry to the page dictionary.

Parameters
page: PDPage

The PDPage to be rendered.

profile: AC_Profile

The color blending profile to be used when rendering.

Returns
void

Structures(4)

PDPageDrawMParamsRec

PDPageDrawM.h:49

Parameters for PDPageDrawContentsToMemoryWith Params. Parameters supplied in the real-valued members will override those that take the ASFixed types if both are non-NULL.

Fields
size: ASInt32
destRect: ASFixedRect *

A pointer to the rectangle of the bitmap. It is defined in device space coordinates.

updateRect: ASFixedRect *

A pointer to the rectangle to draw, defined in user space coordinates. Any objects outside of updateRect will not be drawn. All objects are drawn if updateRect is NULL.

matrix: ASFixedMatrix *

A pointer to the matrix to be concatenated onto the default page matrix.

buffer: char *

A pointer to the bitmap data. If it is NULL, this function returns the size of the buffer needed for the bitmap.

cancelProc: CancelProc

A method to call to check whether drawing should be cancelled. If the method returns true, drawing is stopped, nothing is erased, and the buffer contains whatever was drawn up to the current state.

cancelProcData: void *

User-supplied data to pass to cancelProc each time it is called.

bufferSize: ASSize_t

The size of the buffer.

csAtom: ASAtom

The color space in which the bitmap data is represented. It must be one of DeviceGray, DeviceRGB, or DeviceCMYK. It may also be DeviceN after 8.1.0. DeviceRGBA is a special colorspace known to PDFL Rendering that can be used to produce a RGBA Bitmap (RGB + Alpha or 32-bit). DeviceCMYKA is a special colorspace known to PDFL Rendering that can be used to produce a CMYKA Bitmap (CMYK + Alpha or 40-bit).

bpc: ASInt32

The number of bits per color component in the bitmap data. 8 is the only valid value for DeviceCMYK, DeviceRGB and DeviceN color spaces. 1, 8, and 24 are valid for DeviceGray.

smoothFlags: ASUns32

A bit field of PDPageDrawSmoothFlags(). It must be an OR of the following flags:

• kPDPageDrawSmoothText

• kPDPageDrawSmoothLineArt

• kPDPageDrawSmoothImage

• kPDPageDrawSmoothBicubicImage

• kPDPageImageResampleBicubic

• kPDPageImageResampleLinear

• kPDPageImageAntiAlias

• kPDPageDrawSmoothAATextDDR

• kPDPageDrawSmoothAATextPreview

flags: ASUns32

A bit field of PDPageDrawFlags. It must be an OR of the following flags:

Flag
Description

kPDPageDoLazyErase
If set, it erases the bitmap if the first object drawn does not cover the page's entire crop box.

kPDPageUseAnnotFaces
If set, it draws annotations that have a default face, such as the visible fields in an Acrobat form. Text and link annotations are not drawn.

kPDPageIsPrinting
If set, then form annotations are rendered as if they are being printed. This means that form fields marked as 'Hidden but printable' are rendered, but fields marked as 'Visible but doesn't print' will not be rendered. If it is not set, then form annotations are rendered as if they are being viewed. This means that form fields marked as 'Hidden but printable' are not rendered, but fields marked as 'Visible but doesn't print' will be.

bypassCopyPerm: ASBool

Bypass copy permissions

asRealDestRect: ASRealRect *

A pointer to the rectangle of the bitmap expressed with real values. It is defined in device space coordinates. It must be set if destRect is NULL.

asRealUpdateRect: ASRealRect *

A pointer to the rectangle to draw, defined in user space coordinates and expressed in real values. Any objects outside of updateRect will not be drawn. All objects are drawn if updateRect is NULL.

Not supported yet, hopefully soon. Right now, it is internally truncated to a set of ASFixed types.

asRealMatrix: ASRealMatrix *

A pointer to the matrix to be concatenated onto the default page matrix, expressed as real values. It must be set if matrix is NULL.

iccProfile: AC_Profile

Specifies the characteristics of the colorspace used for rasterization; make sure it is compatible with the csAtom supplied.

For RGB and RGBA, this defaults to sRGB if not specified.

For Lab and LabA, this defaults to the CIE 1976 L*a*b definition w/ a D50 white point.

renderIntent: AC_RenderIntent

The render intent should ALWAYS be specified. The "normal" behavior for APDFL color conversions is to use one single intent, the intent specified in the source element, for both the source to PCS and PCS to destination conversions. When we specify an ICC Profile above, and an intent below, we will NOT do that, instead, we will use the element specified intent for the source to PCS conversion, and the specified intent for the PCS to destination conversion. To that end, a new intent AC_UseGStateIntent is defined. When this intent is used here, we will revert to the "normal" color conversion using only the element's specified intent. @note that the value "0" is a specification of Perceptual intent!

clientOCContext: PDOCContext

An optional-content context that determines what contents are visible. NULL uses the document's optional-content context, as returned by PDDocGetOCContext(pddoc), which is equivalent to calling the version of the method without optional content parameters.

This context is copied and the copy is used in drawing. This allows a client to change its copy of the context without raising an exception.

deviceNColorSize: ASUns8

The size of the colorants array if the user specifies "DeviceN" as the csAtom above.

deviceNColorCount: ASUns8 *

The number of colorants present in the bitmap if the user specifies "DeviceN" as the csAtom above. If the color count is set to zero on entry to the routine, the array of colorants will be filled in with the colors actually used on the page, starting with the 4 process colorants (C M Y and K) which will always be present. If color count is set to a non zero value on entry to the call, a bitmap will be constructed which contains the specified colorants, in the specified order.

deviceNColorInks: PDPageInkRec *

A pointer to an array of desriptions of process or seperation colorants, if the user specifies "DeviceN" as the csAtom above. If the pointer to deviceNColorInks is a null pointer, the value at deviceNColorCount will be set to the number of inks present on the page, but no bitmap will be drawn. Any colorants on the page not present in this array will be ignored. Colorants specified but not present on the page will have their channels set to zero.

progressProc: ASProgressProc

A pointer to a callback function for monitoring progress.

progressProcClientData: void *
Fields
size: ASInt32

The size of the data structure.

matrix: ASFixedMatrix *

A pointer to the matrix to be concatenated onto the default page matrix.

asRealMatrix: ASRealMatrix *

A pointer to the matrix to be concatenated onto the default page matrix, expressed as real values. It must be set if matrix is NULL.

window: void *

A pointer to a platform-dependent window object (HWND on Windows, NSWindow* on macOS). On Windows, to draw into an offscreen DC, pass NULL for window. On macOS/iOS, to draw into an offscreen bitmap context, pass NULL in window and pass a CGContextRef (from CGBitmapContextCreate) in displayContext.

displayContext: void *

A platform-dependent display context structure (HDC on Windows, CGContextRef on macOS/iOS). On macOS/iOS, displayContext is ignored if window is non-NULL.

Note:
displayContext cannot be reliably used as the hDC for a printer device.

flags: ASUns32

A bit field of PDPageDrawFlags. It must be an OR of the following flags:

Flag
Description

kPDPageDoLazyErase
If set, it erases the bitmap if the first object drawn does not cover the page's entire crop box.

kPDPageUseAnnotFaces
If set, it draws annotations that have a default face, such as the visible fields in an Acrobat form. Text and link annotations are not drawn.

kPDPageIsPrinting
If set, then form annotations are rendered as if they are being printed. This means that form fields marked as 'Hidden but printable' are rendered, but fields marked as 'Visible but doesn't print' will not be rendered. If it is not set, then form annotations are rendered as if they are being viewed. This means that form fields marked as 'Hidden but printable' are not rendered, but fields marked as 'Visible but doesn't print' will be.

clientOCContext: PDOCContext

An optional-content context that determines what contents are visible. NULL uses the document's optional-content context, as returned by PDDocGetOCContext(pddoc), which is equivalent to calling the version of the method without optional content parameters.

This context is copied and the copy is used in drawing. This allows a client to change its copy of the context without raising an exception.

flattenNoLimit: ASBool

Controls if the Flattening process has no limit. When the specified Device Content is a Printer Device and the document contains Transparency, it will be Flattened as an initial step. By default the flattening process has in force limits because otherwise processing can be costly. When output quality is critical however you can set this flag to true to ignore those limits and let the Flattener take as much time and resources as needed to produce a result.

PDPageEnumInksParamRec

DLExtrasExpT.h:257

Control structure for PDPageEnumInksWithParams

Fields
size: ASInt32

Size of the record

callBack: PDPageEnumInksCallback

Callback Procedure, will be called once for each ink

clientData: void *

client data passed to callback procedure

colorModel: ASAtom

Color Model being represented. This is an ASAtom of string, which may take one of 4 values:
Value
Result

ASAtomNull
Only separation colors will be specified

"DeviceCMYK"
Will report the 4 process colors, Cyan, Magenta, Yellow, and black, as well as the separation colors.

"DeviceRGB"
Will report the 3 process colors, Red, Green, and Blue, and all separation colors.

"DeviceGray"
Will report the process color Gray, as well as all separation colors.

includeOPI: ASBool

When true, Include inks used in OPI content

suppressDuplicateNames: ASBool

When True, Report only the first separation color for any given separation color name

Enums(1)

PDPageDeleteFlags

DLExtrasExpT.h:436

Page Deletion Flags.

Values
PDDeleteNormal = 1
—

Normal page deletion.

PDDeleteDoNotParseStructureTree = 2
—

Do not parse Structure Tree. For documents with a complicated Structure Tree, parsing can be exhorbitantly slow, set this flag to bypass processing it.

PDPref

17 items

Functions(17)

PDPrefGetPrintUsingWorkingSpaces

DLExtrasProcs.h:534

This function returns whether the device spaces are treated as calibrated when rendering. Note: This setting is only effective when the document is being rendered to memory, or a window, and kPDPageIsPrinting is true.

Parameters
: void
Returns
ASBool

if true, treats device spaces as calibrated to the associated working space profile. Otherwise, treats device spaces as uncalibrated

PDPrefSetAllowRelaxedSyntax

DLExtrasProcs.h:487

This call, with a True flag value, allows callers to ask Adobe PDF Library to attempt to ignore minor PDF syntax errors. For example, the Library may correct FontDescriptor entries with missing values by adding defaults, add a missing Supplement for Adobe Identity, or add a missing /FirstChar or /LastChar entry if the other of the pair is present, along with a valid Widths table).

Parameters
flag: ASBool

When true, this will tell the PDF Library to ignore certain minor PDF document errors.

Returns
void

PDPrefSetAllowStringRetrievalFailingDecryption

void PDPrefSetAllowStringRetrievalFailingDecryption(ASBool allowStringRetrievalFailingDecryption)
DLExtrasProcs.h:872

This call is used to retrive the value of String objects using an Encryption that's not supported by the Library in order to still retrieve the String's value. This is useful to Advanced Users who know how to interpret the String data when advanced Encryption is in use.

Parameters
allowStringRetrievalFailingDecryption: ASBool
Returns
void

PDPrefSetNeverUseOutputIntent

DLExtrasProcs.h:596

This function sets a flag to specify that the output intent should not be considered when rendering a document. This overrides the default behavior of the preference set with PDPrefSetUseOutputIntents. The PDPrefSetUseOutputIntents may still use the OutputIntent in spite of being set to false, if the document purports to be PDF/A, PDF/E, or PDF/X. Note: This setting defaults to false.

Parameters
value: ASBool

if true, the OutputIntent will not be used when rendering even for PDF/A, PDF/E, or PDF/X documents.

Returns
void

PDPrefSetPrintUsingWorkingSpaces

DLExtrasProcs.h:525

This function sets a flag to treat the device spaces as calibrated when rendering. Note: This setting is only effective when the document is being rendered to memory, or a window, and kPDPageIsPrinting is true.

Parameters
flag: ASBool

if true, treats device spaces as calibrated to the associated working space profile. Otherwise, treats device spaces as uncalibrated

Returns
void

PDSysFont

3 items

Functions(2)

PDSysFontCreateFromMemory

PDSysFont PDSysFontCreateFromMemory(const ASUns8 *fontProgram, ASSize_t fontProgramLen)
DLExtrasProcs.h:2018

Creates a PDSysFont from a font program the caller holds in memory. Use it when a font program does not come from a file on the local machine, for example a font that an application extracts from a container document. The program must be a TrueType, OpenType, CFF, or Type 1 font program. The library copies the bytes, so the caller may free its buffer as soon as this call returns. The returned PDSysFont works with every call that accepts a PDSysFont from PDFindSysFont(), including PDEFontCreateFromSysFontAndEncoding() with kPDEFontCreateEmbedded, and with the Datalogics Unicode calls such as PDEFontCheckASTextIsRepresentable(). The font stays private to the caller. It does not enter the font cache that PDEnumSysFonts() reports, and PDFindSysFont() does not return it. For that reason PDFLRescanFontDirectories() cannot invalidate it, and the font does not change the result of a font search that another part of the process makes. The caller owns one reference to the returned font. Release it with PDERelease() when the last PDEFont that uses it is released.

Parameters
fontProgram: const ASUns8 *

The font program bytes.

fontProgramLen: ASSize_t

The number of bytes in fontProgram.

Returns
PDSysFont

A new PDSysFont. The call raises an exception if the program is not a font program that CoolType can read.

PDSysFontGetFullName

ASText PDSysFontGetFullName(PDSysFont sysFont)
DLExtrasProcs.h:861

This method retrieves the full font name of a system font. Note: This method only returns a meaningful result for TrueType-based technology fonts.

Parameters
sysFont: PDSysFont
Returns

Enums(1)

PDSysFontMatchFlagsEx

DLExtrasExpT.h:576

Font matching flags for PDFindSysFont().

Values
kPDSysFontMatchNameAndCharSetEx = 0x0001
—

Match the font name and character set.

kPDSysFontMatchFontTypeEx = 0x0002
—

Match the font type.

kPDSysFontMatchWritingModeEx = 0x0004
—

Match the writing mode (horizontal or vertical).

kPDSysFontDontUseNameAsPrefixEx = 0x0008
—

The Legacy behavior of System Font Matching is when all conventional attempts have failed to yield a match to treat the entire font name as a prefix to match with available fonts. This behavior worked well for names with illegal characters or Unicode where matching is difficult, the user could provide the well-known part of the font name. However this prefix matching behavior isn't always desirable, using this flag will disable it

PDWord

3 items

Functions(3)

PDWordGetCharPoint

DLExtrasProcs.h:106

Gets the placement point of the character at a given index position in the word. If the specified character is constructed with multiple bytes, only the first byte returns a valid quad. Otherwise, this method returns false. The placement point is specified in user space coordinates.

Parameters
word: PDWord

The word whose character placement point is obtained.

byteIdx: ASInt16

The byte index within the word of the character whose placement point is obtained. Valid values are 0 to PDWordGetLength(word)-1.

point: ASFixedPoint *

(Filled by the method) Pointer to the character's placement point, specified in user-space coordinates.

Returns
ASBool

Returns true if the word has an nth quad, false otherwise.

PDWordGetNthQuadPoint

DLExtrasProcs.h:86

Gets the specified word's nth quad placement point, specified in user space coordinates.

Parameters
word: PDWord

The word whose nth quad is obtained.

nTh: ASInt16

The quad placement point to obtain. A word's first quad has an index of zero.

point: ASFixedPoint *

(Filled by the method) Pointer to the word's nth quad placement point, specified in user-space coordinates.

Returns
ASBool

Returns true if the word has an nth quad, false otherwise.