#define PDAllPages (( PDPageNumber ) - 3 )
#define PDBeforeFirstPage (( PDPageNumber ) - 1 )
#define PDEvenPagesOnly (( PDPageNumber ) - 5 )
#define PDLastPage (( PDPageNumber ) - 2 )
#define PDOddPagesOnly (( PDPageNumber ) - 4 )
#define kPDPageStmSkipComments 0x0001
#define kPDPageStmStringMax 256
#define kPDPageStmTokenHexString 0x0001
Value options for PDPageArea.
kPDPageArea | |
kPDClipArea | |
kPDNumAreas |
PDPageDrawFlagsPI. kPDPageDoLazyErasePI=0x00000001 | Erase the page while rendering only as needed.
|
kPDPageIgnoreIsolatedAndKnockoutTransparencyGroupPI=0x00000010 | Ignore Isolated and Knockout transparency at page boundary.
|
kPDPageUseAnnotFacesPI=0x00000040 | Draw annotation appearances.
|
kPDPageIsPrintingPI=0x00000080 | The page is being printed.
|
kPDPageDisplayOverPrintPreviewPI=0x00000100 | Display overprint preview.
|
kPDPageUseTrapAnnotsPI=0x00002000 | Use trap network annotations.
|
kPDPageDirectlyImposedPI=0x00004000 | Directly imposed page.
|
kPDPageIsPSPrintingPI=0x00008000 | PostScript printing.
|
kPDPageEmitPageGroupPI=0x00010000 | Emit a page group.
|
kPDPageUsePrinterMarkAnnotsPI=0x00020000 | User printer's mark annotations.
|
kPDPagePassOPItoAGMPortPI=0x00040000 | Pass open prepress interface (OPI) to AGM port.
|
kPDPagePassMetadatatoAGMPortPI=0x00080000 | Pass metadata to AGM port.
|
kPDPagePassOCtoAGMPortPI=0x00100000 | Pass optional content to AGM port.
|
kPDPageDoNotSubstituteWorkingSpacesPI=0x00800000 | Do not substitute working spaces.
|
kPDPageSwapComponentsPI=0x01000000 | Render colors in BGR order rather than RGB. It is only valid for calls to PDPageDrawContentsToMemory() and only when outputing to an RGB colorspace.
|
kPDPageSuppressRasterAlphaPI=0x02000000 | Suppress raster alpha.
|
kPDPageWorkingSpacesOnlyForChangePI=0x04000000 | If this is set, only use a working space instead of a device space if the process color model of the target device is different than that of the source
|
kPDPageUseStampAnnotsOnlyPI=0x08000000 | If set, only consider Stamp annotations. This overrides kPDPageUseAnnotFaces.
|
Value options for PDPageMode.
PDDontCare | Leaves the view mode as is.
|
PDUseNone | Displays the document, but displays neither thumbnails nor bookmarks.
|
PDUseThumbs | Displays the document plus thumbnails.
|
PDUseBookmarks | Displays the document plus bookmarks.
|
PDFullScreen | Displays the document in full-screen viewing mode. This is equivalent to AVAppBeginFullScreen().
|
PDContents | |
PDUseOC | Displays the document plus layers.
|
PDUseAttachments | Displays the document plus attachments.
|
Value options for PDRotate.
pdRotate0=0 | |
pdRotate90=90 | |
pdRotate180=180 | |
pdRotate270=270 |
0. typedef struct _t_PDPage *PDPage;
For value options see PDPageAreas.
typedef ASEnum16 PDPageArea;
PDPageDrawFlagsPIs. typedef ASUns32 PDPageDrawFlagsPI;
"A-" is used to generate "A-1", "A-2", "A-3", and so on). typedef OPAQUE_64_BITS PDPageLabel;
For value options see PDPageModes.
typedef ASEnum8 PDPageMode;
0-based page number for use in AVPageView and AVDoc methods. Negative for special values.
For value options see AdobePDFVersion.
typedef ASInt32 PDPageNumber;
For value options see PDPageRotation.
typedef ASEnum16 PDRotate;
ASBool PDPageEnumInksCallback(PDPageInk ink, void *clientData);
ASBool PDPageStmImageDataProc(ASUns8 *data, ASSize_t dataLen, void *clientData);
void PDPageStmStringOverflowProc(char *sVal, ASSize_t sValLen, void *clientData);
| |
The size of the structure. It must be set to
sizeof(PDHostSepsPlateRec). | |
The name of the colorant from the Separation or DeviceN colorspace, or a spot or process color name (Cyan, Magenta, Yellow, Black).
| |
| |
Set internally. It is used to determine whether marks were made on this plate to aid in blank detection.
| |
Set internally. It is the stream into which Acrobat emits PostScript for this plate. It is
NULL if whatToDo is not set to kEmitPlate. | |
Set internally. It is used only when separating documents, to close the file afterward.
| |
Set internally. It is used only when separating documents, to reopen the stream on the next page.
| |
float frequency; | The frequency for this ink. Set it to
-1 to use the default value. |
float angle; | The angle for this ink. Set it
-1 to use the default value. |
The ink type for this ink.
| |
The trap sequence for this ink.
| |
float density; | The neutral density for this ink.
|
Alias this spot to another.
| |
|
| |||||||||||
The size of the structure. It must be set to
sizeof(PDHostSepsSpecRec). | |||||||||||
The PostScript printing level. It is used if the | |||||||||||
When
true, emit annotations. | |||||||||||
When
true, emit halftones. | |||||||||||
When
true, emit transfer functions. | |||||||||||
When
true, emit separable images only. | |||||||||||
When
true, suppress CJK substitution. | |||||||||||
Font output options. Its values can be:
| |||||||||||
true means do not include Far East fonts. | |||||||||||
The transparency level, which can be
0-100. | |||||||||||
char destProfile [256]; | The profile description of a valid CMYK profile, such as the strings seen in the color management preferences in Acrobat (for example,
"U.S. Web Coated (SWOP) v2"). | ||||||||||
When
true, use the overprint preview (OPP) for converting to process, which better simulates what would happen if the spot ink were really used. | |||||||||||
The number of items in the
plates array. | |||||||||||
A list of the colorant names and what to do with them for separations.
| |||||||||||
The optional-content context to use for visibility state information, or
NULL to use the document's current states in the default context. | |||||||||||
Print-specific visiblity state settings are always applied from the optional-content group. applyOCGPrintOverrides is no longer honored. It is always considered as true whatever may be the value passed to it.
| |||||||||||
When
true, invert the plate. | |||||||||||
One of the following constants:
Mirroring is done in the PostScript output stream. | |||||||||||
A page mark indication. It is a bit-wise OR of the PDPageMarkFlags values.
| |||||||||||
When
true, use the western style for page marks. | |||||||||||
|
| |
The size of the structure. It must be set to
sizeof(PDPageInkRec). | |
The name of the colorant from the Separation or DeviceN colorspace, or the process color name.
| |
| |
RGB values for on-screen display of a colorswatch.
| |
float frequency; | The frequency for this ink.
|
float angle; | The angle for this ink.
|
The ink type for this ink.
| |
The trap sequence for this ink.
| |
float cyan; | CMYK values for spot inks, provided so that neutral density can be calculated
|
float magenta; | CMYK values for spot inks, provided so that neutral density can be calculated
|
float yellow; | CMYK values for spot inks, provided so that neutral density can be calculated
|
float black; | CMYK values for spot inks, provided so that neutral density can be calculated
|
float density; | The neutral density for this ink.
|
Alias this spot to another.
| |
|
0.
| |
The starting page number.
| |
The ending page number.
| |
|
0.
| |
The starting page number.
| |
The ending page number.
| |
|
| |
The size of this record. It is to be filled in by the caller.
| |
The type of token.
| |
Additional information about the token (for example, indicating a hex string).
| |
The value of the token if it is a CosInteger, ASFixed, or Name.
| |
The value of the token if it is a CosString.
| |
The number of bytes in
sVal. | |
|
Creates a PDEContent from the PDPage object's contents and resources. The PDEContent is cached, so that subsequent calls on the same PDPage return the same PDEContent, even if the request is from another PDFEdit client. The PDEContent remains in the cache as long as someone has it acquired- until someone not using the PDFEdit API changes the PDPage object's contents, such as the viewer rotating a page 90 degrees. Requires ‘Export’ permission on PDDoc.
Do not call PDERelease() on PDEContent you have acquired with PDPageAcquirePDEContent(); call PDPageReleasePDEContent() to release it.
PDEContent PDPageAcquirePDEContent(IN PDPage pdPage, IN ASExtension self);
pdPage | The page whose content object is acquired.
|
self | Identifies the caller or client. For plug-ins, this should be the gExtensionID extension. For the Adobe PDF Library, if there is only one client of the PDFEdit subsystem, this should be zero. If there are multiple clients, each should specify a nonzero, non-negative value. (A negative value is reserved for the implementation.)
|
void PDPageAcquirePage(PDPage pdPage);
pdPage | IN The page whose reference count is to be incremented.
|
void PDPageAddAnnot(PDPage aPage, ASInt32 addAfter, PDAnnot annot);
aPage | The page to which the annotation is added.
|
addAfter | The index into the page's annotation array where the annotation is added. See the description of Annotations in the ISO 32000-1:2008, Document Management-Portable Document Format-Part 1: PDF 1.7, section 12.5, page 381. You can find this document on the web store of the International Standards Organization (ISO). The first annotation in the array has an index of zero. Passing a value of |
annot | The annotation to add.
|
|
newContents. void PDPageAddCosContents(PDPage page, CosObj newContents);
page | IN/OUT The page whose Cos contents are replaced.
|
newContents | IN/OUT A stream Cos object or an array Cos object containing the new contents (stream Cos objects) for
page. |
Adds a Cos resource to a page object. See the description of Resource Dictionaries in ISO 32000-1:2008, Document Management- Portable Document Format-Part 1: PDF 1.7, section 7.8.3, page 82.
You can find this document on the web store of the International Standards Organization (ISO).
The necessary dictionaries are created automatically if the page does not already have any resources of the type specified by resType, or does not have a Resources dictionary. For example, if you specify a font resource, but the page does not already have a font resource dictionary, this method automatically creates one and puts the font you specify into it.
ProcSet resources cannot be added using this method; they must be added using Cos-level methods to:
void PDPageAddCosResource(PDPage page, const char *resType, const char *resName, CosObj resObj);
page | The page to which a resource is added.
|
resType | The resource type. The named resource types in PDF are: ExtGState, ColorSpace, Pattern, Shading, XObject, Font, and Properties. Although ProcSet is also a valid resource type, it cannot be added by this method.
|
resName | The resource name (for example, the name of a font might be
F1). |
resObj | The Cos object being added as a resource to page.
|
Adds an annotation to the page. To make the annotation visible after adding it, convert the coordinates of initialRect to device coordinates using AVPageViewRectToDevice(), then call AVPageViewInvalidateRect() using the converted rectangle. This method is equivalent to calling PDPageCreateAnnot() followed by PDPageAddAnnot().
The PDPageWillAddAnnot() and PDPageDidAddAnnot() notifications are broadcast before the PDPageAddNewAnnot() method returns. If you want to finish formatting the annotation before these notifications are called, for example, by adding additional key-value pairs to the annotation dictionary, you should call PDPageCreateAnnot() followed by PDPageAddAnnot() instead of PDPageAddNewAnnot().
PDAnnot PDPageAddNewAnnot(PDPage aPage, ASInt32 addAfter, ASAtom subType, const ASFixedRect *initialRect);
aPage | The page to which the annotation is added.
|
addAfter | Where to add the annotation in the page's annotation array. See the description of Annotations in the ISO 32000-1:2008, Document Management-Portable Document Format-Part 1: PDF 1.7, section 12.5, page 381. You can find this document on the web store of the International Standards Organization (ISO). Passing a value of |
subType | The subtype of the annotation to add.
|
initialRect | A pointer to a rectangle specifying the annotation's bounds, specified in user space coordinates.
|
|
Creates a new annotation, associated with the specified page's CosDoc, but not added to the page. Use PDPageAddAnnot() to add the annotation to the page.
If you want to create an annotation that prints even if the annotation handler is not present, you must provide an appearance for it. To do this, add an appearance key (AP) to the annotation dictionary, in which you place the Forms XObject for the Normal (N), Rollover (R), and Down (D) appearances; only the Normal appearance is required. Also, add a flags field (F) to the annotation dictionary and set the appropriate value for the bit field. A value of 4, which displays the annotation if the handler is not present, shows the annotation, and allows printing it, is recommended.
PDAnnot PDPageCreateAnnot(PDPage aPage, ASAtom subType, const ASFixedRect *initialLocation);
aPage | The page to whose PDDoc the annotation is added.
|
subType | The subtype of annotation to create.
|
initialLocation | A pointer to a rectangle specifying the annotation's bounds, specified in user space coordinates.
|
|
Draws the contents of a page into the specified window.
This method just draws a bitmap to the window. If you want a live document, you need to open an AVDoc for the PDF file.
The page can also be derived from a PDDoc.
On UNIX, this method cannot be used to draw into a window. UNIX developers should instead use AVDocOpenFromASFileWithParamString() to draw PDF files into their own window from a client.
Note: This method cannot be reliably used to print to a device.
void PDPageDrawContentsToWindow(PDPage page, void *window, void *displayContext, ASBool isDPS, ASFixedMatrix *matrix, ASFixedRect *updateRect, CancelProc cancelProc, void *cancelProcClientData);
page | The page to draw into
window. |
window | A pointer to a platform-dependent window object (
HWND on Windows, or WindowPtr). On Windows, to draw into an offscreen DC, pass NULL for window. |
displayContext | A platform-dependent display context structure (
HDC on Windows). Note that displayContext cannot be reliably used as the hDC for a printer device. |
isDPS | Currently unused. Always set it to
false. |
matrix | A pointer to the matrix to concatenate onto the default page matrix. It is useful for converting from page to window coordinates and for scaling.
|
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. |
cancelProc | The procedure called periodically to check for the user's cancelling of the drawing operation. The default cancel proc can be obtained using AVAppGetCancelProc(). It may be
NULL, in which case no cancel proc is used. |
cancelProcClientData |
window. It provides the ability to specify the flags passed in to the PDPageDrawContentsToWindows() function. Note: This function can only be called with a flags value of 0. The function is not supported with any other values for flags. flags = 0 means do not render the annotation faces. If you want to draw to a window with annotations, you should call the original PDPageDrawContentsToWindow(). In general, Adobe recommends that you not use PDPageDrawContentsToWindowsEx() unless you have a specific need to prevent the drawing of annotations.
void PDPageDrawContentsToWindowEx(PDPage page, void *window, void *displayContext, ASBool isDPS, ASFixedMatrix *matrix, ASUns32 flags, ASFixedRect *updateRect, CancelProc cancelProc, void *cancelProcClientData);
page | The page to draw into
window. |
window | A pointer to a platform-dependent window object (
HWND on Windows, or WindowPtr). On Windows, to draw into an offscreen DC, pass NULL for window. |
displayContext | A platform-dependent display context structure (
HDC on Windows). Note that displayContext cannot be reliably used as the hDC for a printer device. |
isDPS | Currently unused. Always set it to
false. |
matrix | A pointer to the matrix to concatenate onto the default page matrix. It is useful for converting from page to window coordinates and for scaling.
|
flags | See PDPageDrawFlagsPI for possible values.
|
updateRect | A rectangle represented by the coordinates of its four sides.
|
cancelProc | A procedure called periodically to check for the user's cancelling of the drawing operation. The default cancel procedure can be obtained using AVAppGetCancelProc(). It may be
NULL in which case no cancel procedure is used. |
cancelProcClientData |
Draws the contents of a page into the specified window.
This method just draws a bitmap to the window. If you want a live document, you need to open an AVDoc for the PDF file.
The page can also be derived from a PDDoc.
On UNIX, this method cannot be used to draw into a window. UNIX developers should instead use AVDocOpenFromASFileWithParamString() to draw PDF files into their own window from a client.
Note: This method cannot be reliably used to print to a device.
void PDPageDrawContentsToWindowEx2(PDPage page, void *window, void *displayContext, ASBool isDPS, ASDoubleMatrix *matrix, ASCab flags, ASDoubleRect *updateRect, ASCancelProc cancelProc, void *cancelProcClientData);
page | The page to draw into
window. |
window | A pointer to a platform-dependent window object (
HWND on Windows, or WindowPtr). On Windows, to draw into an offscreen DC, pass NULL for window. |
displayContext | A platform-dependent display context structure (
HDC on Windows). Note that displayContext cannot be reliably used as the hDC for a printer device. |
isDPS | Currently unused. Always set it to
false. |
matrix | A pointer to the matrix to concatenate onto the default page matrix. It is useful for converting from page to window coordinates and for scaling.
|
flags | See PDPageDrawFlagsPI for possible values.
|
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. |
cancelProc | The procedure called periodically to check for the user's cancelling of the drawing operation. The default cancel proc can be obtained using AVAppGetCancelProc(). It may be
NULL, in which case no cancel proc is used. |
cancelProcClientData |
void PDPageDrawContentsWithParams(PDPage page, PDDrawParams params);
page | The page to draw.
|
params | The parameters with which to draw the page, including the optional-content context to use for content visibility.
|
Enumerates the inks for a page, calling the supplied procedure for each PDPageInk structure.
For the DeviceCMYK_K process color model, it always finds the four inks Cyan, Magenta, Yellow, and Black, which are marked as process inks. The RGB values in the PDPageInk structure are the RGB equivalents (in system monitor space) of 100% of the ink, which can be used to show color swatches for a given ink.
If the inks are part of a DeviceN colorspace which has not been defined in a Colorants dictionary or elsewhere in a Separation colorspace, the color of the swatch is undefined.
This call finds all color spaces that are in a color space dictionary within the page, even if they are not used by the page contents.
void PDPageEnumInks(PDPage pdPage, PDPageEnumInksCallback proc, void *clientData, ASBool includeOPI);
pdPage | The page whose contents are enumerated.
|
proc | The user-supplied callback procedure to be applied to each ink. Enumeration ends if any procedure returns
false. |
clientData | A pointer to user-supplied data to pass to
proc each time it is called. |
includeOPI | If
true, enumerate inks contained in OPI dictionaries. |
Enumerates the inks for a page, calling the supplied procedure for each PDPageInk structure. This differs from PDPageEnumInks() in that it allows the process color model to be passed in.
For the DeviceCMYK_K process color model, it always finds the four inks Cyan, Magenta, Yellow, and Black, which are marked as process inks. The RGB values in the PDPageInk structure are the RGB equivalents (in system monitor space) of 100% of the ink, which can be used to show color swatches for a given ink.
If the inks are part of a DeviceN color space which has not been defined in a Colorants dictionary or elsewhere in a Separation color space, the color of the swatch is undefined.
This call finds all color spaces that are in a color space dictionary within the page, even if they are not used by the page contents.
void PDPageEnumInksEx(PDPage pdPage, PDPageEnumInksCallback proc, void *clientData, ASBool includeOPI, ASAtom colorModel);
pdPage | The page whose contents are enumerated.
|
proc | The user-supplied callback procedure to be applied to each ink. Enumeration ends if any procedure returns
false. |
clientData | A pointer to user-supplied data to pass to
proc each time it is called. |
includeOPI | If
true, enumerate inks contained in OPI dictionaries. |
colorModel | CMYK_K, RGB_K, or Gray_K. |
enumProc returns false. Each group is reported once, even if it is referenced multiple times in the page. void PDPageEnumOCGs(PDPage pdPage, PDOCGEnumProc enumProc, void *clientData);
pdPage | The page whose groups are enumerated.
|
enumProc | A user-supplied callback to call for each group. Enumeration terminates if
proc returns false. |
clientData | A pointer to user-supplied data to pass to
enumProc each time it is called. |
ASBool PDPageFlattenOC(PDPage pdPage, PDOCContext context);
pdPage | The page to be modified.
|
context | The optional-content context in which content is checked for visibility.
|
annotIndex annotation on the page. PDAnnot PDPageGetAnnot(PDPage aPage, ASInt32 annotIndex);
aPage | IN/OUT The page on which the annotation is located.
|
annotIndex | IN/OUT The index of the annotation to get on a page. The first annotation on a page has an index of zero.
|
ASInt32 PDPageGetAnnotIndex(PDPage aPage, PDAnnot anAnnot);
aPage | IN/OUT The page to which the annotation is attached.
|
anAnnot | IN/OUT The annotation whose index is obtained.
|
-1 if the annotation is not on the page. Returns the sequence number of the specified annotation for the given page. It is applicable only to annotations that are listed in Acrobat's Comments pane and therefore cannot be summarized using Summarize command (as would be the case for link and widget annotations, for example).
This method is similar to PDPageGetAnnotIndex() but it checks the information flags from the annotation handler's PDAnnotHandlerGetAnnotInfoFlagsProc() to determine whether the PDAnnotOperationSummarize flag is set, meaning that the annotation has a sequence number.
Note: The sequence number is one-based, while the index returned by PDPageGetAnnotIndex() is zero-based.
ASInt32 PDPageGetAnnotSequence(PDPage page, PDAnnot annot);
page | The page on which the annotation exists.
|
annot | The annotation for which the sequence number is desired.
|
-1 if the annotation is not in the page or if it is an annotation that cannot be summarized. void PDPageGetBBox(PDPage page, ASFixedRect *bboxP);
page | The page whose bounding box is obtained.
|
bboxP | (Filled by the method) A pointer to a rectangle specifying the page's bounding box, specified in user space coordinates.
|
boxName is CropBox, this call is equivalent to PDPageGetCropBox(); if the value is MediaBox, this call is equivalent to PDPageGetMediaBox(). ASBool PDPageGetBox(PDPage page, ASAtom boxName, ASFixedRect *box);
page | The page whose box is obtained.
|
boxName | An ASAtom representing the type of box. It can have values such as
ArtBox, BleedBox, CropBox, TrimBox, or MediaBox. |
box | (Filled by the method) An ASFixedRect specifying the page's box.
|
CosObj PDPageGetCosObj(PDPage page);
page | IN/OUT The page whose Cos object is obtained.
|
CosObj PDPageGetCosResources(PDPage page);
page | IN/OUT The page whose Cos resources are obtained.
|
void PDPageGetCropBox(PDPage page, ASFixedRect *cropBoxP);
page | The page whose crop box is obtained.
|
cropBoxP | (Filled by the method) A pointer to a rectangle specifying the page's crop box, specified in user space coordinates.
|
Y is increasing. void PDPageGetDefaultMatrix(PDPage pdPage, ASFixedMatrix *defaultMatrix);
pdPage | The page whose default transformation matrix is obtained.
|
defaultMatrix | (Filled by the method) A pointer to the default transformation matrix.
|
PDDoc PDPageGetDoc(PDPage page);
page | IN/OUT The page whose document is obtained.
|
ASFixed PDPageGetDuration(PDPage pdp);
pdp | The page whose timing value is obtained.
|
Y is decreasing. void PDPageGetFlippedMatrix(PDPage pdPage, ASFixedMatrix *flipped);
pdPage | The page whose flipped transformation matrix is obtained.
|
flipped | (Filled by the method) A pointer to the flipped transformation matrix.
|
void PDPageGetMediaBox(PDPage page, ASFixedRect *mediaBoxP);
page | IN/OUT The page whose media box is obtained.
|
mediaBoxP | IN/OUT (Filled by the method) A pointer to a rectangle specifying the page's media box, specified in user space coordinates.
|
ASInt32 PDPageGetNumAnnots(PDPage aPage);
aPage | The page for which the number of annotations is obtained.
|
aPage. ASInt32 PDPageGetNumber(PDPage page);
page | IN/OUT The page whose page number is obtained.
|
0. PDOCG *PDPageGetOCGs(PDPage pdPage);
pdPage | The page whose OCGs are obtained.
|
Gets filters used by PDPageSetPDEContent().
The caller is responsible for allocating the filter array filters that receives the filters. filters can be NULL to just obtain the number of filters.
ASBool PDPageGetPDEContentFilters(IN PDPage pdPage, OUT ASInt32 *numFilters, OUT ASAtom **filters);
pdPage | The page whose content filters are obtained.
|
numFilters | (Filled by the method) The number of filters used by PDPageSetPDEContent().
|
filters | (Filled by the method) The filters used by PDPageSetPDEContent(). If it is
NULL, numFilters contains the number of filters. |
ASBool PDPageGetPDEContentFlags(IN PDPage pdPage, OUT ASUns32 *flags);
pdPage | The page whose content flags are obtained.
|
flags | (Filled by the method) PDEContentToCosObjFlags flags.
|
displayContext to get the palette. This API was exposed for the purpose of the ImageConversion plug-in. When that code uses PDPageDrawContentsToWindow() to get a bitmap from AGM, it needs the palette that AGM used in order to get the correct results. ASBool PDPageGetPalette(PDPage page, void *displayContext, char *table);
page | The page whose palette is obtained.
|
displayContext | The bitmap.
|
table | (Filled by the method) The palette.
|
PDRotate PDPageGetRotate(PDPage page);
page | IN/OUT The page whose rotation is obtained.
|
PDTrans PDPageGetTransition(PDPage pdp);
pdp | The page whose transition is obtained.
|
NULL transition. 1.0 is returned. float PDPageGetUserUnitSize(PDPage page);
page | The page whose UserUnit value is being obtained.
|
1.0 if not present. void PDPageGetVisibleBBox(PDPage page, PDOCContext ocContext, ASBool includeAnnots, ASFixedRect *fr);
page | The page whose visible-content bounding box is obtained.
|
ocContext | The context within which the contents are visible.
|
includeAnnots | |
fr | (Filled by the method) A pointer to a rectangle specifying the page's visible content bounding box, specified in user space coordinates. The client must not pass
NULL. |
ASBool PDPageHasOverprintExt(PDPage pdPage);
pdPage | The page to check.
|
true only if the page contains overprint. ASBool PDPageHasTransition(PDPage pdp);
pdp | The page to test.
|
Note: To determine whether the page uses transparency, the resources of the page must be enumerated (though the page contents do not need to be parsed). The page resources may not be optimized for slow (browser-based) connections, so calling PDPageHasTransparency() before the page has been downloaded may cause unpleasant read behavior and performance problems.
ASBool PDPageHasTransparency(PDPage pdPage, ASBool includeAnnotAppearances);
pdPage | The page to check.
|
includeAnnotAppearances |
true only if the page uses any transparency features. Generates print color separations for a page.
This is the entry point for creating separations for a single page. The spec structure contains an array of PDHostSepsPlate pointers, (typically based on the page inks reported by PDPageEnumInks()), with settings such as what to do on each plate and the output stream for plates that are being produced. The client owns the memory for the array and all of the records in it, and is responsible for disposing of all allocated memory.
On completion, the marked flags in the wasColorSet field of the plates indicate whether each plate was marked, meaning that any marking operation happened, even if it was clipped away or knocked out later. The special All colorant in a Separation color space does not affect the marked flags.
For Adobe Reader and Acrobat, this method does nothing.
void PDPageMakeSeparations(PDPage pdPage, PDHostSepsSpec spec);
pdPage | The page.
|
spec | The separation specification structure containing parameters for the generation.
|
Broadcasts a PDPageContentsDidChange() notification. If the Acrobat viewer is version 2.1 or later, also broadcasts a PDPageContentsDidChangeEx() notification with invalidateViews set to true.
You must use this method after using Cos methods to change a page's contents. Do not use this method if you use PDPageAddCosContents() or PDPageRemoveCosContents() to change a page's contents, because those methods automatically generate the appropriate notifications.
Use PDPageNotifyContentsDidChangeEx() instead of this method if you wish to suppress the Acrobat viewer's immediate redraw of the page.
void PDPageNotifyContentsDidChange(PDPage page);
page | IN/OUT The page that changed.
|
Broadcasts a PDPageContentsDidChange() notification and a PDPageContentsDidChangeEx() notification. These notify the Acrobat viewer that a page's contents have been modified, and tells the Acrobat viewer whether to redraw the page immediately.
You must use this method after using Cos methods to change a page's contents. Do not use this method if you use PDPageAddCosContents() or PDPageRemoveCosContents() to change a page's contents, because those methods automatically generate the appropriate notifications.
If your plug-in must be compatible with version 2.0 of the Acrobat viewer, you must use PDPageNotifyContentsDidChange() instead.
void PDPageNotifyContentsDidChangeEx(PDPage page, ASBool invalidateViews);
page | The page that changed.
|
invalidateViews | true if the Acrobat viewer redraws the page view, false otherwise. This allows plug-ins to make a sequence of modifications to a page's contents, without having the entire page flash after each modification. Passing true for invalidateViews is equivalent to calling PDPageNotifyContentsDidChange(). |
Note: Do not call this method with a NULL Cos object.
ASInt32 PDPageNumFromCosObj(CosObj pageObj);
pageObj | IN/OUT The dictionary Cos object for the page whose number is obtained.
|
Indicates a page's PDEContent has changed.
Call this after you alter a PDPage object's PDEContent but do not call PDPageSetPDEContent(), so others who have acquired the PDEContent know it has changed.
void PDPagePDEContentWasChanged(IN PDPage pdPage, IN ASExtension self);
pdPage | The page whose content was changed.
|
self | Identifies the caller or client. For plug-ins, this should be the gExtensionID extension. For the Adobe PDF Library, if there is only one client of the PDFEdit subsystem, this should be zero. If there are multiple clients, each should specify a nonzero, non-negative value. (A negative value is reserved for the implementation.)
|
void PDPageRegisterForPDEContentChanged(IN PagePDEContentDidChangeNPROTO proc, IN ASExtension self);
proc | A callback for the function to call when an acquired PDPage object's PDEContent has changed.
|
self | Identifies the caller or client. For plug-ins, this should be the gExtensionID extension. For the Adobe PDF Library, if there is only one client of the PDFEdit subsystem, this should be zero. If there are multiple clients, each should specify a nonzero, non-negative value. (A negative value is reserved for the implementation.)
|
Register for the PagePDEContentNotCached() notification.
This notification is also sent when others change (or delete) a PDPage object's contents without using PDFEdit methods. For instance, rotating or deleting a page in the viewer results in this notification being sent.
PDFEdit registers for almost a half dozen different notifications for the different ways Acrobat can alter page contents; you may need only this notification.
void PDPageRegisterForPDEContentNotCached(IN PagePDEContentNotCachedNPROTO proc, IN ASExtension self);
proc | A callback for the function to call when an acquired PDPage object's PDEContent is no longer valid.
|
self | Identifies the caller or client. For plug-ins, this should be the gExtensionID extension. For the Adobe PDF Library, if there is only one client of the PDFEdit subsystem, this should be zero. If there are multiple clients, each should specify a nonzero, non-negative value. (A negative value is reserved for the implementation.)
|
void PDPageRelease(PDPage page);
page | IN/OUT The page whose reference count is decremented.
|
Decrements a PDPage object's PDEContent internal reference count.
The PDEContent is not automatically deleted when the reference count becomes zero: it remains in the cache until the cache slot is needed for another PDPage. Thus, you do not need to keep a PDEContent acquired for performance reasons. There is a notification for which you can register that is sent when a PDEContent is actually removed from the cache, thus enabling the use of PDFEdit object's tagging methods PDEAddTag(), PDEGetTag(), and PDERemoveTag() on the PDEContent object.
ASInt32 PDPageReleasePDEContent(IN PDPage pdPage, IN ASExtension self);
pdPage | The page whose content object's use count is decremented.
|
self | Identifies the caller or client. For plug-ins, this should be the gExtensionID extension. For the Adobe PDF Library, if there is only one client of the PDFEdit subsystem, this should be zero. If there are multiple clients, each should specify a nonzero, non-negative value. (A negative value is reserved for the implementation.)
|
void PDPageRemoveAnnot(PDPage aPage, ASInt32 annotIndex);
aPage | The page from which the annotation is removed.
|
annotIndex | The index (into the page's annotation array) of the annotation to remove.
|
|
void PDPageRemoveCosContents(PDPage page);
page | IN/OUT The page whose Cos contents are removed.
|
Removes a Cos resource from a page object. See the description of Resource Dictionaries in ISO 32000-1:2008, Document Management- Portable Document Format-Part 1: PDF 1.7, section 7.8.3, page 82.
You can find this document on the web store of the International Standards Organization (ISO).
void PDPageRemoveCosResource(PDPage page, const char *resType, const char *resName);
page | The page whose Cos resources are removed.
|
resType | The resource type. The named resource types in PDF are: ExtGState, ColorSpace, Pattern, Shading, XObject, Font, ProcSet, and Properties.
|
resName | The resource name (for example, the name of a font might be
F1). |
void PDPageResumePDEContentChanged(IN PDPage pdPage);
pdPage | IN/OUT The page whose content is changed.
|
Sets the box specified by boxName for the page.
This method may throw exceptions.
void PDPageSetBox(PDPage page, ASAtom boxName, ASFixedRect box);
page | IN/OUT The page for which the box is to be set.
|
boxName |
|
box | IN/OUT An ASFixedRect specifying the coordinates to set for the box.
|
void PDPageSetCropBox(PDPage page, ASFixedRect cropBox);
page | The page whose crop box is set.
|
cropBox | A rectangle specifying the page's crop box, specified in user space coordinates.
|
void PDPageSetDuration(PDPage pdp, ASFixed fxDuration);
pdp | The page whose timing is set.
|
fxDuration | The auto-advance timing, in seconds. If no advance timing is desired,
fxDuration should be set to fxDefaultPageDuration. |
void PDPageSetMediaBox(PDPage page, ASFixedRect mediaBox);
page | IN/OUT The page whose media box is set.
|
mediaBox | IN/OUT Rectangle specifying the page's media box, specified in user space coordinates.
|
Sets the page's PDEContent back into the PDPage object's Cos object, using the same compression filters with which the content was previously encoded.
In order to properly synchronize the page's contents after setting them with PDPageSetPDEContent(), you must call PDPageNotifyContentsDidChange(). If you do not call PDPageNotifyContentsDidChange(), the page displayed will use the old page contents.
ASBool PDPageSetPDEContent(IN PDPage pdPage, IN ASExtension self);
pdPage | The page whose PDEContent is set.
|
self | Identifies the caller or client. For plug-ins, this should be the gExtensionID extension. For the Adobe PDF Library, if there is only one client of the PDFEdit subsystem, this should be zero. If there are multiple clients, each should specify a nonzero, non-negative value. (A negative value is reserved for the implementation.)
|
Sets the page's PDEContent back into the PDPage object's Cos object, using the same compression filters with which the content was previously encoded. This method calls PDPageNotifyContentsDidChangeEx().
This method differs from PDPageSetPDEContent() in that it returns no value, but does raise an exception if it is unable to set the content.
void PDPageSetPDEContentCanRaise(IN PDPage pdPage, IN ASExtension self);
pdPage | The page whose PDEContent is set.
|
self | Identifies the caller or client. For plug-ins, this should be the gExtensionID extension. For the Adobe PDF Library, if there is only one client of the PDFEdit subsystem, this should be zero. If there are multiple clients, each should specify a nonzero, non-negative value. (A negative value is reserved for the implementation.)
|
ASBool PDPageSetPDEContentFilters(IN PDPage pdPage, IN ASInt32 numFilters, IN ASAtom *filters);
pdPage | The page whose content filters are set.
|
numFilters | The number of filters used by PDPageSetPDEContent().
|
filters | An array of filters to use by PDPageSetPDEContent().
|
ASBool PDPageSetPDEContentFlags(IN PDPage pdPage, IN ASUns32 flags);
pdPage | The page whose content flags are set.
|
flags |
|
void PDPageSetRotate(PDPage page, PDRotate angle);
page | The page whose rotation is set.
|
angle | Rotation value to be set for a given page. It must be one of the PDRotate values.
|
void PDPageSetTransition(PDPage pdp, PDTrans pdt);
pdp | The page whose transition is set.
|
pdt | The transition for the page.
|
void PDPageSetUserUnitSize(PDPage page, float unitSize);
page | The page whose UserUnit value is being set.
|
unitSize | UserUnit value to be set for the page dictionary. The default value is
1.0. |
is raised if
unitSize ≤ 0.0. |
Reads a PDF page content inline image from a stream. The stream is typically obtained by getting the Cos stream for a page contents or a Form contents, and calling CosStreamOpenStm() to open the stream using the filtered mode. This method is called after a BI token has been read from the stream. BI indicates that the following tokens comprise an inline image dictionary and data.
It begins reading at the current stream position. It returns the number of bytes read. This is the number of bytes read from the stream and indicates the amount by which the stream position has advanced.
The image attributes dictionary is returned in imageDict. The image data is passed to the PDPageStmImageDataProc(); if proc is not provided, the image data is discarded.
imageRawDataStmOffsetP and imageRawDataLenP may be NULL, in which case they are ignored.
The caller should call CosObjDestroy() on imageDict when it is done.
This method can raise memory, I/O, and parsing exceptions.
ASUns32 PDPageStmGetInlineImage(ASStm stm, ASUns32 flags, CosDoc cosDoc, CosObj resDict, PDPageStmImageDataProc proc, void *procClientData, ASUns32 *imageRawDataStmOffsetP, ASUns32 *imageRawDataLenP, CosObj *imageDict);
stm | The stream from which data is read.
|
cosDoc | |
resDict | The Resources dictionary in which to look up ColorSpace resources for inline images.
|
flags | Currently unused by this method (used by PDPageStmGetToken().)
|
proc | A callback method to handle inline image data.
|
procClientData | Client data passed to
proc. |
imageRawDataStmOffsetP | (Filled by the method) The offset of the data stream, after BI, relative to the beginning of
stm. |
imageRawDataLenP | (Filled by the method) The offset of the last byte of the data stream between the BI and EI PDF operators.
|
imageDict | (Filled by the method) The returned image dictionary.
|
stm. Reads a PDF page content token from a stream. The stream is typically obtained by getting the Cos stream for a page contents or a Form contents, and calling CosStreamOpenStm() to open the stream using the filtered mode.
It begins reading at the current stream position, and reads exactly one token. It returns the number of bytes read. This is the number of bytes read from the stream and indicates the amount by which the stream position has advanced. The end-of-stream criteria (loop terminating condition) is the following:
NULL object is returned (an object of type CosNull).1.
If the token is an integer, real (ASFixed), or ASBool, then the value is returned in pageStmToken.iVal. If the token is a string or a name, the value is returned in pageStmToken.sVal, and the length of the token is in pageStmToken.sValLen. Strings are not NULL-terminated, but names are NULL-terminated. If a string length is greater than kPDPageStmStringMax, the PDPageStmStringOverflowProc() is called repeatedly with portions of the string. On return from PDPageStmGetToken, the value of pageStmToken.sValLen is zero, and pageStmToken.sVal is empty ( ival, sVal, and sValLen are components of the PDPageStmToken). If there is no overflow proc, then the first kPDPageStmStringMax bytes of the string will be returned in pageStmToken.sVal, and the remaining bytes are lost. The value of pageStmToken.sValLen is kPDPageStmStringMax in this case.
If the token is BI (begin inline image), PDPageStmGetInlineImage() should be called to parse the inline image.
This method can raise memory, I/O, and parsing exceptions.
ASUns32 PDPageStmGetToken(ASStm stm, ASUns32 flags, PDPageStmStringOverflowProc proc, void *procClientData, PDPageStmToken pageStmToken);
stm | The stream from which data is read.
|
flags | A bit field of options such as 'skip comments' (kPDPageStmSkipComments means skip comments during token generation).
|
proc | A callback method to handle long strings.
|
procClientData | Client data passed to the callback method.
|
pageStmToken | The returned token.
|
stm. void PDPageSuspendPDEContentChanged(IN PDPage pdPage);
pdPage | IN/OUT The page whose content is changed.
|
void PDPageUnRegisterForPDEContentChanged(IN PagePDEContentDidChangeNPROTO proc, IN ASExtension self);
proc | A callback for the function to call when an acquired PDPage object's PDEContent has changed.
|
self | Identifies the caller or client. For plug-ins, this should be the gExtensionID extension. For the Adobe PDF Library, if there is only one client of the PDFEdit subsystem, this should be zero. If there are multiple clients, each should specify a nonzero, non-negative value. (A negative value is reserved for the implementation.)
|
void PDPageUnRegisterForPDEContentNotCached(IN PagePDEContentNotCachedNPROTO proc, IN ASExtension self);
proc | IN/OUT A callback for the function to call when an acquired PDPage object's PDEContent is no longer valid.
|
self | IN/OUT Identifies the caller/client. For plug-ins, this should be the gExtensionID extension. For the Adobe PDF Library, if there is only one client of the PDFEdit subsystem,
clientID should be zero. If there are multiple clients, each should specify a nonzero, non-negative clientID. (A negative clientID is reserved for the implementation.) |