DL Logo

PDPage Enumerations

PDPageDeleteFlags

Header: DLExtrasExpT.h:429

Description

Page Deletion Flags.

Enum Constants

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.

Used By

PDPage Structures

PDPageEnumInksParam

Header: DLExtrasExpT.h:250

Description

Control structure for PDPageEnumInksWithParams

Syntax

struct PDPageEnumInksParam {
ASInt32 size;
Size of the record
Callback Procedure, will be called once for each ink
void *clientData;
client data passed to callback procedure
ASAtom colorModel;
Color Model being represented. This is an ASAtom of string, which may take one of 4 values:
Value
Result
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.
ASBool includeOPI;
When true, Include inks used in OPI content
ASBool suppressDuplicateNames;
When True, Report only the first separation color for any given separation color name
} PDPageEnumInksParamRec, *PDPageEnumInksParam;

Used By

_t_PDPageDrawMParamsRec

Header: PDPageDrawM.h:49

Description

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

Syntax

struct _t_PDPageDrawMParamsRec {
ASInt32 size;
ASFixedRect *destRect;
A pointer to the rectangle of the bitmap. It is defined in device space coordinates.
ASFixedRect *updateRect;
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.
ASFixedMatrix *matrix;
A pointer to the matrix to be concatenated onto the default page matrix.
char *buffer;
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.
void *cancelProcData;
User-supplied data to pass to cancelProc each time it is called.
ASSize_t bufferSize;
The size of the buffer.
ASAtom csAtom;
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).
ASInt32 bpc;
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.
ASUns32 smoothFlags;
ASUns32 flags;
A bit field of PDPageDrawFlags. It must be an OR of the following flags:
Flag
Description
If set, it erases the bitmap if the first object drawn does not cover the page's entire crop box.
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.
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.
ASBool bypassCopyPerm;
Bypass copy permissions
ASRealRect *asRealDestRect;
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.
ASRealRect *asRealUpdateRect;
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.
AC_Profile iccProfile;
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.
AC_RenderIntent 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.
PDOCContext clientOCContext;

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.

ASUns8 deviceNColorSize;
The size of the colorants array if the user specifies "DeviceN" as the csAtom above.
ASUns8 *deviceNColorCount;
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.
PDPageInkRec *deviceNColorInks;
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.
ASProgressProc progressProc;
A pointer to a callback function for monitoring progress.
void *progressProcClientData;
} PDPageDrawMParamsRec, *PDPageDrawMParams;

Used By

_t_PDPageDrawWParamsRec

Header: PDPageDrawM.h:199

Syntax

struct _t_PDPageDrawWParamsRec {
ASInt32 size;
The size of the data structure.
ASFixedMatrix *matrix;
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.
void *window;
A pointer to a platform-dependent window object ( HWND on Windows WindowPtr, or CWindowPtr on Mac OS). On Windows, to draw into an offscreen DC, pass NULL for window. On Mac OS, to draw into an offscreen GWorld, pass NULL in window and pass the GWorldPtr in displayContext.
void *displayContext;
A platform-dependent display context structure ( HDC on Windows, GWorldPtr on Mac OS). On Mac OS, displayContext is ignored if window is non- NULL.
ASUns32 flags;
A bit field of PDPageDrawFlags. It must be an OR of the following flags:
Flag
Description
If set, it erases the bitmap if the first object drawn does not cover the page's entire crop box.
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.
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.
PDOCContext clientOCContext;

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.

ASBool flattenNoLimit;
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.
} PDPageDrawWParamsRec, *PDPageDrawWParams;

Used By

PDPage Functions

PDPageAddQRBarcode

Header: DLExtrasProcs.h:1278

Description

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

Syntax

ASBool PDPageAddQRBarcode(PDPage page, ASText textToEncode, double x, double y, double width, double height);

Parameters

page
The page of the PDF document.
textToEncode
The Text to be encoded in the barcode
x
The horizontal location on the page in points
y
The vertical location on the page in points
width
The width of the barcode image in points
height
The height of the barcode image in points

Returns

if True, the Barcode was successfully added to the Page.

PDPageDrawContentsToMemoryWithParams

Header: DLExtrasProcs.h:49

Description

    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

Syntax

ASSize_t PDPageDrawContentsToMemoryWithParams(PDPage page, PDPageDrawMParams drawParams);

Parameters

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

Returns

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

Header: DLExtrasProcs.h:68

Description

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.

Syntax

void PDPageDrawContentsToWindowWithParams(PDPage page, PDPageDrawWParams drawParams);

Parameters

page
The PDPage to be rendered.
drawParams
Set of parameters describing how to rasterize the supplied PDPage to a platform-dependent window object.

PDPageEnumInksWithParams

Header: DLExtrasProcs.h:765

Description

Enumerates the inks for a page, using the supplied options specified in the parameters.

Syntax

void PDPageEnumInksWithParams(PDPage Page, PDPageEnumInksParam Params);

Parameters

Page
The page of interest.
Params
The parameters describing options for enumerating inks.

PDPageSetBlendingProfile

Header: DLExtrasProcs.h:512

Description

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.

Syntax

void PDPageSetBlendingProfile(PDPage page, AC_Profile profile);

Parameters

page
The PDPage to be rendered.
profile
The color blending profile to be used when rendering.