LayerPD_Layer
ObjectPDDoc

A PDDoc object represents a PDF document. There is a correspondence between a PDDoc and an ASFile. Also, every AVDoc has an associated PDDoc, although a PDDoc may not be associated with an AVDoc.

A plug-in may create a new document or open a document using an ASFileSys and an ASPlatformPath. These frequently provide access to disk files, but could also provide access to PDF files by other methods, such as via a network. Because PDlayer objects do not have a concept of an active document, or even of a user, getting the PDDoc of a document opened by the user requires calls to AV layer objects.

Each PDF document contains, among other things:

These objects correspond to CosObj objects in the catalog of a CosDoc. However, they also have PD layer equivalents which are accessible directly through PDDoc methods. Other objects in the catalog of a PDF file may require Cos methods to access.

When you merge a PDF file containing form fields that have appearances, those appearances and forms data are merged along with all the other page contents. If you merge a file that has forms data into another file that has forms data, name conflicts are resolved (in the same way the Acrobat Forms plug-in resolves these conflicts).

Querying PDDoc Permissions

With Acrobat 5.0 and later, plug-ins can query the permissions on a PDDoc to a finer granularity than in previous Acrobat releases. Plug-ins can query specific PDDoc objects and for specific operations authorized to be performed on those objects. At the PDDoc level, for example, plug-ins can query whether printing the document is fully allowed, allowed only at a low resolution, or not allowed under any circumstances. A plug-in can request the applicable operations authorized for any the following objects:

To obtain the permissions, a plug-in can call the PDDocPermRequest() method (which replaces PDDocGetPermissions() used with earlier Acrobat versions). The plug in can request, for example, whether a particular operation can be performed on a particular object (from the list above) for a specified PDDoc. The plug-in may, for example, request whether permissions allow a rotating operation on a page object in the PDDoc.

See the PDPermReqOpr and PDPermReqObj enumerations for a list of all the operations (PDPermReqOpr) that each object (PDPermReqObj) supports (and a plug-in can request using PDDocPermRequest()).

New callbacks have been added to the security handler structure PDCryptHandler to support the finer granularity of permissions that plug-ins can query.

Enumeration With PDDoc Objects

The core API provides several methods that enumerate all objects of a particular type. This can be useful, either because there is no way to access the objects (such as PDPath objects) directly, or for convenience (such as using PDDocEnumFonts to enumerate all fonts used in a document).

The methods can be especially useful with PDDoc objects. When these methods are called, Acrobat enumerates the specified objects, and calls a plug-in-specified callback procedure for each object of that type. For example, when PDDocEnumFonts() is called, Acrobat enumerates all fonts used in the document, calling a procedure provided for each font it finds. Enumeration is complete after the enumeration method returns.

Your plug-in can call an enumeration method and create an array of found elements to be used later. Alternately, your plug-in can search for a particular item and, upon finding the item, stop the enumeration and immediately return. Using enumeration methods, your plug-in can find any toolbar or menu item, or any number of elements on a page.

Enumeration methods may take a monitor as a parameter. A monitor is a C structure that contains pointers to one or more plug-in-supplied callback procedures. The API calls one or more of the functions defined in the monitor for each object in a list. One method that uses a monitor is PDPathEnum(), which provides a set of callbacks for each path object in a page's display list (list of marking operations that represent the displayed portion of a page). This allows a plug-in to be aware of (but not to alter the rendering of) the path objects in a page.



Define Summary
 Define
 kPDDocReadAheadAcroForms
Allows the AcroForm client to request that all the AcroForm data be read ahead, before the viewer needs it. This flag is ignored if the PDF file does not contain a Forms hint table. See Section F.3.5 in the PDF Reference for information about the Forms hint table.
 kPDDocReadAheadPageLabels
Requests that the PDF file's page label data be read ahead, before the viewer needs it. There is currently no page label hint table defined, so this flag simply causes the rest of the file to be read.
 kPDDocReadAheadRenditions
 kPDDocReadAheadStructure
Requests that the PDF file's logical structure data be read ahead, before the viewer needs it. There is currently no logical structure hint table defined, so this flag simply causes the rest of the file to be read.
 kPDDocReadAheadTemplates
Requests that the PDF file's Forms Template data be read ahead, before the viewer needs it. There is currently no Template hint table defined, so this flag simply causes the rest of the file to be read.
 PDAllPages
 PDBeforeFirstPage
 PDCryptFilterStringProc
 PDDocCreateTextSelect
 PDDocGetWordFinder
 pdInfoCanCopy
The document text and graphics can be copied to the clipboard.
 pdInfoCanEdit
The document can be modified (for example, by adding notes, links, or bookmarks).
 pdInfoCanEditNotes
The document's notes, but nothing else, can be modified.
 pdInfoCanPrint
The document can be printed.
 pdInfoHasOwnerPW
The document has an owner password.
 pdInfoHasUserPW
The document has a user password.
 pdPermAll
PDPermsFlags
 pdPermCopy
The user can copy information from the document to the clipboard. In the document restrictions, this corresponds to the Content Copying or Extraction entry.
 pdPermEdit
The user can edit the document more than adding or modifying text notes (see also pdPermEditNotes). In the Document Security dialog, this corresponds to the Changing the Document entry.
 pdPermEditNotes
The user can add, modify, and delete text notes (see also pdPermEdit). In the document restrictions, this corresponds to the Authoring Comments and Form Fields entry.
 pdPermExt
PDPermsFlags
 pdPermOpen
The user can open and decrypt the document.
 pdPermOwner
The user is permitted to perform all operations, regardless of the permissions specified by the document. Unless this permission is set, the document's permissions will be reset to those in the document after a full save.
 pdPermPrint
The user can print the document. Page Setup access is unaffected by this permission, since that affects Acrobat's preferences - not the document's. In the Document Security dialog, this corresponds to the Printing entry.
 PDPermReqDenied
-1 The request was denied.
 PDPermReqGranted
0 The request was granted.
 PDPermReqOperationNA
3 The operation is not applicable for the specified object.
 PDPermReqPending
The handler does not have enough information to determine an answer at this point. Try again later.
 PDPermReqUnknownObject
1 The object is unknown.
 PDPermReqUnknownOperation
2 The operation is unknown.
 PDPermReqVersion
 pdPermSaveAs
The user can perform a Save As.... If both pdPermEdit and pdPermEditNotes are disallowed, Save will be disabled but Save As... will be enabled. The Save As... menu item is not necessarily disabled even if the user is not permitted to perform a Save As....
 pdPermSecure
The user can change the document's security settings.
 pdPermSettable
The OR of all operations that can be set by the user in the security restrictions (pdPermPrint + pdPermEdit + pdPermCopy + pdPermEditNotes).
 pdPermUser
All permissions.
 pdPrivPermAccessible
Overrides pdPermCopy to enable the Accessibility API. If a document is saved in Rev2 format (Acrobat 4.0 compatible), only the pdPermCopy bit is checked to determine the Accessibility API state.
 pdPrivPermDocAssembly
Overrides various pdPermEdit bits and allows the following operations: page insert/delete/rotate and create bookmark and thumbnail.
 pdPrivPermFillandSign
Overrides other PDPerm bits. It allows the user to fill in or sign existing form or signature fields.
 pdPrivPermFormSpawnTempl
This should be set if the user can spawn template pages. This bit will allow page template spawning even if pdPermEdit and pdPermEditNotes are clear.
 pdPrivPermFormSubmit
This should be set if the user can submit forms outside of the browser. This bit is a supplement to pdPrivPermFillandSign.
 pdPrivPermHighPrint
This bit is a supplement to pdPermPrint. If it is clear (disabled) only low quality printing (Print As Image) is allowed. On UNIX platforms where Print As Image doesn't exist, printing is disabled.
Typedef Summary
 Typedef
 PDCryptBatchHandler
 PDCryptBatchHandlerRec
 PDCryptFilterHandler
 PDCryptFilterHandlerRec
 PDCryptHandler
 PDCryptHandlerRec
 PDDoc
The underlying PDF representation of a document. There is a correspondence between a PDDoc and an ASFile; the PDDoc object is the hidden object behind every AVDoc. An ASFile may have zero or more underlying files, so a PDF file does not always correspond to a single disk file. For example, an ASFile may provide access to PDF data in a database.
 PDDocAddWatermarkParams
 PDDocAddWatermarkParamsRec
 PDDocBatesNumberingParams
 PDDocBatesNumberingParamsRec
 PDDocCopyParams
 PDDocCopyParamsRec
 PDDocFlags
A signed int (which is never negative), for historical reasons.
 PDDocInsertPagesParams
 PDDocInsertPagesParamsRec
 PDDocLayoutParams
 PDDocLayoutParamsRec
 PDDocOpenParams
A structure used by PDDocOpenWithParams() to specify file open information. The parameters are very similar to those in PDDocOpenEx() and PDDocOpenFromASFileEx().
 PDDocOpenParamsRec
 PDDocPreSaveInfo
 PDDocPreSaveInfoRec
 PDDocSaveParams
 PDDocSaveParamsRec
 PDDocVersion
A signed int (which is never negative), for historical reasons.
 PDDocWatermarkTextParams
 PDDocWatermarkTextParamsRec
 PDPermReqStatus
The set of valid PDPermRequestStatus values providing the status of PDDoc-related permissions methods.
 PDPerms
Constant values that specify permissions which allow operations on a document file.
 PDSmallFlagBits
A flag value for use in PDDocInsertPagesParams().
 PDTile
 PDTileEx
 PDTrapPreset
Enumeration Summary
 Enumeration
  GCHTextType
  PDDocFontFlags
  PDDocOCChangeType
PDDocOCChangeType is an enumeration of types of changes to the optional content structures of a PDDoc. These types of changes may effect visibility in all PDOCContext objects. This enumeration is used in the PDDocOCWillChange() and PDDocOCDidChange() notifications. These notifications typically pass in the affected page, or PDAllPages if all pages may be affected.
  PDDocRequestReason
This tells the callback why it is being called.
  PDDocSaveFlags
An enumerated data type that specifies various file status attributes. These flags indicate the state of the document and whether it needs to be saved or deleted on close, and so on. The flags are used as a bit field. More than one value may be set. Some flags may be set or get only. Most can be either set or get.
  PDEndStyle
  PDHorizAlign
  PDInsertFlags
Used by PDDocInsertPages().
  PDJoinStyle
  PDOCDrawEnumType
PDOCDrawEnumType controls drawing or enumerating the page with respect to optional content. It is an enumerated type that, together with the NonOCDrawing value, controls drawing or enumerating content on a page with optional content:
  PDOperation
An enumerated data type that specifies the type of changes that occurred for the PDDocPrintingTiledPage() and PDDocDidChangePages() notifications. Not all Did notifications have corresponding Will notifications.
  PDPermReqObj
The document object type. The applicable operations are: PDPermReqOprAll PDPermReqOprModify (Doc Info, open action, page label, modifying document) PDPermReqOprCopy (Copy to clipboard) PDPermReqOprAccessible PDPermReqOprSelect (Selection only) PDPermReqOprOpen PDPermReqOprSecure PDPermReqOprPrintHigh PDPermReqOprPrintLow PDPermReqOprFullSave PDPermReqOprImport (Non-PDF) PDPermReqOprExport (Non-PDF and text extraction API, Search & Catalog) PDPermReqOprAny
  PDPermReqOpr
An enumerated data type used to describe the target operation of a permissions request.
  PDPlacementTypes
  PDPrintWhat
Passed to the PDDocWillPrintDocInMode() notification to specify the type of print operation being performed.
  PDPrintWhatAnnot
  PDPrintWhatFlip
  PDVertAlign
Variable Summary
 Variable
 gPDBatesHFT
Structure Summary
 Structure
 _t_PDCryptBatchHandler
Callbacks used to open secured files and to modify security settings while batch processing a list of files. These callbacks are not called while opening files through the user interface. In addition, the regular PDCryptHandler functions are not called during batch operations.
 _t_PDCryptFilterHandler
PDCrypt Filter support:
 _t_PDCryptHandler
A data structure containing callbacks that implement a security handler. The callbacks implement the security handler functions. For example, they get authorization data such as a password from the user, set permissions, read and write security-related data in a PDF file, and so on.
 _t_PDDocAddWatermarkParams
Parameters used for adding and describing watermarks.
 _t_PDDocBatesNumberingParams
Parameters used for describing Bates Numbering. As an example, Bates Numbering with start=100 nDigits=6 would look like 000100, 000101, 000102, 000103....
 _t_PDDocCopyParams
A structure used by PDDocCopyToFile() to specify file copy information.
 _t_PDDocInsertPagesParams
A structure used to pass information to the PDDocWillInsertPagesEx() and PDDocDidInsertPagesEx() notifications.
 _t_PDDocLayoutParams
Parameters used for adding and describing Bates Numbering.
 _t_PDDocOpenParams
A structure used by PDDocOpenWithParams() to specify file open information. The parameters are very similar to those in PDDocOpenEx() and PDDocOpenFromASFileEx().
 _t_PDDocPreSaveInfo
A structure used to flag Cos objects you wish to access while a PDDoc is being saved. It contains a pointer to a CosObjSetCallbackFlagProc(). In your pre-save callback, you can use this exposed proc to set a flag in the CosObj objects that you care about, so that your callback will be called back during the save and given their offset and length.
 _t_PDDocSaveParams
Parameters used when saving a file with PDDocSaveWithParams() and returned by the PDDocWillSaveEx() notification. Most of these parameters are the same as the parameters for PDDocSave().
 _t_PDDocWatermarkTextParams
Parameters used for describing text-based watermarks.
 PDTileRec
Printing flags
 PDTileRecEx
 PDTrapPresetRec
Callback Summary
 Callback
 PDCryptAuthorizeExProc
Replaces PDCryptAuthorizeProc. PDPerms are now obsolete because Acrobat 5.0 introduces new permission controls. However, Acrobat still supports old security handlers.
 PDCryptAuthorizeProc
A callback for PDCryptHandler. It is called by PDDocAuthorize() when a user tries to set security for an encrypted document and by a PDAuthProc() when a user tries to open a file.
 PDCryptBatchAuthorizeProc
A callback for PDCryptBatchHandler. It is called when a PDF file is opened. It is first called with NULL authData for the case without a user password. It is called again with authorization data provided for the security handler that matches the one used in the PDF file.
 PDCryptBatchFreeAuthDataProc
A callback for PDCryptBatchHandler. If provided, it must be used to free authData acquired via BatchGetAuthData() or BatchNewAuthData(). If no BatchFreeAuthData() function is provided, a default one will be used which calls ASfree() on the authData if it is non-NULL.
 PDCryptBatchNewAuthDataProc
A callback for PDCryptBatchHandler. It is different from the regular PDCryptHandler NewAuthData function. It creates and returns a void* which is the authorization data for the batch security handler. This data should be used to batch both open files and secure files. Therefore, make sure to provide password information for both the pdPermOpen and pdPermSecure cases. This data will be passed to the PDCryptBatchAuthorizeProc() callback and eventually to PDCryptBatchFreeAuthDataProc() to free the data. This authorization data is collected before any files are opened in the batch sequence. It is permitted to display a user interface at this point since the batch operation has not started yet. The data applies to all files, and therefore could represent one or more passwords which can be enumerated in the BatchAuthorize function which receives the batch authorization data.
 PDCryptBatchParamDescProc
A callback for PDCryptBatchHandler. The developer should provide information about the current batch settings for the security handler. Batch settings are provided as a read-only ASCab that is passed to the function. A writable ASCab is also provided, which should be used to store parameter information about the security handler. The description information should be stored starting in the paramDesc ASCab using ASText objects starting with key " 1".
 PDCryptBatchPostSequenceProc
A callback for PDCryptBatchHandler. This function is called at the end of a batch sequence after all files have been processed. Any memory that was allocated in the BatchPreSequence() call should be cleaned up in this callback.
 PDCryptBatchPreSequenceProc
A callback for PDCryptBatchHandler. This function is called at the beginning of a batch sequence before any files have been opened. This allows a security handler to be called back with the ASCab of settings that were filled out by the BatchShowDialog() function, or by an ASCab that was read in from disk. Pointers of security information are not serialized to disk, and therefore a security information structure may need to be regenerated based on other security information in the ASCab. It is permitted for the BatchPreSequence() callback to put up a user interface asking the user for more information since the batch sequence has not started yet. If this function returns false, the viewer will assume that the command cannot be executed and will cancel the sequence.
 PDCryptBatchShowDialogProc
A callback for PDCryptBatchHandler. This callback puts up a dialog box that allows a user to enter data that will be used to batch secure a series of files. The data is stored in an ASCab which is part of a batch sequence file. The actual security data, including password(s), should be stored as a pointer in the ASCab so that password information is not serialized to disk. Pointers are not serialized from ASCab objects, but ASText objects, ASInt32 objects, and ASBool objects are serialized.
 PDCryptBatchUpdateSecurityDataProc
A callback for PDCryptBatchHandler. This function should update the crypt handler's security data without bringing up a dialog. This data is provided by a PDCryptBatchShowDialogProc(). The current security data can be obtained by calling PDDocGetNewSecurityData().
 PDCryptCanParseEncryptDictProc
(Optional) This call is used to provide PDCrypt handler interoperability. When an encrypted document is being opened and the security handler specified in the encryption dictionary is not present, this callback is used to determine if one of the registered security handlers can be used to open the document.
 PDCryptDisplaySecurityDataProc
Called when the security handler should bring up a document (security) information dialog box with the current settings. It also should return true when the user wants to change the settings.
 PDCryptEncryptDocMetadata
(Optional) A callback for PDCryptHandler. It determines whether a document's metadata will be encrypted. If this call is not implemented, the metadata is always encrypted. Note that documents with plain text metadata can be opened only by Acrobat versions 6.0 and later.
 PDCryptFillEncryptDictProc
A callback for PDCryptHandler. It is called when an encrypted document is saved. It fills the document's Encryption dictionary with whatever information the security handler wants to store in the document.
 PDCryptFilterAuthorizeProc
(Optional) A callback for PDCryptFilterHandler. Acrobat's security mechanism calls this method to determine whether the user should have access to this filter.
 PDCryptFilterGetDataProc
(Optional) A callback for PDCryptFilterHandler. Acrobat's security mechanism calls this method to retrieve the encryption/decryption key for this filter. It is called only when the filter's encryption method is V2.
 PDCryptFilterStreamProc
(Optional) A callback for PDCryptFilterHandler. Callbacks that conform to this prototype are called to encrypt or decrypt streams from a document.
 PDCryptFreeAuthDataProc
(Optional) A callback for PDCryptHandler. It is used to free authorization data acquired via PDCryptNewAuthDataProc(). If this callback is omitted, the viewer defaults to freeing the data using ASfree().
 PDCryptFreeCryptDataProc
(Optional) A callback for PDCryptHandler. It is used to free authorization data acquired via PDCryptNewCryptDataProc(). If this callback is omitted, the viewer defaults to freeing the data using ASfree().
 PDCryptFreeSecurityDataProc
(Optional) A callback for PDCryptHandler. It is used to free security data acquired via PDCryptNewSecurityDataProc(). If this callback is omitted, the viewer defaults to freeing the data using ASfree().
 PDCryptGetAuthDataExProc
Replaces PDCryptGetAuthDataProc(). It is called whenever Acrobat needs to get authorization data and/or check permissions for operations.
 PDCryptGetAuthDataProc
A callback for PDCryptHandler. This callback is called from a PDAuthProc when a file is opened after PDCryptNewSecurityDataProc() is called.
 PDCryptGetDocPermsProc
A callback for PDCryptHandler. This function should extract and return information about the document permissions to display for the user: whether the user can print, edit, copy text and graphics, edit notes and do form fill in and signing.
 PDCryptGetInfoTextProc
(Optional) A callback for PDCryptHandler. It provides information for display about document security settings.
 PDCryptGetSecurityInfoProc
(Optional) A callback for PDCryptHandler. It is called by PDDocGetNewSecurityInfo(). It extracts the security information from the security data structure, and returns the security information.
 PDCryptNewAuthDataProc
(Optional) A callback for PDCryptHandler. It creates a new empty authorization data structure. This structure is subsequently filled by PDCryptGetAuthDataProc(), then passed to PDCryptAuthorizeProc() and eventually to ASfree().
 PDCryptNewCryptDataExProc
A callback for PDCryptHandler. It sets up the key to be passed to initialize the RC4 cipher for encryption and decryption of a PDF file. It is called when an encrypted document is opened or saved.
 PDCryptNewCryptDataProc
A callback for PDCryptHandler. It sets up the key to be passed to initialize the RC4 cipher for encryption and decryption of a PDF file. It is called when an encrypted document is opened or saved.
 PDCryptNewSecurityDataFromOriginalDocProc
Called when the application needs to open a rolled back portion of the original document. A rolled back document is the original portion of the document when it is digitally signed. This functionality is used for document modification detection.
 PDCryptNewSecurityDataProc
(Optional) A callback for PDCryptHandler. It creates and populates a new structure that contains whatever security-related information the security handler requires (for example, permissions, whether the file has owner and/or user passwords, owner and/or user passwords, or other data used internally by the security handler). If encryptDict is not NULL, the structure should be populated based on the encryptDict parameter's contents. This method is intended only to initialize the security data structure.
 PDCryptReservedProc
(Optional) A callback for PDCryptHandler. It is used by the Acrobat WebBuy proprietary method of passing crypt data.
 PDCryptReservedProc2
(Optional) Used by Acrobat for Automated Permission Testing.
 PDCryptUpdateSecurityDataProc
A callback for PDCryptHandler. It updates the security data structure that was created by PDCryptNewSecurityDataProc(). This structure can be obtained by calling PDDocGetNewSecurityData(). The security data structure of the previously saved file can be obtained with a call to PDDocGetSecurityData().
 PDCryptValidateSecurityDataProc
(Optional) A callback for PDCryptHandler. It validates the security data structure, which specifies the user's permissions. This callback may modify the security data structure (for example, because the user is not authorized to change the security as they requested). A client may have called PDDocNewSecurityData() to obtain a new security data structure, then modified it, and then called PDDocSetNewSecurityData() to change the document security. This callback should be called before actually setting the document's security data.
 PDDocEnumProc
A callback for PDEnumDocs(). It is called once for each open PDDoc.
 PDDocPreSaveProc
A callback in the PDDocSaveParams structure used by PDDocSaveWithParams(). Use this callback to flag Cos objects you wish to access while a PDDoc is being saved.
 PDDocPreWriteProc
A callback in the PDDocSaveParams structure. It is invoked by PDDocSaveWithParams() immediately before a PDDoc is saved to disk.
 PDDocRequestEntireFileProc
A callback used by PDDocRequestEntireFile. Use this callback to process a document file.
 PDDocRequestPagesProc
A callback for PDDocRequestPages().
 PDDocWillExportAnnotCallback
A callback for PDDocExportNotes. It determines whether an annotation is exported.
 PDDocWillExportAnnotProc
A callback for PDAnnotHandler. It determines whether an annotation is exported.
 PDDocWillImportAnnotCallback
A callback for PDDocImportCosDocNotes() and PDDocImportNotes(). It determines whether an annotation will be imported.
 PDDocWillImportAnnotProc
A callback for PDAnnotHandler. It determines whether an annotation will be imported.
 PDDocXAPMetadataDidChangeProc
Receives the notification that the XMP metadata describing a document as a whole has changed.
 PDOCFindOutAutoStatePrefProc
Declare the type PDOCFindOutAutoStatePrefProc, which is a callback that lets the client set the AutoState preference.
 PDOCFindOutLanguageProc
Declare the type PDOCFindOutLanguageProc, which is a callback that lets the client set the current user interface language level.
 PDOCFindOutUserProc
Declare the type PDOCFindOutUserProc, which is a callback that lets the client set the current user interface user level.
 PDOCFindOutZoomProc
Declare the type PDOCFindOutZoomProc, which is a callback that lets the client set the current user interface zoom level.
 StdPassword
Method Summary
 Method
 
ASBool PDCryptAuthorizeFilterAccess(PDDoc doc, ASAtom handlerName, ASAtom filterName, ASBool bEncrypt)
Gets authorization to encrypt or decrypt an embedded file, where that file's cryptographic filter is not the one used to open the document in which the file is embedded.
 
Increments a document's reference count. The document will not be closed until the reference count is zero, or the application terminates.
 
PDPage PDDocAcquirePage(PDDoc doc, ASInt32 pageNum)
Gets a PDPage from a document. It increments the page's reference count. After you are done using the page, release it using PDPageRelease(). If PDPageRelease() is not called, it could block the document containing the page from being closed. To avoid such problems, use the CSmartPDPage class, as it ensures that the page is released as it goes out of scope.
 
Adds Bates Numbering to a PDF document.
 
void PDDocAddThread(PDDoc doc, ASInt32 addAfterIndex, PDThread thread)
Adds an article thread to a document after the specified thread index.
 
Adds a PDPage as a watermark to a page range in the given document.
 
Adds a text-based watermark to a page range in the given document.
 
Applies a set of redaction marks to the document, permanently removing the affected document content and the marks themselves.
 
PDPerms PDDocAuthorize(PDDoc pdDoc, PDPerms permsWanted, void* authData)
Deprecated in Acrobat 7.0. Use PDDocPermRequest() instead.
 
Notifies all registered implicit metadata calculators to run. It issues the notification PDDocCalculateMetadata(), passing pdDoc to all registered handlers.
 
void PDDocCalculateMetadata(PDDoc doc, void* clientData)
The client is requested to calculate and set metadata items that depend on the state of the document. It is issued when a document is saved. It can also be issued explicitly via PDDocCalculateImplicitMetadata() .
 
void PDDocCallOPIHandler(OPIdict* opi, ASStm stm, ASBool* bl, void* clientData)
Sent during PostScript printing, when a form or image containing an OPI dictionary is encountered. If it returns true (by filling the boolean variable passed to it), the client is presumed to have taken care of the entire form or image, and PDFL will emit nothing. Otherwise, PDFL will generate OPI comments based on the dictionary.
 
Clears all the non-fatal errors encountered since the document was opened, or PDDocClearErrors was called.
 
void PDDocClearFlags(PDDoc doc, ASInt32 flags)
Clears flags associated with a document. This method is most frequently used to mark a modified document as clean (by clearing the PDDocNeedsSave flag) to avoid bringing up the Save dialog box when the file is closed.
 
void PDDocClose(PDDoc doc)
Closes a document and releases its resources. If doc is NULL, it does nothing. Changes are not saved. You must use PDDocSave() to save any modifications before calling PDDocClose().
 
In Adobe Reader or for documents that are not dirty, this method copies the bytes from the document's ASFile to the specified location. This also occurs if the saveChanges field in params is false. If saveChanges is true, the document is dirty, and the product is Acrobat, a full save is performed to the specified file. The resulting file is linearized (optimized for the web). If the file already exists, it is overwritten.
 
ASInt32 PDDocCountXAPMetadataArrayItems(PDDoc pdDoc, ASText namespaceName, ASText path)
Returns the number of array items in a property array associated with a PDDoc.
 
PDDoc PDDocCreate()
Creates a new document. The only Cos object in the document will be a Catalog. See Section 3.6 in the PDF Reference. After the document is created, at least one page must be added using PDDocCreatePage() or PDDocInsertPages() before the Acrobat viewer can display or save the document.
 
PDNameTree PDDocCreateNameTree(PDDoc thePDDoc, ASAtom theTree)
Retrieves the name tree inside the Names dictionary with the specified key name, or creates it if it does not exist.
 
PDPage PDDocCreatePage(PDDoc doc, ASInt32 afterPageNum, ASFixedRect mediaBox)
Creates and acquires a new page. The page is inserted into the document at the specified location. Call PDPageRelease() when you are done using the page.
 
PDCollection PDDocCreatePDCollection(PDDoc pdDoc)
Creates a collection in a document. It replaces any existing collection.
 
PDAnnot PDDocCreateRedaction(PDDoc pdDoc, PDRedactParams redactionProps)
Creates a redaction mark on a given page. The resulting annotation will be added to the page, but the affected content will not be removed until PDDocApplyRedactions is called with this mark.
 
void PDDocCreateStructTreeRoot(INPDDoc pdDoc, OUTPDSTreeRoot* treeRoot)
Creates a new StructTreeRoot element.
 
PDTextSelect PDDocCreateTextSelect(PDDoc doc, ASInt32 pageNum, ASFixedRect* boundingRect)
Creates a text selection that includes all words totally or partially enclosed by a rectangle. The text selection can then be set as the current selection using AVDocSetSelection().
 
void PDDocCreateThumbs(PDDoc doc, ASInt32 firstPage, ASInt32 lastPage, PDThumbCreationServer server, void* serverClientData, ASAtom colorSpace, ASInt32 bitsPerComponent, ASInt32 hiVal, char* lookupTable, ProgressMonitor progMon, void* progMonClientData, CancelProc cancelProc, void* cancelProcClientData)
Creates thumbnail images for the specified range of pages. Thumbnail images are only created for pages that have none.
 
PDWordFinder PDDocCreateWordFinder(PDDoc doc, ASUns16* outEncInfo, char** outEncVec, char** ligatureTbl, ASInt16 algVersion, ASUns16 rdFlags, void* clientData)
Creates a word finder that is used to extract text in the host encoding from a PDF file. The word finder may either be used by PDWordFinderEnumWords() (which enumerates words one-by-one) or by PDWordFinderAcquireWordList() (which fills a table with all the words on a page).
 
PDWordFinder PDDocCreateWordFinderEx(PDDoc doc, ASInt16 algVersion, ASBool outUnicode, PDWordFinderConfig wbConfig)
This is a version 6.0 replacement for PDDocCreateWordFinder() and PDDocCreateWordFinderUCS() that adds configurable word-breaking behavior. This method creates a word finder that is used to extract text from a PDF file, according to the given configuration. The word finder can be used to enumerate words one-by-one or to fill a table with all the words on a page. You can choose to find only words that are visible in a given context.
 
PDWordFinder PDDocCreateWordFinderUCS(PDDoc doc, ASInt16 algVersion, ASUns16 rdFlags, void* clientData)
Creates a word finder that is used to extract text in Unicode format from a PDF file. The word finder may either be used by PDWordFinderEnumWords() (which enumerates words one-by-one) or by PDWordFinderAcquireWordList() (which fills a table with all the words on a page).
 
Removes a collection dictionary from a document.
 
void PDDocDeletePages(PDDoc doc, ASInt32 firstPage, ASInt32 lastPage, ProgressMonitor progMon, void* progMonClientData)
Deletes the specified pages.
 
void PDDocDeleteThumbs(PDDoc doc, ASInt32 firstPage, ASInt32 lastPage, ProgressMonitor progMon, void* progMonClientData)
Deletes thumbnail images for a range of pages in a document.
 
void PDDocDidAddThread(PDDoc doc, PDThread thread, void* clientData)
A thread has been added to a document.
 
void PDDocDidChangePageAreas(PDDoc pdDoc, ASInt32 areaMask, ASInt32 firstPage, ASInt32 lastPage, void* clientData)
Page areas changed.
 
void PDDocDidChangePages(PDDoc doc, PDOperation op, ASInt32 fromPage, ASInt32 toPage, ASInt32 error, void* clientData)
Pages have been inserted, deleted, moved, or modified.
 
void PDDocDidChangeThumbs(PDDoc doc, void* clientData)
Thumbnail images have been added or removed. In addition to the expected ways in which this can occur, it can also occur if pages are inserted into a file.
 
void PDDocDidClose(PDDoc doc, void* clientData)
A PDDoc closed. A PDDoc is closed only if its reference count is zero.
 
void PDDocDidDeletePages(PDDoc doc, ASInt32 fromPage, ASInt32 toPage, ASInt32 error, void* clientData)
One or more pages were deleted.
 
void PDDocDidExportAnnots(PDDoc doc, void* clientData)
The annotations of a document were exported.
 
void PDDocDidImportAnnots(PDDoc doc, void* clientData)
The annotations from one document were imported into another document.
 
void PDDocDidInsertPages(PDDoc doc, ASInt32 insertAfterThisPage, PDDoc srcDoc, ASInt32 srcFromPage, ASInt32 srcToPage, ASInt32 error, void* clientData)
One or more pages have been inserted.
 
void PDDocDidInsertPagesEx(PDDocInsertPagesParams params, void* clientData)
Pages were inserted into a document. This notification occurs after the PDDocDidInsertPages() notification.
 
void PDDocDidMovePages(PDDoc doc, ASInt32 moveAfterThisPage, ASInt32 fromPage, ASInt32 toPage, ASInt32 error, void* clientData)
One or more pages were moved.
 
void PDDocDidOpen(PDDoc doc, void* clientData)
A document was opened.
 
void PDDocDidPrintPage(PDDoc doc, ASInt32 page, ASStm stm, ASInt32 error, void* clientData)
This notification is broadcast once per page that is printed, after all marks have been made on the page. When printing to a PostScript printer, printing commands can also be sent that will be placed on the page after all other marks.
 
void PDDocDidPrintPages(PDDoc doc, ASInt32 fromPage, ASInt32 toPage, ASInt32 error, void* clientData)
This notification is broadcast after printing ends.
 
void PDDocDidPrintTiledPage(PDDoc doc, ASInt32 page, ASStm stm, ASInt32 error, ASInt32 whichTile, ASInt32 numTiles, void* clientData)
This notification is obsolete in Acrobat 7.0 and later.
 
void PDDocDidRemoveThread(PDDoc doc, ASInt32 index, void* clientData)
A thread was removed from a document.
 
void PDDocDidReplacePages(PDDoc doc, ASInt32 fromPage, ASInt32 toPage, PDDoc srcDoc, ASInt32 srcFromPage, ASInt32 srcToPage, ASInt32 error, void* clientData)
One or more pages have been replaced.
 
void PDDocDidSave(PDDoc doc, ASInt32 err, void* clientData)
A document has been saved.
 
void PDDocEnumFonts(PDDoc doc, ASInt32 firstPage, ASInt32 lastPage, PDFontEnumProc eproc, void* clientData, ProgressMonitor progMon, void* progMonClientData)
Enumerates all the fonts in the specified page range. This may take a considerable amount of time for a large page range.
 
void PDDocEnumLoadedFonts(PDDoc doc, PDFontEnumProc proc, void* clientData)
Enumerates all the fonts that have been encountered so far. A font is loaded when a page that uses it is processed. This typically happens when a page is drawn or its thumbnail image is created.
 
void PDDocEnumOCConfigs(PDDoc pdDoc, PDOCConfigEnumProc enumProc, void* clientData)
Enumerates the optional-content configurations for the document, calling the supplied procedure for each one. These include the configuration for the D configuration dictionary and those for all entries in the Configs array dictionary.
 
void PDDocEnumOCGs(PDDoc pdDoc, PDOCGEnumProc enumProc, void* clientData)
Enumerates the optional-content groups for the document, calling the supplied procedure for each one. Enumeration continues until all groups have been enumerated, or until enumProc returns false. Each group is reported once, even if it is referenced multiple times in a page, or on multiple pages.
 
Enumerates the elements in the document's structure tree that have UserProperties attributes or classes, calling the supplied enumeration procedure for each such element found. The procedure returns true to continue enumeration, or false to halt enumeration.
 
void PDDocEnumResources(PDDoc pdDoc, ASInt32 startPage, ASInt32 endPage, ASAtom resourceType, CosObjEnumProc enumProc, void* clientData)
Enumerates the specified type of page resources, for a specified range of pages.
 
CosDoc PDDocExportNotes(PDDoc doc, ASFileSys unused1, ASPathName unused2, void* unused3, void* unused4, PDDocWillExportAnnotCallback exportFilter, ASInt32* numNotesP)
Creates a document containing empty pages plus text annotations (notes) from sourceDoc. It does not create a new document if sourceDoc contains no notes.
 
CosDoc PDDocExportSomeNotes(PDDoc doc, ASFileSys unused1, ASPathName unused2, void* unused3, void* unused4, PDDocWillExportAnnotCallback exportFilter, PDAnnotArray pdanArray, ASInt32* numNotesP)
Like PDDocExportNotes(), but the caller provides the list of annotations to export. This is useful in scenarios when it may be inappropriate to use PDDocExportNotes() and look for annotations on every page. This is an especially important consideration when in a browser.
 
ASInt32 PDDocFindPageNumForLabel(PDDoc pdDoc, const char* labelStr, ASInt32 labelLen)
Superseded by PDDocFindPageNumForLabelEx() in Acrobat 6.0.
 
ASInt32 PDDocFindPageNumForLabelEx(PDDoc pdDoc, ASConstText labelText)
Supersedes PDDocFindPageNumForLabel in Acrobat 6.0.
 
ASBool PDDocFlattenOC(PDDoc pdDoc, PDOCContext context)
Replaces the contents of every page in the document with a version that has no optional content, containing only what was visible on the page when the call was made, and removes all other optional-content information.
 
PDDoc PDDocFromCosDoc(CosDoc cosDoc)
Gets the PDDoc associated with a CosDoc.
 
PDBookmark PDDocGetBookmarkRoot(PDDoc pdDoc)
Gets the root of the document's bookmark tree. The return value is valid even if the document's bookmark tree is empty (meaning that there is no Outlines key in the underlying PDF file).
 
CosDoc PDDocGetCosDoc(PDDoc doc)
Gets a document's Cos-level document object.
 
Gets the specified document's current security handler (that is, the security handler that was used to open the document).
 
Gets the client data for the encryption handler associated with the PDDoc. This is the client data provided as a parameter in PDRegisterCryptHandlerEx().
 
Sets the cryptRevision param based on the Security handler of the document. This is either retrieved directly from the Security handler or read from the encrypt dict.
 
Sets the cryptVersion param based on the Security handler of the document. This is either retrieved directly from the Security handler or read from the encrypt dict.
 
ASFile PDDocGetFile(PDDoc doc)
Gets the file object for a document.
 
ASInt32 PDDocGetFlags(PDDoc doc)
Gets information about the document's file and its state.
 
Tests whether the document will open in full-screen mode. This provides an alternative to calling PDDocGetPageMode() to test for PDFullScreen.
 
ASInt32 PDDocGetID(PDDoc doc, ASInt32 nElemNum, ASUns8* buffer, ASInt32 bufferSize)
Gets an element of a document's file identifier. See Section 10.3 in the PDF Reference for a description of file IDs.
 
ASInt32 PDDocGetInfo(PDDoc doc, const char* infoKey, char* buffer, ASInt32 bufSize)
Gets the value of a key in a document's Info dictionary, or the value of this same key in the XMP metadata, whichever is later. However, it is preferable to use PDDocGetXAPMetadataProperty(), because it also allows accessing XMP properties that are not duplicated in the Info dictionary.
 
void PDDocGetInfoASText(PDDoc doc, const ASText key, ASText value)
Gets the value of a key in a document's Info dictionary, or the value of this same key in the XMP metadata, whichever is latest as an ASText object.
 
ASInt32 PDDocGetLabelForPageNum(PDDoc pdDoc, ASInt32 pageNum, char* buffer, ASInt32 bufferLen)
Superseded by PDDocGetLabelForPageNumEx() in Acrobat 6.0.
 
void PDDocGetLabelForPageNumEx(PDDoc pdDoc, ASInt32 pageNum, ASText text)
Supersedes PDDocGetLabelForPageNum() in Acrobat 6.0.
 
PDLayoutMode PDDocGetLayoutMode(PDDoc doc)
Gets the value of the PageLayout key in the Catalog dictionary.
 
Yields an ASText containing a semicolon-separated list of fields. The first such field is the entire contents of the pdf:Keywords property of the document XMP; the remaining fields are the contents of successive items in the xmp:Keywords bag of keyword items.
 
PDNameTree PDDocGetNameTree(PDDoc thePDDoc, ASAtom theTree)
Retrieves a name tree, with the key name specified in theTree, from the Names dictionary of thePDDoc.
 
Gets the specified document's new security handler (that is, the security handler that will be used after the document is saved).
 
Gets the security data structure for the specified document's new security handler. Use PDDocGetSecurityData() to get the security data structure for the document's current security handler.
 
void PDDocGetNewSecurityInfo(PDDoc pdDoc, ASUns32* secInfo)
Gets the security information from the specified document's new security handler. It calls the PDCryptGetSecurityInfoProc() callback of the document's new security handler. No permissions are required to call this method.
 
ASInt32 PDDocGetNthError(PDDoc doc, ASInt32 errNumber, ASInt32* errorP, char* buffer, ASInt32 bufSize)
Returns the error code and string for the nth non-fatal error encountered since the document was opened, or PDDocClearErrors was called.
 
Return the number of non-fatal errors encountered since the document was opened, or PDDocClearErrors was called.
 
ASUns32 PDDocGetNumOCGs(PDDoc pdDoc)
Returns the number of optional-content groups associated with a document, which is the number of unique entries in the document's OCProperties OCGs array.
 
ASInt32 PDDocGetNumPages(PDDoc doc)
Gets the number of pages in a document.
 
Gets the number of article threads in a document.
 
PDOCConfig PDDocGetOCConfig(PDDoc pdDoc)
Gets the built-in default optional-content configuration for the document from the OCProperties D entry.
 
PDOCContext PDDocGetOCContext(PDDoc pdDoc)
Gets the built-in default optional-content context for the document. This context is used by all content drawing and enumeration calls that do not take an optional-content context parameter, or for which no context is specified.
 
PDOCG* PDDocGetOCGs(PDDoc pdDoc)
Gets the optional-content groups for the document. The order of the groups is not guaranteed to be the creation order, and is not the same as the display order (see PDOCConfigGetOCGOrder()).
 
Gets the value of the OpenAction key in the Catalog dictionary, which is the action performed when the document is opened. After you obtain the action, you can execute it with AVDocPerformAction().
 
PDPageLabel PDDocGetPageLabel(PDDoc pdDoc, ASInt32 pageNum, ASInt32* firstPage, ASInt32* lastPage)
Returns the label that is in effect for the given page.
 
PDPageMode PDDocGetPageMode(PDDoc doc)
Gets the value of the PageMode key in the Catalog dictionary.
 
Returns the page Cos object corresponding to the given page number.
 
PDCollection PDDocGetPDCollection(PDDoc pdDoc)
Gets the collection object in a document.
 
Deprecated in Acrobat 5.0. Use PDDocPermRequest() instead.
 
Superseded in Acrobat 5.0 by PDDocPermRequest.
 
ASBool PDDocGetStructTreeRoot(INPDDoc pdDoc, OUTPDSTreeRoot* treeRoot)
Gets the structure tree root for a document.
 
PDThread PDDocGetThread(PDDoc doc, ASInt32 index)
Gets an article thread having the specified index.
 
ASInt32 PDDocGetThreadIndex(PDDoc doc, PDThread thread)
Gets the index of the specified article thread.
 
ASAtom PDDocGetTrapped(PDDoc pdDoc)
Gets the value of the Trapped key in the Info dictionary.
 
void PDDocGetVersion(PDDoc doc, ASInt16* majorP, ASInt16* minorP)
Gets the major and minor PDF document versions. This is the PDF version of the document, which is specified in the header of a PDF file in the string "%PDF-xx. yy" where xx is the major version and yy is the minor version. For example, version 1.2 has the string "%PDF<code>-1</code>.2". See Section H.1 in the PDF Reference.
 
void PDDocGetVersionEx(PDDoc doc, ASUns32* majorP, ASUns32* minorP, CosObj* adbeExtensionBaseP, ASUns32* adbeExtensionLevelP)
Returns the Adobe version of the PDF format to which the PDF file conforms. For PDF versions 1.0 through 1.7, this method will return a major version of 1, a minor version in the range of 0 through 7, and an adbeExtensionLevel of 0. For Acrobat 9, this method will return a major version of 1 and a minor version of 8. For Acrobat 10, this method will return a major version of 1 and a minor version of 9. Starting with Acrobat 9, Adobe extensions to the PDF format will be identified via the Extensions dictionary in the catalog; in this case, the major and minor versions will be returned, and the Adobe extension level will be returned via the last argument.
 
PDWordFinder PDDocGetWordFinder(PDDoc docP, ASInt16 WXEVersion)
Gets the word finder associated with a document. It is not necessary to destroy the word finder returned by this method.
 
ASText PDDocGetXAPMetadata(INPDDoc pdDoc)
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.
 
ASText PDDocGetXAPMetadataArrayItem(PDDoc pdDoc, ASText namespaceName, ASText path, ASInt32 index)
Gets the value of an XMP metadata array item, associated with a document, based on an index. It returns an ASText object containing the XML text of the value of the specified property in the XMP metadata array associated with the document pdDoc. The ASText object becomes the property of the client, which is free to alter or destroy it.
 
ASText PDDocGetXAPMetadataProperty(PDDoc pdDoc, ASText namespaceName, ASText path)
Gets the value of an XMP metadata property associated with a document. It returns an ASText whose text is the XML text of the value of the specified property in the XMP metadata associated with the document pdDoc. The ASText becomes the property of the client, which is free to alter or destroy it.
 
Returns true if the document contains an Extensions dictionary as defined by ISO 32000 for specifying the inclusion of features beyond the ISO 32000 specification. Starting with Acrobat 9, Adobe extensions to the PDF format will be identified via this Extensions dictionary in the catalog.
 
ASBool PDDocHasOC(PDDoc pdDoc)
Determines whether the optional content feature is associated with the document. The document is considered to have optional content if there is an OCProperties dictionary in the document's catalog, and that dictionary has one or more entries in the OCGs array.
 
Returns true if the document declares that it has structure elements that conform to the UserProperties attributes or class conventions.
 
ASInt32 PDDocImportCosDocNotes(PDDoc doc, CosDoc src, const char* noteTitle, ASInt32 noteTitleLen, PDColorValue color, void* progMon, void* monClientData, PDDocWillImportAnnotCallback importFilter)
Adds text annotations from sourceDoc to doc.
 
ASInt32 PDDocImportNotes(PDDoc doc, PDDoc sourceDoc, void* progMon, void* monClientData, PDDocWillImportAnnotCallback importFilter)
Adds text annotations (notes) from sourceDoc to doc.
 
void PDDocInksDidChange(PDDoc doc, void* clientData)
Sent when the inks for the document change.
 
void PDDocInsertPages(PDDoc doc, ASInt32 mergeAfterThisPage, PDDoc doc2, ASInt32 startPage, ASInt32 numPages, ASUns16 insertFlags, ProgressMonitor progMon, void* progMonClientData, CancelProc cancelProc, void* cancelProcClientData)
Inserts numPages pages from doc2 into doc. All annotations, and anything else associated with the page (such as a thumbnail image) are copied from the doc2 pages to the new pages in doc. This method does not insert pages if doc equals doc2.
 
Causes a string produced as by PDDocGetMergedXAPKeywords() to be stored as the new value of the pdf:Keywords property, and the former value of the pdf:Keywords property to be stored as an item in the xmp:Keywords bag of keyword items.
 
void PDDocMovePage(PDDoc doc, ASInt32 moveToAfterThisPage, ASInt32 pageToMove)
Moves one page in a document.
 
Creates a security data structure appropriate for the specified document's new security handler. The new security handler must have been previously set using PDDocSetNewCryptHandler(). The structure is created by calling the new security handler's PDCryptNewSecurityDataProc().
 
void PDDocOCDidChange(PDDoc doc, PDDocOCChangeType whatHappened, void* object, ASErrorCode error, void* clientData)
An optional-content context changed in a PDDoc in a way that could affect the visibility state of content.
 
void PDDocOCWillChange(PDDoc doc, PDDocOCChangeType whatWillHappen, void* object, void* clientData)
An optional-content context is changing in a PDDoc in a way that could affect the visibility state of content.
 
PDDoc PDDocOpen(ASPathName fileName, ASFileSys fileSys, PDAuthProc authProc, ASBool doRepair)
Opens the specified document. If the document is already open, it returns a reference to the already opened PDDoc. You must call PDDocClose() once for every successful open. If the call fails and the exception is pdErrNeedRebuild, then call again with doRepair set to true. This allows the application to decide whether to perform the time-consuming repair operation.
 
PDDoc PDDocOpenEx(ASPathName fileName, ASFileSys fileSys, PDAuthProcEx authProcEx, void* authProcClientData, ASBool doRepair)
Opens the specified document. If the document is already open, it returns a reference to the already opened PDDoc. You must call PDDocClose() once for every successful open. If the call fails and the exception is pdErrNeedRebuild, then call again with doRepair equal to true. This allows the application to decide whether to perform the time-consuming repair operation.
 
PDDoc PDDocOpenFromASFile(ASFile aFile, PDAuthProc authProc, ASBool doRepair)
Opens the document specified by the ASFile. aFile must be a valid ASFile. It is the caller's responsibility to dispose of the ASFile after calling PDDocClose().
 
PDDoc PDDocOpenFromASFileEx(ASFile aFile, PDAuthProcEx authProcEx, void* authProcClientData, ASBool doRepair)
Opens the document specified by the ASFile. aFile must be a valid ASFile. It is the caller's responsibility to dispose of the ASFile after calling PDDocClose().
 
Opens the document specified by the ASFile or ASFileSys/ASPathName. If both are set, the ASFile is used and the fileSys and pathName are ignored.
 
void PDDocPageDirectionDidChange(PDDoc doc, void* clientData)
Sent when the page direction of the document changes. The page direction is determined by the Direction key in the ViewerPreferences dictionary.
 
void PDDocPageLabelDidChange(PDDoc doc, ASInt32 firstPage, ASInt32 lastPage, void* clientData)
A range of pages' labels changed in a PDDoc.
 
PDPermReqStatus PDDocPermRequest(PDDoc pdDoc, PDPermReqObj reqObj, PDPermReqOpr reqOpr, void* authData)
This method supersedes PDDocGetPermissions().
 
PDPermReqStatus PDDocPermRequestNoUB(PDDoc pdDoc, PDPermReqObj reqObj, PDPermReqOpr reqOpr, void* authData)
PDDocPermRequestNoUB() indicates whether the permission would have been granted had the document not been Rights Enabled.
 
void PDDocPermsReady(PDDoc doc, void* clientData)
A document was opened and its permissions (if present) have been validated.
 
void PDDocPrintingTiledPage(PDDoc doc, ASInt32 page, ASStm stm, ASInt32 whichRow, ASInt32 whichColumn, ASInt32 numRows, ASInt32 numColumns, ASFixedRect* cropRegion, PDTile tile, void* clientData)
This notification is obsolete in Acrobat 7.0 and later.
 
void PDDocReadAhead(PDDoc doc, ASUns32 flags, void* clientData)
Used for page-at-a-time downloading and byte-serving Acrobat data. If a document is being viewed over a slow file system, PDDocReadAhead() issues a byte range request for all the data associated with the flags in flags.
 
void PDDocReadAheadEmbeddedFile(PDDoc doc, CosObj embeddedFileObj)
Used for page-at-a-time downloading and byte-serving Acrobat data. If a document is being viewed over a slow file system, the method issues a byte range request for all the data associated with an embedded file.
 
void PDDocReadAheadPages(PDDoc doc, ASInt32 startPage, ASInt32 nPages)
Reads ahead nPages starting at startPage (if the file is linearized).
 
Decrements a document's reference count. The document will not be closed until the reference count is zero, or the application terminates.
 
Remove Bates Numbering from a PDF document.
 
void PDDocRemoveNameTree(PDDoc thePDDoc, ASAtom theTree)
Removes the name tree inside the Names dictionary with the specified key name. It does nothing if no object with that name exists.
 
Removes the value of the OpenAction key in the Catalog dictionary. The value is the action performed when the document is opened.
 
void PDDocRemovePageLabel(PDDoc pdDoc, ASInt32 pageNum)
Removes the page label that is attached to the specified page, effectively merging the specified range with the previous page label sequence.
 
Removes, but does not destroy, the specified StructTreeRoot element from the specified PDDoc.
 
Removes an article thread from a document. If you also wish to destroy the thread, use PDThreadDestroy() after calling PDDocRemoveThread().
 
void PDDocReplaceOCG(PDOCG replaceOCG, PDOCG keepOCG)
In the document associated with a specified optional-content group, replaces that group with another group.
 
void PDDocReplacePages(PDDoc doc, ASInt32 startPage, PDDoc doc2, ASInt32 startPageDoc2, ASInt32 numPages, ASBool mergeTextAnnots, ProgressMonitor progMon, void* progMonClientData, CancelProc cancelProc, void* cancelProcClientData)
Replaces the specified range of pages in one document with pages from another. The contents, resources, size and rotation of the pages are replaced. The bookmarks are not copied, because they are attached to the document, not to individual pages.
 
void PDDocRequestEntireFile(PDDoc doc, PDDocRequestEntireFileProc requestProc, void* clientData)
Requests the document file and performs the specified procedure on it.
 
void PDDocRequestPages(PDDoc doc, ASInt32 startPage, ASInt32 nPages, PDDocRequestPagesProc requestProc, void* clientData)
Requests nPages starting at startPage, and performs a specified procedure on them.
 
Resets the cached ink (spot color) usage information in a document. This should be called when the set of non-process colorants for a document have been changed. Calling this will force the cached information to be recomputed.
 
void PDDocSave(PDDoc doc, PDSaveFlags saveFlags, ASPathName newPath, ASFileSys fileSys, ProgressMonitor progMon, void* progMonClientData)
Saves a document to disk. If a full save is requested to the original path, the file is saved to a file system-determined temporary file, the old file is deleted, and the temporary file is renamed to newPath. You must call PDDocClose() to release resources; do not call PDDocRelease().
 
Saves a document to disk as specified in a parameter's structure. This is essentially the same as PDDocSave() with two additional parameters: a cancel proc and cancel proc client data (so you could cut and paste description information and other information from PDDocSave()).
 
void PDDocSetFlags(PDDoc doc, ASInt32 flags)
Sets information about the document's file and its state. This method can only be used to set, not clear, flags. As a result, it is not possible, for example, to use this method to clear the flag that indicates that a document has been modified and needs to be saved. Instead, use PDDocClearFlags() to clear flags.
 
Sets whether this document opens in full-screen mode. This provides an alternative to calling PDDocSetPageMode() with PDFullScreen.
 
void PDDocSetInfo(PDDoc doc, const char* infoKey, const char* buffer, ASInt32 nBytes)
Sets the value of a key in a document's Info dictionary. However, it is preferable to use PDDocSetXAPMetadataProperty(), because it also allows accessing XMP properties that are not duplicated in the Info dictionary.
 
void PDDocSetInfoAsASText(PDDoc doc, const ASText infoKey, const ASText value)
Sets the value of a key in a document's Info dictionary.
 
Sets the value of the PageLayout key in the Catalog dictionary.
 
Sets the PDF minor version to the greater of its current value and the requested value. This function should be called when any feature requiring a PDF version of 1.7 or higher is applied to a document.
 
void PDDocSetNewCryptFilterData(PDDoc doc, ASAtom filterName, char* cryptData, ASInt32 cryptDataLen)
Sets the encrypted data for the specified document's encryption filter to decrypt. Call this before accessing the stream to be decrypted.
 
void PDDocSetNewCryptFilterMethod(PDDoc doc, ASAtom filterName, ASAtom method)
Sets or resets the specified document's security filter method, used for encryption and decryption of the document's data.
 
void PDDocSetNewCryptHandler(PDDoc pdDoc, ASAtom newCryptHandler)
Sets the specified document's new security handler (that is, the security handler that will be used after the document is saved).
 
void PDDocSetNewCryptHandlerEx(PDDoc pdDoc, ASAtom newCryptHandler, void* currentAuthData)
Extends PDDocSetNewCryptHandler() for Acrobat 6.0. It sets the specified document's new security handler (that is, the security handler that will be used after the document is saved). This method should be called when the current document's security handler requires authorization data to validate permission to change security handlers.
 
void PDDocSetNewDefaultFilters(PDDoc doc, ASAtom defaultStmFilterName, ASAtom defaultStrFilterName)
Sets or resets the document's default security filter methods for streams and strings, used to encrypt and decrypt the document's data. This method is only valid with version 4 algorithms (/V 4 in the Encrypt dictionary).
 
void PDDocSetNewSecurityData(PDDoc pdDoc, void* secData)
Sets the security data structure for the specified document's new security handler. Use PDDocSetNewCryptHandler() to set a new security handler for a document.
 
Sets the value of the OpenAction key in the Catalog dictionary, which is the action performed when the document is opened.
 
void PDDocSetPageLabel(PDDoc pdDoc, ASInt32 pageNum, PDPageLabel pgLabel)
Attaches a label to a page. This establishes the numbering scheme for that page and all pages following it, until another page label is encountered. This label allows PDF producers to define a page numbering system other than the Acrobat default.
 
Sets the value of the PageMode key in the Catalog dictionary.
 
void PDDocSetTrapped(PDDoc pdDoc, ASAtom newValue)
Sets the value of the Trapped key in the Info dictionary to the specified ASAtom.
 
void PDDocSetXAPMetadata(INPDDoc pdDoc, INASText metadataASText)
Sets the XMP metadata associated with a document. It replaces the XMP metadata associated with the document pdDoc with the XMP metadata stored in metadataASText.
 
void PDDocSetXAPMetadataArrayItem(PDDoc pdDoc, ASText namespaceName, ASText namespacePrefix, ASText path, ASInt32 index, ASText newValue)
Sets the value of an XMP metadata array item, associated with a document, based on an index.
 
void PDDocSetXAPMetadataProperty(PDDoc pdDoc, ASText namespaceName, ASText namespacePrefix, ASText path, ASText newValue)
Sets the value of an XMP metadata property associated with a document. The XMP metadata represents all the properties in pdDoc object's Info dictionary, and can also contain properties that are not in the Info dictionary. This call is preferred to PDDocSetInfo(), which only allows access to properties that are in the Info dictionary (although the older function is supported for compatibility).
 
void PDDocWillChangePages(PDDoc doc, PDOperation op, ASInt32 fromPage, ASInt32 toPage, void* clientData)
Pages will be inserted, deleted, moved, or modified.
 
void PDDocWillClose(PDDoc doc, void* clientData)
A PDDoc will be closed. A PDDoc is closed only if its reference count is zero.
 
void PDDocWillDeletePages(PDDoc doc, ASInt32 fromPage, ASInt32 toPage, void* clientData)
One or more pages will be deleted.
 
void PDDocWillExportAnnots(PDDoc doc, void* clientData)
The annotations of a document will be exported.
 
void PDDocWillImportAnnots(PDDoc doc, void* clientData)
The annotations from one document will be imported into another document.
 
void PDDocWillInsertPages(PDDoc doc, ASInt32 insertAfterThisPage, PDDoc srcDoc, ASInt32 srcFromPage, ASInt32 srcToPage, void* clientData)
One or more pages will be inserted.
 
void PDDocWillInsertPagesEx(PDDocInsertPagesParams params, void* clientData)
Pages will be inserted into a document. This notification occurs after the PDDocWillInsertPages() notification.
 
void PDDocWillMovePages(PDDoc doc, ASInt32 moveAfterThisPage, ASInt32 fromPage, ASInt32 toPage, void* clientData)
One or more pages will be moved.
 
void PDDocWillPrintDoc(PDDoc doc, ASStm stm, ASInt32 psLevel, void* clientData)
This notification is broadcast before a document is printed, and before any marks are made on the first page. When printing to a PostScript printer, printing commands can also be sent that are placed on the page before any other marks. For example, a setpagedevice operator could be placed in the print stream.
 
void PDDocWillPrintDocInMode(PDDoc doc, PDPrintWhat printMode, void* clientData)
Sent before a document is printed, before any marks are made on the first page. Page resources and contents may be modified at the time this notification is broadcast.
 
void PDDocWillPrintPage(PDDoc doc, ASInt32 page, ASStm stm, void* clientData)
This notification is broadcast once per page that is printed, before any marks are made on the page. When printing to a PostScript printer, printing commands can also be sent that will be placed on the page before any other marks.
 
void PDDocWillPrintPages(PDDoc doc, ASInt32 fromPage, ASInt32 toPage, ASInt32 psLevel, ASBool binaryOK, void* clientData)
This notification is broadcast when printing begins, before any pages are printed.
 
void PDDocWillPrintTiledPage(PDDoc doc, ASInt32 page, ASStm stm, ASInt32 whichTile, ASInt32 numTiles, ASFixedRect* cropRegion, PDTile tile, void* clientData)
This notification is obsolete in Acrobat 7.0 and later.
 
void PDDocWillRemoveThread(PDDoc doc, ASInt32 index, void* clientData)
A thread will be removed from a document.
 
void PDDocWillReplacePages(PDDoc doc, ASInt32 fromPage, ASInt32 toPage, PDDoc srcDoc, ASInt32 srcFromPage, ASInt32 srcToPage, void* clientData)
One or more pages will be replaced.
 
void PDDocWillSave(PDDoc doc, void* clientData)
A document will be saved.
 
void PDDocWillSaveEx(PDDoc doc, PDDocSaveParams params, void* clientData)
A document will be saved.
 
void PDDocXAPMetadataDidChange(PDDoc pdDoc, ASText newMetadata, void* clientData)
The XMP metadata describing the document as a whole has changed.
 
Registers a callback to the client user interface that can tell the core what the current AutoState preference is.
 
Registers a callback to the client user interface that can tell the core what the current language is.
 
Registers a callback to the client user interface that can tell the core what the current user is.
 
Registers a callback to the client user interface that can tell the core what the current zoom level is.
Defines Detail
kPDDocReadAheadAcroForms 
Product availability: All
Platform availability: All

Syntax

#define kPDDocReadAheadAcroForms 0x0001

Description

Allows the AcroForm client to request that all the AcroForm data be read ahead, before the viewer needs it. This flag is ignored if the PDF file does not contain a Forms hint table. See Section F.3.5 in the PDF Reference for information about the Forms hint table.


File: PDExpT.h
Line: 3951
kPDDocReadAheadPageLabels 
Product availability: All
Platform availability: All

Syntax

#define kPDDocReadAheadPageLabels 0x0004

Description

Requests that the PDF file's page label data be read ahead, before the viewer needs it. There is currently no page label hint table defined, so this flag simply causes the rest of the file to be read.


File: PDExpT.h
Line: 3967
kPDDocReadAheadRenditions 
Product availability: All
Platform availability: All

Syntax

#define kPDDocReadAheadRenditions 0x0010

File: PDExpT.h
Line: 3978
kPDDocReadAheadStructure 
Product availability: All
Platform availability: All

Syntax

#define kPDDocReadAheadStructure 0x0008

Description

Requests that the PDF file's logical structure data be read ahead, before the viewer needs it. There is currently no logical structure hint table defined, so this flag simply causes the rest of the file to be read.


File: PDExpT.h
Line: 3974
kPDDocReadAheadTemplates 
Product availability: All
Platform availability: All

Syntax

#define kPDDocReadAheadTemplates 0x0002

Description

Requests that the PDF file's Forms Template data be read ahead, before the viewer needs it. There is currently no Template hint table defined, so this flag simply causes the rest of the file to be read.


File: PDExpT.h
Line: 3959
PDAllPages 
Product availability: All
Platform availability: All

Syntax

#define PDAllPages ((PDPageNumber) -3)

File: PDExpT.h
Line: 2098
PDBeforeFirstPage 
Product availability: All
Platform availability: All

Syntax

#define PDBeforeFirstPage ((PDPageNumber) -1)

File: PDExpT.h
Line: 2096
PDCryptFilterStringProc 
Product availability: All
Platform availability: All

Syntax

#define PDCryptFilterStringProc CosCryptStringProc

File: PDExpT.h
Line: 5035
PDDocCreateTextSelect 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

#define PDDocCreateTextSelect PDDocCreateTextSelectHost

File: PDCalls.h
Line: 157
PDDocGetWordFinder 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

#define PDDocGetWordFinder PDDocGetWordFinderHost

File: PDCalls.h
Line: 156
pdInfoCanCopy 
Product availability: All
Platform availability: All

Syntax

#define pdInfoCanCopy pdPermCopy

Description

The document text and graphics can be copied to the clipboard.


File: PDExpT.h
Line: 4168
pdInfoCanEdit 
Product availability: All
Platform availability: All

Syntax

#define pdInfoCanEdit pdPermEdit

Description

The document can be modified (for example, by adding notes, links, or bookmarks).

See Also


File: PDExpT.h
Line: 4163
pdInfoCanEditNotes 
Product availability: All
Platform availability: All

Syntax

#define pdInfoCanEditNotes pdPermEditNotes

Description

The document's notes, but nothing else, can be modified.

See Also


File: PDExpT.h
Line: 4174
pdInfoCanPrint 
Product availability: All
Platform availability: All

Syntax

#define pdInfoCanPrint pdPermPrint

Description

The document can be printed.


File: PDExpT.h
Line: 4157
pdInfoHasOwnerPW 
Product availability: All
Platform availability: All

Syntax

#define pdInfoHasOwnerPW pdPermSecure

Description

The document has an owner password.


File: PDExpT.h
Line: 4152
pdInfoHasUserPW 
Product availability: All
Platform availability: All

Syntax

#define pdInfoHasUserPW pdPermOpen

Description

The document has a user password.


File: PDExpT.h
Line: 4147
pdPermAll 
Product availability: All
Platform availability: All

Syntax

#define pdPermAll 0xFFFFFFFF

File: PDExpT.h
Line: 1404
pdPermCopy 
Product availability: All
Platform availability: All

Syntax

#define pdPermCopy 0x10

Description

The user can copy information from the document to the clipboard. In the document restrictions, this corresponds to the Content Copying or Extraction entry.


File: PDExpT.h
Line: 1320
pdPermEdit 
Product availability: All
Platform availability: All

Syntax

#define pdPermEdit 0x08

Description

The user can edit the document more than adding or modifying text notes (see also pdPermEditNotes). In the Document Security dialog, this corresponds to the Changing the Document entry.


File: PDExpT.h
Line: 1313
pdPermEditNotes 
Product availability: All
Platform availability: All

Syntax

#define pdPermEditNotes 0x20

Description

The user can add, modify, and delete text notes (see also pdPermEdit). In the document restrictions, this corresponds to the Authoring Comments and Form Fields entry.


File: PDExpT.h
Line: 1327
pdPermExt 
Product availability: All
Platform availability: All

Syntax

#define pdPermExt 0x80

File: PDExpT.h
Line: 1342
pdPermOpen 
Product availability: All
Platform availability: All

Syntax

#define pdPermOpen 0x01

Description

The user can open and decrypt the document.


File: PDExpT.h
Line: 1293
pdPermOwner 
Product availability: All
Platform availability: All

Syntax

#define pdPermOwner 0x8000

Description

The user is permitted to perform all operations, regardless of the permissions specified by the document. Unless this permission is set, the document's permissions will be reset to those in the document after a full save.


File: PDExpT.h
Line: 1387
pdPermPrint 
Product availability: All
Platform availability: All

Syntax

#define pdPermPrint 0x04

Description

The user can print the document. Page Setup access is unaffected by this permission, since that affects Acrobat's preferences - not the document's. In the Document Security dialog, this corresponds to the Printing entry.


File: PDExpT.h
Line: 1306
PDPermReqDenied 
Product availability: All
Platform availability: All

Syntax

#define PDPermReqDenied (PDPermReqStatus)(-1)

Description

-1 The request was denied.


File: PDExpT.h
Line: 3993
PDPermReqGranted 
Product availability: All
Platform availability: All

Syntax

#define PDPermReqGranted (PDPermReqStatus)(0)

Description

0 The request was granted.


File: PDExpT.h
Line: 3995
PDPermReqOperationNA 
Product availability: All
Platform availability: All

Syntax

#define PDPermReqOperationNA (PDPermReqStatus)(3)

Description

3 The operation is not applicable for the specified object.


File: PDExpT.h
Line: 4001
PDPermReqPending 
Product availability: All
Platform availability: All

Syntax

#define PDPermReqPending (PDPermReqStatus)(4)

Description

The handler does not have enough information to determine an answer at this point. Try again later.


File: PDExpT.h
Line: 4004
PDPermReqUnknownObject 
Product availability: All
Platform availability: All

Syntax

#define PDPermReqUnknownObject (PDPermReqStatus)(1)

Description

1 The object is unknown.


File: PDExpT.h
Line: 3997
PDPermReqUnknownOperation 
Product availability: All
Platform availability: All

Syntax

#define PDPermReqUnknownOperation (PDPermReqStatus)(2)

Description

2 The operation is unknown.


File: PDExpT.h
Line: 3999
PDPermReqVersion 
Product availability: All
Platform availability: All

Syntax

#define PDPermReqVersion 0x0004

File: PDExpT.h
Line: 4007
pdPermSaveAs 
Product availability: All
Platform availability: All

Syntax

#define pdPermSaveAs 0x40

Description

The user can perform a Save As.... If both pdPermEdit and pdPermEditNotes are disallowed, Save will be disabled but Save As... will be enabled. The Save As... menu item is not necessarily disabled even if the user is not permitted to perform a Save As....


File: PDExpT.h
Line: 1337
pdPermSecure 
Product availability: All
Platform availability: All

Syntax

#define pdPermSecure 0x02

Description

The user can change the document's security settings.


File: PDExpT.h
Line: 1298
pdPermSettable 
Product availability: All
Platform availability: All

Syntax

#define pdPermSettable (pdPermPrint + pdPermEdit + pdPermCopy + pdPermEditNotes)

Description

The OR of all operations that can be set by the user in the security restrictions (pdPermPrint + pdPermEdit + pdPermCopy + pdPermEditNotes).


File: PDExpT.h
Line: 1410
pdPermUser 
Product availability: All
Platform availability: All

Syntax

#define pdPermUser (pdPermAll - pdPermOpen - pdPermSecure)

Description

All permissions.


File: PDExpT.h
Line: 1415
pdPrivPermAccessible 
Product availability: All
Platform availability: All

Syntax

#define pdPrivPermAccessible 0x200

Description

Overrides pdPermCopy to enable the Accessibility API. If a document is saved in Rev2 format (Acrobat 4.0 compatible), only the pdPermCopy bit is checked to determine the Accessibility API state.


File: PDExpT.h
Line: 1361
pdPrivPermDocAssembly 
Product availability: All
Platform availability: All

Syntax

#define pdPrivPermDocAssembly 0x400

Description

Overrides various pdPermEdit bits and allows the following operations: page insert/delete/rotate and create bookmark and thumbnail.


File: PDExpT.h
Line: 1367
pdPrivPermFillandSign 
Product availability: All
Platform availability: All

Syntax

#define pdPrivPermFillandSign 0x100

Description

Overrides other PDPerm bits. It allows the user to fill in or sign existing form or signature fields.


File: PDExpT.h
Line: 1354
pdPrivPermFormSpawnTempl 
Product availability: All
Platform availability: All

Syntax

#define pdPrivPermFormSpawnTempl 0x20000

Description

This should be set if the user can spawn template pages. This bit will allow page template spawning even if pdPermEdit and pdPermEditNotes are clear.


File: PDExpT.h
Line: 1399
pdPrivPermFormSubmit 
Product availability: All
Platform availability: All

Syntax

#define pdPrivPermFormSubmit 0x10000

Description

This should be set if the user can submit forms outside of the browser. This bit is a supplement to pdPrivPermFillandSign.


File: PDExpT.h
Line: 1393
pdPrivPermHighPrint 
Product availability: All
Platform availability: All

Syntax

#define pdPrivPermHighPrint 0x800

Description

This bit is a supplement to pdPermPrint. If it is clear (disabled) only low quality printing (Print As Image) is allowed. On UNIX platforms where Print As Image doesn't exist, printing is disabled.


File: PDExpT.h
Line: 1374

Typedefs Detail
PDCryptBatchHandler 
Product availability: All
Platform availability: All

Syntax

typedef _t_PDCryptBatchHandler PDCryptBatchHandler;

File: PDExpT.h
Line: 5181
PDCryptBatchHandlerRec 
Product availability: All
Platform availability: All

Syntax

typedef _t_PDCryptBatchHandler PDCryptBatchHandlerRec;

File: PDExpT.h
Line: 5179
PDCryptFilterHandler 
Product availability: All
Platform availability: All

Syntax

typedef _t_PDCryptFilterHandler PDCryptFilterHandler;

File: PDExpT.h
Line: 5085
PDCryptFilterHandlerRec 
Product availability: All
Platform availability: All

Syntax

typedef _t_PDCryptFilterHandler PDCryptFilterHandlerRec;

File: PDExpT.h
Line: 5083
PDCryptHandler 
Product availability: All
Platform availability: All

Syntax

typedef _t_PDCryptHandler PDCryptHandler;

File: PDExpT.h
Line: 5413
PDCryptHandlerRec 
Product availability: All
Platform availability: All

Syntax

typedef _t_PDCryptHandler PDCryptHandlerRec;

File: PDExpT.h
Line: 5411
PDDoc 
Product availability: All
Platform availability: All

Syntax

typedef struct _t_PDDoc* PDDoc;

The underlying PDF representation of a document. There is a correspondence between a PDDoc and an ASFile; the PDDoc object is the hidden object behind every AVDoc. An ASFile may have zero or more underlying files, so a PDF file does not always correspond to a single disk file. For example, an ASFile may provide access to PDF data in a database.

Through PDDoc objects, your application can perform most of the menu items for pages from Acrobat (delete, replace, and so on). Thumbnails can be created and deleted through this object. You can set and retrieve document information fields through this object as well. The first page in a PDDoc is page 0.

See Also


File: PDBasicExpT.h
Line: 57
PDDocAddWatermarkParams 
Product availability: All
Platform availability: All

Syntax

typedef _t_PDDocAddWatermarkParams PDDocAddWatermarkParams;

File: PDExpT.h
Line: 6587
PDDocAddWatermarkParamsRec 
Product availability: All
Platform availability: All

Syntax

typedef _t_PDDocAddWatermarkParams PDDocAddWatermarkParamsRec;

File: PDExpT.h
Line: 6587
PDDocBatesNumberingParams 
Product availability: All
Platform availability: All

Syntax

typedef _t_PDDocBatesNumberingParams PDDocBatesNumberingParams;

File: PDBatesExpT.h
Line: 46
PDDocBatesNumberingParamsRec 
Product availability: All
Platform availability: All

Syntax

typedef _t_PDDocBatesNumberingParams PDDocBatesNumberingParamsRec;

File: PDBatesExpT.h
Line: 46
PDDocCopyParams 
Product availability: All
Platform availability: All

Syntax

typedef _t_PDDocCopyParams PDDocCopyParams;

File: PDExpT.h
Line: 6150
PDDocCopyParamsRec 
Product availability: All
Platform availability: All

Syntax

typedef _t_PDDocCopyParams PDDocCopyParamsRec;

File: PDExpT.h
Line: 6150
PDDocFlags 
Product availability: All
Platform availability: All

Syntax

typedef ASInt32 PDDocFlags;

A signed int (which is never negative), for historical reasons.

See Also


File: PDExpT.h
Line: 93
PDDocInsertPagesParams 
Product availability: All
Platform availability: All

Syntax

typedef _t_PDDocInsertPagesParams PDDocInsertPagesParams;

File: PDExpT.h
Line: 1881
PDDocInsertPagesParamsRec 
Product availability: All
Platform availability: All

Syntax

typedef _t_PDDocInsertPagesParams PDDocInsertPagesParamsRec;

File: PDExpT.h
Line: 1880
PDDocLayoutParams 
Product availability: All
Platform availability: All

Syntax

typedef _t_PDDocLayoutParams PDDocLayoutParams;

File: PDBatesExpT.h
Line: 92
PDDocLayoutParamsRec 
Product availability: All
Platform availability: All

Syntax

typedef _t_PDDocLayoutParams PDDocLayoutParamsRec;

File: PDBatesExpT.h
Line: 92
PDDocOpenParams 
Product availability: All
Platform availability: All

Syntax

typedef _t_PDDocOpenParams PDDocOpenParams;

A structure used by PDDocOpenWithParams() to specify file open information. The parameters are very similar to those in PDDocOpenEx() and PDDocOpenFromASFileEx().

See Also


File: PDExpT.h
Line: 1889
PDDocOpenParamsRec 
Product availability: All
Platform availability: All

Syntax

typedef _t_PDDocOpenParams PDDocOpenParamsRec;

File: PDExpT.h
Line: 1931
PDDocPreSaveInfo 
Product availability: All
Platform availability: All

Syntax

typedef _t_PDDocPreSaveInfo PDDocPreSaveInfo;

File: PDExpT.h
Line: 1610
PDDocPreSaveInfoRec 
Product availability: All
Platform availability: All

Syntax

typedef _t_PDDocPreSaveInfo PDDocPreSaveInfoRec;

File: PDExpT.h
Line: 1610
PDDocSaveParams 
Product availability: All
Platform availability: All

Syntax

typedef _t_PDDocSaveParams PDDocSaveParams;

File: PDExpT.h
Line: 1796
PDDocSaveParamsRec 
Product availability: All
Platform availability: All

Syntax

typedef _t_PDDocSaveParams PDDocSaveParamsRec;

File: PDExpT.h
Line: 1795
PDDocVersion 
Product availability: All
Platform availability: All

Syntax

typedef ASInt16 PDDocVersion;

A signed int (which is never negative), for historical reasons.


File: PDExpT.h
Line: 85
PDDocWatermarkTextParams 
Product availability: All
Platform availability: All

Syntax

typedef _t_PDDocWatermarkTextParams PDDocWatermarkTextParams;

File: PDExpT.h
Line: 6489
PDDocWatermarkTextParamsRec 
Product availability: All
Platform availability: All

Syntax

typedef _t_PDDocWatermarkTextParams PDDocWatermarkTextParamsRec;

File: PDExpT.h
Line: 6489
PDPermReqStatus 
Product availability: All
Platform availability: All

Syntax

typedef ASInt16 PDPermReqStatus;

The set of valid PDPermRequestStatus values providing the status of PDDoc-related permissions methods.

See Also


File: PDExpT.h
Line: 4004
PDPerms 
Product availability: All
Platform availability: All

Syntax

typedef ASUns32 PDPerms;

Constant values that specify permissions which allow operations on a document file.

See Also


File: PDExpT.h
Line: 1426
PDSmallFlagBits 
Product availability: All
Platform availability: All

Syntax

typedef ASUns16 PDSmallFlagBits;

A flag value for use in PDDocInsertPagesParams().

See Also


File: PDExpT.h
Line: 57
PDTile 
Product availability: All
Platform availability: All

Syntax

typedef PDTileRec PDTile;

File: PDExpT.h
Line: 6226
PDTileEx 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

typedef PDTileRecEx PDTileEx;

File: PDFLExpT.h
Line: 421
PDTrapPreset 
Product availability: All
Platform availability: All

Syntax

typedef PDTrapPresetRec PDTrapPreset;

File: PDExpT.h
Line: 5779

Enumeration Detail
GCHTextType
Product availability: All
Platform availability: All

Syntax

enum GCHTextType {
 kGCHTTipText = 1,
 
 kGCHTMiniText,
 
 kGCHTLargeText
}

File: PDExpT.h
Line: 4282

PDDocFontFlags 
Product availability: All
Platform availability: All

Syntax

enum PDDocFontFlags {
 kHSEmitFontNoFonts,
 
 kHSEmitFontEmbeddedFonts,
 
 kHSEmitFontAllFonts
}

File: PDExpT.h
Line: 5784

Elements
kHSEmitFontNoFonts  

Embed no fonts.

 
kHSEmitFontEmbeddedFonts  

Emit all embedded fonts.

 
kHSEmitFontAllFonts  

Emit all fonts.

PDDocOCChangeType 
Product availability: All
Platform availability: All

Syntax

enum PDDocOCChangeType {
 kPDOCGCreate,
 
 kPDOCGProperties,
 
 kPDOCGReplace,
 
 kPDOCGDestroy,
 
 kPDOCMDAttach,
 
 kPDOCMDRemove,
 
 kPDOCConfigCreate,
 
 kPDOCConfigChange,
 
 kPDOCConfigDestroy,
 
 kPDDocRemoveOC,
 
 kPDOC_LastDocChangeType = kPDDocRemoveOC
}

File: PDExpT.h
Line: 5665

Elements
kPDOCGCreate  

Optional Content Groups (OCGs) created.

 
kPDOCGProperties  

OCG properties changed.

 
kPDOCGReplace  

An OCG was replaced by another.

 
kPDOCGDestroy  

An OCG was destroyed.

 
kPDOCMDAttach  

Content was made optional.

 
kPDOCMDRemove  

Content was made optional.

 
kPDOCConfigCreate  

An OC config was created.

 
kPDOCConfigChange  

An OC config was changed.

 
kPDOCConfigDestroy  

An OC config was destroyed.

 
kPDDocRemoveOC  

OC was removed from document.

 
PDDocRequestReason 
Product availability: All
Platform availability: All

Syntax

enum PDDocRequestReason {
 kPDDocRequestUnderway = 0,
 
 kPDDocRequestComplete,
 
 kPDDocRequestCancelled,
 
 kPDDocRequestError
}

File: PDExpT.h
Line: 6390

Elements
kPDDocRequestUnderway  

The request is still being processed.

 
kPDDocRequestComplete  

The requested data has arrived.

 
kPDDocRequestCancelled  

The request is cancelled because the file is being closed.

 
kPDDocRequestError  

An error occurred.

PDDocSaveFlags 
Product availability: All
Platform availability: All

Syntax

enum PDDocSaveFlags {
 PDDocNeedsSave = 0x0001,
 
 PDDocRequiresFullSave = 0x0002,
 
 PDDocIsModified = 0x0004,
 
 PDDocDeleteOnClose = 0x0008,
 
 PDDocWasRepaired = 0x0010,
 
 PDDocNewMajorVersion = 0x0020,
 
 PDDocNewMinorVersion = 0x0040,
 
 PDDocOldVersion = 0x0080,
 
 PDDocSuppressErrors = 0x0100,
 
 PDDocIsEmbedded = 0x0200,
 
 PDDocIsLinearized = 0x0400,
 
 PDDocIsOptimized = 0x0800,
 
 PDDocIsPXDF = 0x1000,
 
 PDDocIsOpen = 0x2000
}

See Also


File: PDExpT.h
Line: 2015

Elements
PDDocNeedsSave  

The document has been modified and needs to be saved. (get/set)

 
PDDocRequiresFullSave  

The document cannot be saved incrementally; when it is saved using PDDocSave(), the PDSaveFull flag must be specified (see PDSaveFlags). (get/set)

 
PDDocIsModified  

The document has been modified slightly (for example, bookmarks or text annotations have been opened or closed), but not in a way that warrants saving. (get only)

 
PDDocDeleteOnClose  

The document is based on a temporary file that must be deleted when the document is closed or saved. (get/set)

 
PDDocWasRepaired  

The document was repaired when it was opened. (get only)

 
PDDocNewMajorVersion  

The document's major version is newer than current. (get only)

 
PDDocNewMinorVersion  

The document's minor version is newer than current. (get only)

 
PDDocOldVersion  

The document's version is older than current. (get only)

 
PDDocSuppressErrors  

Do not display errors. (get/set)

 
PDDocIsEmbedded  

The document is embedded in a compound document (OLE, OpenDoc). (get/set)

 
PDDocIsLinearized  

The document is linearized (optimized) for page-served remote (network) access. (get only)

 
PDDocIsOptimized  

The document is optimized. If this flag is cleared, the Batch Optimizer plug-in and the Adobe PDF Library do not save the file optimized. You can, therefore, linearize a PDF file without optimizing it. Optimizing without linearizing is not allowed, however. (set only)

 
PDDocIsPXDF  

The underlying file is PxDF (get/set).

 
PDDocIsOpen  

The document is fully opened (didOpen). (get only)

PDEndStyle 
Product availability: All
Platform availability: All

Syntax

enum PDEndStyle {
 kPDEndMiter,
 
 kPDEndOverlap
}

File: PDExpT.h
Line: 5742

PDHorizAlign 
Product availability: All
Platform availability: All

Syntax

enum PDHorizAlign {
 kPDHorizLeft = 0,
 
 kPDHorizCenter,
 
 kPDHorizRight
}

File: PDExpT.h
Line: 6439

PDInsertFlags 
Product availability: All
Platform availability: All

Syntax

enum PDInsertFlags {
 PDInsertBookmarks = 0x0001,
 
 PDInsertAll = 0x1000,
 
 PDInsertThreads = 0x0002
}

See Also

PDDOcInsertPages

File: PDExpT.h
Line: 2080

Elements
PDInsertBookmarks  

Insert bookmarks as well as pages.

 
PDInsertAll  

Insert all Catalog and Info dictionary values as well as pages.

 
PDInsertThreads  

Insert articles as well.

PDJoinStyle 
Product availability: All
Platform availability: All

Syntax

enum PDJoinStyle {
 kPDJoinMiter,
 
 kPDJoinRound,
 
 kPDJoinBevel
}

File: PDExpT.h
Line: 5730

PDOCDrawEnumType 
Product availability: All
Platform availability: All

Syntax

enum PDOCDrawEnumType {
 kPDOC_VisibleOC = 0,
 
 kPDOC_AllOC,
 
 kPDOC_NoOC,
 
 kPDOC_LastDrawEnumType = kPDOC_NoOC
}

See Also


File: PDExpT.h
Line: 5620

Elements
kPDOC_VisibleOC  

Draw or enumerate optional content that is visible, according to the current state of Optional Content Groups (OCGs) and Optional Content Membership Dictionaries (OCMDs). This is the normal default mode.

 
kPDOC_AllOC  

Draw or enumerate all optional content, regardless of its visibility state. If the context's NonOCDrawing is true, all contents of document are shown.

 
kPDOC_NoOC  

Draw or enumerate no optional content, regardless of its visibility state. If the context's NonOCDrawing is false, nothing is drawn, resulting in a blank page.

 
PDOperation 
Product availability: All
Platform availability: All

Syntax

See Also


File: PDExpT.h
Line: 969

Elements
pdOpInsertPages  

Page insertion.

 
pdOpDeletePages  

Page deletion.

 
pdOpReplacePages  

Page replacement.

 
pdOpMovePages  

Page rearrangment.

 
pdOpRotatePages  

Page rotation.

 
pdOpCropPages  

Page cropping.

 
pdOpAddResources  

Only PDDocDidChangePages() exists, not PDDocWillChangePages().

 
pdOpRemoveResources  

Only PDDocDidChangePages() exists, not PDDocWillChangePages().

 
pdOpAddContents  

Only PDDocDidChangePages() exists, not PDDocWillChangePages().

 
pdOpRemoveContents  

Only PDDocDidChangePages() exists, not PDDocWillChangePages().

 
pdOpSetMediaBox  

Page media box modification.

 
pdOpSetBleedBox  

Page bleed box modification.

 
pdOpSetTrimBox  

Page trim box modification.

 
pdOpSetArtBox  

Page art box modification.

 
pdOpSetTabOrder  

Page tab order modification.

PDPermReqObj 
Product availability: All
Platform availability: All

Syntax

enum PDPermReqObj {
 PDPermReqObjDoc = 1,
 
 PDPermReqObjPage,
 
 PDPermReqObjLink,
 
 PDPermReqObjBookmark,
 
 PDPermReqObjThumbnail,
 
 PDPermReqObjAnnot,
 
 PDPermReqObjForm,
 
 PDPermReqObjSignature,
 
 PDPermReqObjEF,
 
 PDPermReqObjReaderAnnot,
 
 PDPermReqObjLast
}

File: PDExpT.h
Line: 4039

PDPermReqOpr 
Product availability: All
Platform availability: All

Syntax

See Also


File: PDExpT.h
Line: 4076

Elements
PDPermReqOprAll  

Check all operations.

 
PDPermReqOprCreate  

Generic.

 
PDPermReqOprDelete  

Delete.

 
PDPermReqOprModify  

Modify.

 
PDPermReqOprCopy  

Copy.

 
PDPermReqOprAccessible  

For accessibility use.

 
PDPermReqOprSelect  

For document or page, selecting (not copying) text or graphics.

 
PDPermReqOprOpen  

For document open.

 
PDPermReqOprSecure  

For the document: changing security settings.

 
PDPermReqOprPrintHigh  

For the document: regular printing.

 
PDPermReqOprPrintLow  

For the document: low quality printing.

 
PDPermReqOprFillIn  

Form fill-in, or sign the existing field.

 
PDPermReqOprRotate  

Rotate.

 
PDPermReqOprCrop  

Crop.

 
PDPermReqOprSummarize  

For summarizing notes.

 
PDPermReqOprInsert  

Insert.

 
PDPermReqOprReplace  

For the page.

 
PDPermReqOprReorder  

For the page.

 
PDPermReqOprFullSave  

For the document.

 
PDPermReqOprImport  

For the notes and image.

 
PDPermReqOprExport  

For the notes. ExportPS should check print.

 
PDPermReqOprAny  

Used for checking to see if any operation is allowed.

 
PDPermReqOprUnknownOpr  

Used for error checking.

 
PDPermReqOprSubmitStandalone  

Submit forms outside of the browser.

 
PDPermReqOprSpawnTemplate  

Allow the form to spawn template pages.

 
PDPermReqOprOnline  

This should be always the last item For annotations and forms: enabling online functionality.

 
PDPermReqOprSummaryView  

For annotations: enabling a summary view of annotations in Adobe Reader.

 
PDPermReqOprBarcodePlaintext  

For forms: enables form appearance to be rendered as a plain text barcode.

 
PDPermReqOprUIsave  

For controlling the "save" UI from a UIPerms handler

 
PDPermReqOprUIprint  

For controlling the "print" UI from a UIPerms handler

 
PDPermReqOprUIemail  

For controlling the "email" UI from a UIPerms handler

 
PDPlacementTypes 
Product availability: All
Platform availability: All

Syntax

enum PDPlacementTypes {
 kPDPlacementCenter,
 
 kPDPlacementChoke,
 
 kPDPlacementNeutralDensity,
 
 kPDPlacementSpread
}

File: PDExpT.h
Line: 5752

PDPrintWhat 
Product availability: All
Platform availability: All

Syntax

enum PDPrintWhat {
 PDPrintWhat_DOCUMENT,
 
 PDPrintWhat_DOCUMENT_AND_COMMENTS,
 
 PDPrintWhat_DOCUMENT_AND_STAMPS,
 
 PDPrintWhat_FORM_FIELDS_ONLY,
 
 PDPrintWhat_COUNT,
 
 PDPrintWhat_MIN = PDPrintWhat_DOCUMENT
}

See Also


File: PDExpT.h
Line: 5494

Elements
PDPrintWhat_DOCUMENT  

Print only the document.

 
PDPrintWhat_DOCUMENT_AND_COMMENTS  

Print the document and associated annotations (WYSIWYG -- the default for Acrobat 8.0 and later).

 
PDPrintWhat_DOCUMENT_AND_STAMPS  

Print the document and stamp annotations.

 
PDPrintWhat_FORM_FIELDS_ONLY  

Print only the data within form fields.

 
PDPrintWhatAnnot 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

enum PDPrintWhatAnnot {
 PDPrintWhatAnnot_NoExtras = 0x01,
 
 PDPrintWhatAnnot_TrapAnnots = 0x02,
 
 PDPrintWhatAnnot_PrinterMarks = 0x04
}

File: PDFLExpT.h
Line: 444

PDPrintWhatFlip 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

enum PDPrintWhatFlip {
 kPDPrintFlipNone = 0x01,
 
 kPDPrintFlipX = 0x02,
 
 kPDPrintFlipY = 0x04,
 
 kPDPrintFlipXY = 0x08
}

File: PDFLExpT.h
Line: 452

PDVertAlign 
Product availability: All
Platform availability: All

Syntax

enum PDVertAlign {
 kPDVertTop = 0,
 
 kPDVertCenter,
 
 kPDVertBottom
}

File: PDExpT.h
Line: 6446

Variables Detail
gPDBatesHFT 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

HFT gPDBatesHFT;

File: PDBatesCalls.h
Line: 115

Structure Detail
_t_PDCryptBatchHandler
Product availability: All
Platform availability: All

Syntax

Callbacks used to open secured files and to modify security settings while batch processing a list of files. These callbacks are not called while opening files through the user interface. In addition, the regular PDCryptHandler functions are not called during batch operations.

See Also


File: PDExpT.h
Line: 5096

Elements
size  

Set this to sizeof(PDCryptBatchHandlerRec).

 
BatchShowDialog  

This function should display a dialog box that allows a user to enter data that will be used to batch secure a series of files. The data is stored in an ASCab which is part of a Batch sequence file. The actual security data, including password(s), should be stored as a pointer in the ASCabinet so that password information is not serialized to disk. Pointers are not serialized from ASCab objects, but ASText objects, ASInt32 objects, and ASBool objects are serialized.

 
BatchParamDesc  

The developer should provide information about the current batch settings for the security handler. Batch settings are provided as a read-only ASCab which is passed in to the function. A writeable ASCab is also provided, which should be used to store parameter information about the security handler. The description information should be stored starting in the paramDesc ASCab using ASText objects starting with key "1".

 
BatchNewAuthData  

This is different from the regular PDCryptHandler NewAuthData function. It creates and returns a void* which is the authorization data for the batch security handler. This data should be used to batch both open files and secure files. Therefore, make sure to provide password information for both the pdPermOpen and pdPermSecure cases, and pass to Authorize and eventually to ASfree().

This authorization data is collected before any files are opened in the Batch sequence. It is permitted to display a user interface at this point since the Batch operation has not started yet. The data applies to all files, and therefore could represent one or more passwords which can be enumerated in the BatchAuthorize function which receives the Batch authData.

 
BatchAuthorize  

Called when a PDF file is opened. It is first called with NULL authData for the case without a user password. It is called again with authorization data provided for the security handler that matches the one used in the PDF file.

During a Batch operation, a file will first be opened with the pdPermSecure bit set. It will then be opened with the pdPermOpen bit set.

 
BatchFreeAuthData  

If provided, this must be used to free the authData acquired via BatchGetAuthData or BatchNewAuthData. If no BatchFreeAuthData function is provided, a default one will be used which calls ASfree() on the authData if it is non-NULL.

 
BatchUpdateSecurityData  

This function should update the crypt handler's security data without bringing up a dialog. This data is provided by a PDCryptShowBatchDialogProc(). The current security data can be obtained by calling PDDocGetNewSecurityData(). This function should return true unless there is a problem with the batch data for this security handler.

 
BatchPreSequence  

This function is called at the beginning of a Batch sequence before any files have been opened. This allows a security handler to be called back with the ASCab of settings that were filled out by the BatchShowDialog() function, or by an ASCabinet that was read in from disk. Pointers of security information are not serialized to disk, and therefore a security information structure may need to be regenerated based on other security information in the ASCabinet.

It is permitted for the BatchPreSequence callback to display a user interface asking the user for more information since the Batch sequence has not started yet.

If this function returns false, the viewer will assume that the command cannot be executed, and will cancel the sequence.

 
BatchPostSequence  

This function is called at the end of a Batch sequence after all files have been processed. Any memory that was allocated in the BatchPreSequence call should be cleaned up in this callback.

_t_PDCryptFilterHandler 
Product availability: All
Platform availability: All

Syntax

struct _t_PDCryptFilterHandler {
 ASSize_t size; 
 
 PDCryptFilterAuthorizeProc Authorize; 
 
 PDCryptFilterGetDataProc GetData; 
 
 PDCryptFilterStreamProc DecryptStream; 
 
 PDCryptFilterStreamProc EncryptStream; 
 
 PDCryptFilterStringProc DecryptString; 
 
 PDCryptFilterStringProc EncryptString; 
}

PDCrypt Filter support:

The CryptStringProcs string callback is expected to return the desired buffer size (the required destination buffer length) when NULL is passed as the destination buffer. This mechanism is to allow a different buffer length upon encryption/decryption.

About the ASCryptStm in the callback: upon the first call (back) to Encrypt/Decrypt stream procs, the handler is expected to fill out an ASCryptStmRec. ASCryptStm has pointers to callback routines for various stream access. Subsequent stream access is made to these callback routines. See ASExpT.h for the ASCryptStmRec definition.


File: PDExpT.h
Line: 5068

Elements
size  

Set this to sizeof(PDCryptFilterHandlerRec).

 
GetData  

Called to get crypt data when the application's built-in method is used.

 
_t_PDCryptHandler 
Product availability: All
Platform availability: All

Syntax

A data structure containing callbacks that implement a security handler. The callbacks implement the security handler functions. For example, they get authorization data such as a password from the user, set permissions, read and write security-related data in a PDF file, and so on.

See Also


File: PDExpT.h
Line: 5192

Elements
size  

Set this to sizeof(PDCryptHandlerRec). PDRegisterCryptHandler uses this to determine if the caller was compiled with an old version of this structure declaration. PDRegisterCryptHandler() will raise genErrBadParam if the size does not correspond to a known size of this struct.

 
Authorize  

This function will be called when a user tries to open or set security for an encrypted document. PermsWanted will be either pdPermOpen or pdPermSecure. This function should return the permissions granted based on the authData. For opening, the permissions returned usually should be pdPermOpen and some or all of pdPermPrint, pdPermEdit, and pdPermCopy. For setting security, permissions returned should be pdPermAll. However, if authorization fails, 0 should be returned. The function is first called with authData equal to NULL. If that fails, GetAuthData is called and the authData from it is passed to Authorize.

If this function is called to authorize Open, decryption will not yet have been installed. So while any part of the document may be examined, some calls must be avoided. For example, a call that causes a page to be parsed will probably result in an error since the encrypted contents will be parsed. In general, it is safe to obtain information about the presence or absence of things, or the number of things, and to examine any part of a document at the Cos level.

 
NewAuthData  

Creates and returns a new struct that can be filled out and passed to Authorize and eventually to ASfree(). This function is not called by the standard security mechanism but may be called by extensions that want to gain access to a protected document. This function need not be implemented if clients can simply allocate data using ASmalloc(). In fact, the standard CryptHandler does not.

 
GetAuthData  

This function obtains authorization data from the user. As with Authorize, permsWanted will be either pdPermOpen or pdPermSecure. This function should allocate authData to be used by Authorize. The function should return true unless the operation should be cancelled (for example, if the user cancels a dialog). A crypt handler can specify the standard password dialog box by using AVCryptGetPassword(). In this case, the authData will be a char * that should be freed using ASfree() after Authorize is called.

 
NewSecurityData  

Creates a new struct that contains information corresponding to information in the security dialog. If encryptDict is a dictionary, initialize the security data to correspond to the dictionary. Otherwise, set up defaults. This function will be called when opening a document with encryptDict set to the document's encryptDict. It will also be called when a user chooses new encryption.

 
ValidateSecurityData  

Validates the security data, modifying it as necessary. A client may have called PDDocNewSecurityData() to obtain a new security data structure, then modified it, and then called PDDocSetNewSecurityData() to change the document security. This is called before actually setting the document's security data.

 
UpdateSecurityData  

This function should update the crypt handler's security data, usually by displaying a dialog. The current security data can be obtained by calling PDDocGetNewSecurityData(). Like GetAuthData, this function should return true unless cancelled. The security data should be created with ASmalloc() so that it can later be freed by ASfree(). The function can also update the cryptHandler itself. For example, the built-in encryption switches to no encryption if no passwords or permissions are set in the security dialog.

 
NewCryptData  

Sets up the key to be passed to initialize the RC4 cipher for encryption and decryption. The length may not be greater than 5 to satisfy the current US export control regulations. Data should be allocated by ASmalloc() or a relative so that it may be freed by ASfree().

 
FillEncryptDict  

This function should fill the encryption dictionary with whatever information is to be stored in the document. Unlike all other strings and streams, direct object elements of the encryption dictionary are not encrypted automatically. They must be encrypted before they are inserted into the dictionary.

 
GetSecurityInfo  

This function should return information about security for display to the user: whether the document has owner and user passwords and whether the user password enables printing, editing, copying text and graphics, and editing notes. See PDexpt.h for possible permissions. All other bits in secInfo should be set to 1. This function is also used after a SaveAs to reset the permissions according to the current document.

 
FreeSecurityData  

If provided, this must be used to free securityData acquired via NewSecurityData.

 
FreeAuthData  

If provided, must be used to free authData acquired via GetAuthData or NewAuthData.

 
FreeCryptData  

If provided, this must be used to free cryptData acquired via NewCryptData.

 
NewCryptDataEx  

Sets up the key to be passed to initialize the RC4 cipher and the version of algorithm for encryption and decryption. The key will be truncated when the length is greater than the viewer currently supports. Data will be freed by FreeCryptData if provided. Otherwise, ASfree() is used.

 
AuthorizeEx  

This was added to replace PDCryptGetAuthDataProc(). There are now new permission controls. PDPerms are obsolete. Yet, the viewer still supports the old security handler. It is called whenever the viewer needs to get authorization data and/or check permission for operation(s).

 
GetAuthDataEx  

This was added to replace PDCryptGetAuthDataProc(). There are now new permission controls. PDPerms are obsolete. Yet, the viewer still supports the old security handler. It is called whenever the viewer needs to get authorization data and/or check permission for operation(s).

 
DisplaySecurityData  

When the security handler is called, it should pop up a dialog box with current permission settings. This callback was added to provide the security handler with a way to display its custom permission settings. It should return true if it wants a callback to modify security settings. Otherwise, it should return false.

 
GetReservedData  

Used for the Acrobat Web Buy proprietary method of passing encrypted data.

 
CryptBatchHandler  

A pointer to the PDCryptBatchHandler structure. If this parameter is non-NULL, the security handler will work in a Batch environment, either for decrypting PDF files or encrypting them on Save with a new security handler.

 
CanParseEncryptDict  

This call is used to provide PDCrypt handler interoperability. When an encrypted ducument is being opened and the the security handler specified in the encryption dictionary is not present, the viewer will call this function on existing security handlers to see if one of them can be used to open the document.

 
CryptFilterHandler  

A pointer to the PDCryptFilterHandler structure. If this parameter is non-NULL, the security handler supports the Crypt Filter.

 
GetDocPerms  

This function should return information about the document permissions for display to the user: whether the user can print, edit, copy text and graphics, edit notes and do form fill in and signing. See PDexpt.h for possible permissions.

 
EncryptDocMetadata  

It determines whether a document's metadata will be encrypted. If this call is not implemented, the metadata is always encrypted.

 
NewSecurityDataFromOrgDoc  

A new call added for Acrobat 7.0, used for opening a rolled back document (the original portion of a signed document). If this call is not implemented, the security handler is asked for authorization. Since authorization is already requested for the document, this would be the second authorization call for the rolled back part.

The callee is expected to authorize the opening of this document using an already opened document, including the subsequent callback to authorize the Crypt Filter(s).

 
GetInfoText  

New calls added for Acrobat 7.0.5 Used by Acrobat to display user interface information about the document.

 
_t_PDDocAddWatermarkParams 
Product availability: All
Platform availability: All

Syntax

struct _t_PDDocAddWatermarkParams {
 ASSize_t size; 
 
 PDPageRange targetRange; 
 
 ASBool fixedPrint; 
 
 ASBool zOrderTop; 
 
 ASBool showOnScreen; 
 
 ASBool showOnPrint; 
 
 PDHorizAlign horizAlign; 
 
 PDVertAlign vertAlign; 
 
 float horizValue; 
 
 float vertValue; 
 
 ASBool percentageVals; 
 
 float scale; 
 
 float rotation; 
 
 float opacity; 
 
 ASProgressMonitor progMon; 
 
 void* progMonData; 
 
 ASCancelProc cancelProc; 
 
 void* cancelProcData; 
}

Parameters used for adding and describing watermarks.

See Also


File: PDExpT.h
Line: 6497

Elements
size  

The size of the data structure.

 
targetRange  

The page range of the document to which the watermark should be added.

 
fixedPrint  

A boolean specifying whether this watermark is a FixedPrint watermark. FixedPrint watermarks maintain their size and position regardless of the dimensions of the target media.

 
zOrderTop  

A boolean specifying where in the page z-order the watermark should be added. If it is true, the watermark is added to the front of the page; otherwise, it is added as a background.

This parameter is ignored if fixedPrint is true, as all FixedPrint watermarks are added to the front of the page.

 
showOnScreen  

A boolean specifying whether the watermark should be visible when viewing on screen.

 
showOnPrint  

A boolean specifying whether the watermark should be printed.

 
horizAlign  

The horizontal alignment to be used when adding the watermark to a page.

 
vertAlign  

The vertical alignment to be used when adding the watermark to a page.

 
horizValue  

The horizontal offset value to be used when adding the watermark on a page. If percentageVals is true, this value is a percentage of the page width, with 1.0 meaning 100%. Otherwise this value is in user units.

 
vertValue  

The vertical offset value to be used when adding the watermark on a page. If percentageVals is true, this value is a percentage of the page height, with 1.0 meaning 100%. Otherwise this value is in user units.

 
percentageVals  

A boolean specifying the units of horizValue and vertValue. If it is true, horizValue and vertValue represent percentages of the page dimensions. Otherwise horizValue and vertValue are in user units.

 
scale  

The scale factor to be used when adding the watermark, with 1.0 meaning 100%.

 
rotation  

The counter-clockwise rotation, in degrees, to be used when adding the watermark.

 
opacity  

The opacity to be used when adding the watermark, with 0.0 meaning fully transparent and 1.0 meaning fully opaque.

 
progMon  

The progress monitor to be updated when adding the watermark. It may be NULL.

 
progMonData  

The private data to be passed to progMon. This parameter is ignored if progMon is NULL.

 
cancelProc  

The cancel procedure to be checked when adding the watermark. It may be NULL.

 
cancelProcData  

The private data to be passed to cancelProc. This parameter is ignored if cancelProc is NULL.

_t_PDDocBatesNumberingParams 
Product availability: All
Platform availability: All

Syntax

struct _t_PDDocBatesNumberingParams {
 ASSize_t size; 
 
 ASInt64 start; 
 
 ASUns8 nDigits; 
 
 ASText prefix; 
 
 ASText suffix; 
 
 ASUns8 pageIndex; 
}

Parameters used for describing Bates Numbering. As an example, Bates Numbering with start=100 nDigits=6 would look like 000100, 000101, 000102, 000103....

See Also


File: PDBatesExpT.h
Line: 26

Elements
size  

The size of the data structure.

 
start  

The start number of the Bates Numbering (required).

 
nDigits  

The number of digits of the Bates Numbering (required).

 
prefix  

Bates Numbering prefix (optional).

 
suffix  

Bates Numbering suffix (optional).

 
pageIndex  

The original page index to which Bates Numbering was added(optional).

_t_PDDocCopyParams 
Product availability: All
Platform availability: All

Syntax

struct _t_PDDocCopyParams {
 ASSize_t size; 
 
 ASPathName newPath; 
 
 ASFileSys fileSys; 
 
 ASProgressMonitor progMon; 
 
 void* progMonData; 
 
 ASCancelProc cancelProc; 
 
 void* cancelProcData; 
 
 ASBool saveChanges; 
}

A structure used by PDDocCopyToFile() to specify file copy information.

See Also


File: PDExpT.h
Line: 6117

Elements
size  

The size of the data structure. It must be set to sizeof(PDDocCopyParamsRec).

 
newPath  

The path name to copy to, specified in whatever format is correct for fileSys.

 
fileSys  

A pointer to an ASFileSysRec containing the file system that does the copy.

 
progMon  

A progress monitor. It may be NULL

 
progMonData  

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

 
cancelProc  

A cancel procedure. It may be NULL.

 
cancelProcData  

A pointer to user-specified data to pass to cancelProc each time it is called. It must be NULL if cancelProc is NULL.

 
saveChanges  

Determines whether changes should be saved if the document is dirty. When it is true, if the document is dirty and the product is Acrobat, save all in-memory changes to the new copy. Otherwise, just copy the on-disk bytes. It is ignored in Adobe Reader.

_t_PDDocInsertPagesParams 
Product availability: All
Platform availability: All

Syntax

struct _t_PDDocInsertPagesParams {
 ASSize_t size; 
 
 PDDoc targetDoc; 
 
 PDPageNumber insertAfterThisPage; 
 
 PDDoc srcDoc; 
 
 PDPageNumber srcFromPage; 
 
 PDPageNumber srcToPage; 
 
 PDSmallFlagBits insertFlags; 
 
 ASErrorCode error; 
}

A structure used to pass information to the PDDocWillInsertPagesEx() and PDDocDidInsertPagesEx() notifications.

See Also


File: PDExpT.h
Line: 1804

Elements
size  

The size of the data structure. It must be set to sizeof(PDDocInsertPagesParamsRec).

 
targetDoc  

The document into which pages are inserted. This document must have at least one page.

 
insertAfterThisPage  

The page number in targetDoc after which pages from srcDoc are inserted. The first page is 0. If PDBeforeFirstPage (see PDExpT.h) is used, the pages are inserted before the first page in targetDoc. Use PDLastPage to insert pages after the last page in targetDoc.

 
srcDoc  

The document containing the pages that are inserted into targetDoc.

 
srcFromPage  

The page number of the first page in srcDoc to insert into targetDoc. The first page is 0.

 
srcToPage  

The page number of the last page in srcDoc to insert into targetDoc.

 
insertFlags  

Flags that determine what additional information is copied from srcDoc into targetDoc. It must be an OR of the following:

Flag

Description

PDInsertAll

Inserts the entire document srcDoc into the document targetDoc. This operation not only inserts the pages themselves, but also merges other document data from srcDoc into targetDoc. In particular, the following happens:

  • The bookmark tree of srcDoc is merged into the bookmark tree of targetDoc by copying it as a new first-level sub-tree of the targetDoc object's bookmark tree root, of which it becomes the last child. If targetDoc has no bookmark tree, it acquires one identical to the bookmark tree from srcDoc.

  • Named destinations from srcDoc (of PDF 1.1 and later) are copied into targetDoc. If there are named destinations in srcDoc with the same name as some named destination in targetDoc, the ones in targetDoc retain their names and the copied named destinations are given new names based on the old ones with distinguishing digits added. Actions and bookmarks referring to the old names are made to refer to the new names after being copied into targetDoc.

  • Document logical structure from srcDoc is copied into targetDoc. The top-level children of the structure tree root of srcDoc are copied as new top-level children of the structure tree root of targetDoc; a structure tree root is created in targetDoc if there was none before. The role maps of the two structure trees are merged, with name conflicts resolved in favor of the role mappings present in targetDoc. Attribute objects are not copied, nor is class map information from srcDoc merged into that for targetDoc.

If the PDInsertAll flag is not set, pages copied from srcDoc into targetDoc will have their structure back-pointer information stripped off.

PDInsertBookmarks

Inserts bookmarks as well as pages.

PDInsertThreads

Inserts threads as well as pages.

 
error  

An error code which is only valid for the PDDocDidInsertPagesEx() notification.

_t_PDDocLayoutParams 
Product availability: All
Platform availability: All

Syntax

struct _t_PDDocLayoutParams {
 ASSize_t size; 
 
 PDPageRange targetRange; 
 
 ASFixedRect margins; 
 
 PDHorizAlign horizAlign; 
 
 PDVertAlign vertAlign; 
 
 PDColorValueRec color; 
 
 double fontSize; 
 
 ASAtom fontName; 
 
 ASAtom fontType; 
 
 ASBool underline; 
}

Parameters used for adding and describing Bates Numbering.

See Also


File: PDBatesExpT.h
Line: 52

Elements
size  

The size of the data structure.

 
targetRange  

The page range of the document to which Bates Numbering should be added.

 
margins  

The margin for placement of Bates.

 
horizAlign  

The horizontal alignment to be used when adding Bates Numbering to a page.

 
vertAlign  

The vertical alignment to be used when adding Bates Numbering to a page.

 
color  

The color setting for adding Bates Numbering to a page.

 
fontSize  

The font size for adding Bates Numbering to a page.

 
fontName  

The font name for adding Bates Numbering to a page.

 
fontType  

The font type for adding Bates Numbering to a page.

 
underline  

Determines whether to draw an underline to Bates Numbering in a page (optional).

_t_PDDocOpenParams 
Product availability: All
Platform availability: All

Syntax

struct _t_PDDocOpenParams {
 ASSize_t size; 
 
 ASFile file; 
 
 ASPathName fileName; 
 
 ASFileSys fileSys; 
 
 PDAuthProcEx authProcEx; 
 
 void* authProcClientData; 
 
 ASBool doRepair; 
 
 PDPerms restrictPerms; 
}

A structure used by PDDocOpenWithParams() to specify file open information. The parameters are very similar to those in PDDocOpenEx() and PDDocOpenFromASFileEx().

See Also


File: PDExpT.h
Line: 1896

Elements
size  

The size of the data structure. It must be set to sizeof(PDDocOpenParamsRec).

 
file  

The path name to the file, specified in whatever format is correct for fileSys.

 
fileName  

The path name to the file, specified in whatever format is correct for fileSys.

 
fileSys  

A pointer to an ASFileSysRec containing the file system in which the file resides.

 
authProcEx  

An authorization callback, called only if the file is encrypted. This callback should obtain whatever information is needed to determine whether the user is authorized to open the file, then call PDDocAuthorize() (which returns the permissions that the authentication data enables). If the file is encrypted and authProcEx is NULL or returns false, pdErrPassword is raised. The Acrobat viewer's built-in authorization procedure requires the user to enter a password, and allows the user to try three times before giving up.

 
authProcClientData  

A pointer to user-specified data to pass to authProcEx() each time it is called.

 
doRepair  

If true, attempt to repair the file if it is damaged; if false, do not attempt to repair the file if it is damaged.

 
restrictPerms  

The permissions to remove from the document.

_t_PDDocPreSaveInfo 
Product availability: All
Platform availability: All

Syntax

struct _t_PDDocPreSaveInfo {
 ASSize_t size; 
 
 CosObjSetCallbackFlagProc callbackProc; 
}

A structure used to flag Cos objects you wish to access while a PDDoc is being saved. It contains a pointer to a CosObjSetCallbackFlagProc(). In your pre-save callback, you can use this exposed proc to set a flag in the CosObj objects that you care about, so that your callback will be called back during the save and given their offset and length.

See Also


File: PDExpT.h
Line: 1603

Elements
size  

The size of structure. Set it to sizeof(PDDocPreSaveInfoRec).

 
_t_PDDocSaveParams 
Product availability: All
Platform availability: All

Syntax

Parameters used when saving a file with PDDocSaveWithParams() and returned by the PDDocWillSaveEx() notification. Most of these parameters are the same as the parameters for PDDocSave().

See Also


File: PDExpT.h
Line: 1645

Elements
size  

Set this to be the size of this struct.

 
saveFlags  

It must be one of the PDSaveFlags values.

 
newPath  

The path to which the file is saved. A path must be specified when either PDSaveFull or PDSaveCopy are used for saveFlags. If PDSaveIncremental is specified in saveFlags, then newPath should be NULL.

If PDSaveFull is specified and newPath is the same as the file's original path, the new file is saved to a file system determined temporary path. Then the old file is deleted and the new file is renamed to newPath.

 
fileSys  

The file system. If it is NULL, it uses the file system of the document's current backing file.

 
mon  

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

 
monClientData  

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

 
cancelProc  

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  

A pointer to user-specified data to pass to cancelProc each time it is called. It must be NULL if cancelProc is NULL.

 
preSaveProc  

A callback to flag Cos objects you wish to access while the PDDoc is being saved.

 
preSaveProcClientData  

A pointer to user-specified data to pass to preSaveProc each time it is called.

 
offsetProc  

A callback to get information about Cos objects while the PDDoc is being saved.

 
offsetProcClientData  

A pointer to user-specified data to pass to offsetProc each time it is called.

 
major  

The major PDF version number of the document. If major equals 0, both major and minor are ignored. Make sure that the document conforms to the version number you are setting.

 
minor  

The minor PDF version number of the document.

 
XMPPacketReadOnly  

If true, it makes the XML packet containing the XMP metadata for the document read-only and suppresses the generation of padding. If false, the XML packet is made writable and the number of padding bytes specified by the value of the XMPPacketPaddingBytes field is included in the XML packet.

 
XMPPacketPaddingBytes  

Specifies the number of bytes of padding to include in the XML packet containing the XMP metadata for the document, when XMPPacketReadOnly is false (ignored when XMPPacketReadOnly is true). Non-positive values specify the default padding of 2048 bytes; positive values specify the number of bytes of padding directly.

 
preWriteProc  

A callback that is called just before the document is written to disk.

 
preWriteProcClientData  

Client data to pass to the pre-write proc.

 
saveFlags2  

More flags for PDDocSave().

 
numSubFilesToCompact  

The number of incremental saves to compact. It will eliminate the last numSubFilesToCompact subFiles (as opposed to the update section, which does not always correspond to a valid subFile), and merge the changes in them into the current append save.

This parameter is taken into account only if:

  • The current save operation is an incremental save AND

  • The current save operation is a saveAs.

More precisely, compaction of incremental saves will only happen only if:

  • newPath != NULL AND

  • either PDSaveForceIncremental is set or the document has digital signatures in it, or both.

Moreover, if there are any signatures added in any of the incremental saves that are compacted, these signatures will be invalidated. It is up to the client to determine the incremental save at which it should stop compacting to avoid this.

 
offsetProc64  

A 64-bit callback to get information about Cos objects while the PDDoc is being saved.

_t_PDDocWatermarkTextParams 
Product availability: All
Platform availability: All

Syntax

struct _t_PDDocWatermarkTextParams {
 ASSize_t size; 
 
 ASText srcText; 
 
 PDHorizAlign textAlign; 
 
 PDEFont pdeFont; 
 
 ASAtom sysFontName; 
 
 float fontSize; 
 
 PDColorValueRec color; 
}

Parameters used for describing text-based watermarks.

See Also


File: PDExpT.h
Line: 6457

Elements
size  

The size of the data structure.

 
srcText  

The text to be used when generating a text-based watermark.

 
textAlign  

The alignment to be used when justifying a text-based watermark.

 
pdeFont  

The PDEFont to be used when generating a text-based watermark. If it is NULL, the font specified by sysFontName will be used.

 
sysFontName  

The name of a system font to be used when generating a text-based watermark. The font will be embedded/subsetted when possible. This parameter is ignored if pdeFont is non-NULL.

 
fontSize  

The size of the font, in points, to be used when generating a text-based watermark.

 
color  

The color to be used when generating a text-based watermark.

PDTileRec 
Product availability: All
Platform availability: All

Syntax

struct PDTileRec {
 ASUns32 overlap; 
 
 ASBool center; 
 
 ASInt32 marksflags; 
 
 ASInt32 paperWidth; 
 
 ASInt32 paperHeight; 
 
 char* docTitle; 
 
 char* docDate; 
 
 char* docTime; 
 
 ASInt32 col; 
 
 ASInt32 row; 
 
 ASInt32 numCols; 
 
 ASInt32 numRows; 
 
 ASInt32 xOffset; 
 
 ASInt32 yOffset; 
}

Printing flags

See Also


File: PDExpT.h
Line: 6179

Elements
overlap  

The number of points to overlap (user interface units may be anything, clients convert to points).

 
center  

Center the pages' contents on the physical paper.

 
marksflags  

Determines which printer marks to emit.

 
paperWidth  

The width of the paper (points). It is client-provided since the client has PPD access.

 
paperHeight  

The height of the paper (points).

 
docTitle  

The title string for the slug (optional).

 
docDate  

The date string for the slug (optional).

 
docTime  

The time string for the slug (optional).

 
col  

The current column (0 - numcols-1).

 
row  

The current row.

 
numCols  

The number of columns for this page.

 
numRows  

The number of rows for this page.

 
xOffset  

The amount to shift right. First tile to center the entire image on the sheets.

 
yOffset  

The amount to shift down.

PDTileRecEx 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

struct PDTileRecEx {
 PDTileRec pubRec; 
 
 ASUns32 imageablePaperWidth; 
 
 ASUns32 imageablePaperHeight; 
 
 ASUns32 unprintablePaperWidth; 
 
 ASUns32 unprintablePaperHeight; 
 
 ASUns32 indent; 
 
 ASInt32 rotateAngle; 
 
 ASText labelTemplate; 
 
 double driverScale; 
 
 double tileScale; 
}


File: PDFLExpT.h
Line: 387

Elements
pubRec  

Used for giving information to and from the user.

 
imageablePaperWidth  

(pts)

 
imageablePaperHeight  

(pts)

 
unprintablePaperWidth  

Unprintable left edge (pts).

 
unprintablePaperHeight  

Unprintable bottom edge (pts).

 
indent  

The amount tile indented within the imageable area (pts).

 
rotateAngle  

The clockwise rotation angle in degrees for tile.

 
labelTemplate  

The optional label string template has 6 parameters it can fill in. If it is NULL, the label template "$DOC$ $DATE$ $TIME$ $PAGE$ ($ROW$, $COL$)" is used.

 
driverScale  

The scale selected by the user in the Print Setup or Printer Properties dialog box.

 
tileScale  

The scale for tiled pages.

PDTrapPresetRec 
Product availability: All
Platform availability: All

Syntax

struct PDTrapPresetRec {
 ASBool noTrap; 
 
 ASBool defaultTrap; 
 
 float trapWidth; 
 
 float blackWidth; 
 
 float imageTrapWidth; 
 
 ASUns32 trapJoinStyle; 
 
 ASUns32 trapEndStyle; 
 
 ASUns32 stepLimit; 
 
 ASUns32 blackColorLimit; 
 
 float blackDensityLimit; 
 
 ASUns32 slidingTrapLimit; 
 
 ASUns32 trapColorScaling; 
 
 ASUns32 trapPlacement; 
 
 ASBool imageToImageTrapping; 
 
 ASBool imageToObjectTrapping; 
 
 ASBool imageInternalTrapping; 
 
 ASBool imagemaskTrapping; 
 
 ASAtom trapStyleName; 
}


File: PDExpT.h
Line: 5760

Callbacks Detail
PDCryptAuthorizeExProc 
Product availability: All
Platform availability: All

Syntax

PDPermReqStatus (*PDCryptAuthorizeExProc)(PDDoc pdDoc, PDPermReqObj reqObj, PDPermReqOpr reqOpr, void *authData)

Replaces PDCryptAuthorizeProc. PDPerms are now obsolete because Acrobat 5.0 introduces new permission controls. However, Acrobat still supports old security handlers.

It is called whenever Acrobat needs to get authorization data and/or check permissions for operations.

See Also


File: PDExpT.h
Line: 4677
PDCryptAuthorizeProc 
Product availability: All
Platform availability: All

Syntax

PDPerms (*PDCryptAuthorizeProc)(PDDoc pdDoc, void *authData, PDPerms permWanted)

A callback for PDCryptHandler. It is called by PDDocAuthorize() when a user tries to set security for an encrypted document and by a PDAuthProc() when a user tries to open a file.

It must decide, based on the contents of the authorization data structure, whether the user is permitted to open the file, and what permissions the user has for this file. The authorization data structure is available for making this decision. Alternate implementations may not require authorization data and may, for example, make authorization decisions based on data contained in the security data structure (use PDCryptNewSecurityDataProc()).

This callback must not obtain the authorization data (for example, by displaying a user interface into which a user can type a password). Obtaining authorization data is handled by the security handler's PDCryptGetAuthDataProc(), which must be called before this callback. Instead, PDCryptAuthorizeProc() must work with whatever authorization data is passed to it.

It is legitimate for this callback to be called with NULL authorization data; the Acrobat viewer's built-in authProc does this in order to support authorization methods that do not require authorization data.

When this callback is invoked to determine whether a user is permitted to open a file, permWanted is set to pdPermOpen. In this case, the file's contents are not yet decrypted (since this callback is being asked to permit decryption), and some calls must be avoided. For example, a call that causes a page to be parsed results in an error, since the encrypted contents are parsed. In general, it is safe to obtain information about the presence or absence of things, or the number of things, and to examine any part of a document at the Cos level.

See Also


File: PDExpT.h
Line: 4346
PDCryptBatchAuthorizeProc 
Product availability: All
Platform availability: All

Syntax

PDPermReqStatus (*PDCryptBatchAuthorizeProc)(PDDoc pdDoc, PDPermReqObj reqObj, PDPermReqOpr reqOpr, void *authData)

A callback for PDCryptBatchHandler. It is called when a PDF file is opened. It is first called with NULL authData for the case without a user password. It is called again with authorization data provided for the security handler that matches the one used in the PDF file.


File: PDExpT.h
Line: 4906
PDCryptBatchFreeAuthDataProc 
Product availability: All
Platform availability: All

Syntax

void (*PDCryptBatchFreeAuthDataProc)(void *authData)

A callback for PDCryptBatchHandler. If provided, it must be used to free authData acquired via BatchGetAuthData() or BatchNewAuthData(). If no BatchFreeAuthData() function is provided, a default one will be used which calls ASfree() on the authData if it is non-NULL.


File: PDExpT.h
Line: 4917
PDCryptBatchNewAuthDataProc 
Product availability: All
Platform availability: All

Syntax

void * (*PDCryptBatchNewAuthDataProc)(void)

A callback for PDCryptBatchHandler. It is different from the regular PDCryptHandler NewAuthData function. It creates and returns a void* which is the authorization data for the batch security handler. This data should be used to batch both open files and secure files. Therefore, make sure to provide password information for both the pdPermOpen and pdPermSecure cases. This data will be passed to the PDCryptBatchAuthorizeProc() callback and eventually to PDCryptBatchFreeAuthDataProc() to free the data. This authorization data is collected before any files are opened in the batch sequence. It is permitted to display a user interface at this point since the batch operation has not started yet. The data applies to all files, and therefore could represent one or more passwords which can be enumerated in the BatchAuthorize function which receives the batch authorization data.


File: PDExpT.h
Line: 4883
PDCryptBatchParamDescProc 
Product availability: All
Platform availability: All

Syntax

void (*PDCryptBatchParamDescProc)(const ASCab settings, ASCab paramDesc)

A callback for PDCryptBatchHandler. The developer should provide information about the current batch settings for the security handler. Batch settings are provided as a read-only ASCab that is passed to the function. A writable ASCab is also provided, which should be used to store parameter information about the security handler. The description information should be stored starting in the paramDesc ASCab using ASText objects starting with key " 1".


File: PDExpT.h
Line: 4864
PDCryptBatchPostSequenceProc 
Product availability: All
Platform availability: All

Syntax

void (*PDCryptBatchPostSequenceProc)(ASCab settings)

A callback for PDCryptBatchHandler. This function is called at the end of a batch sequence after all files have been processed. Any memory that was allocated in the BatchPreSequence() call should be cleaned up in this callback.


File: PDExpT.h
Line: 4945
PDCryptBatchPreSequenceProc 
Product availability: All
Platform availability: All

Syntax

ASBool (*PDCryptBatchPreSequenceProc)(ASCab settings)

A callback for PDCryptBatchHandler. This function is called at the beginning of a batch sequence before any files have been opened. This allows a security handler to be called back with the ASCab of settings that were filled out by the BatchShowDialog() function, or by an ASCab that was read in from disk. Pointers of security information are not serialized to disk, and therefore a security information structure may need to be regenerated based on other security information in the ASCab. It is permitted for the BatchPreSequence() callback to put up a user interface asking the user for more information since the batch sequence has not started yet. If this function returns false, the viewer will assume that the command cannot be executed and will cancel the sequence.


File: PDExpT.h
Line: 4936
PDCryptBatchShowDialogProc 
Product availability: All
Platform availability: All

Syntax

ASBool (*PDCryptBatchShowDialogProc)(ASCab settings)

A callback for PDCryptBatchHandler. This callback puts up a dialog box that allows a user to enter data that will be used to batch secure a series of files. The data is stored in an ASCab which is part of a batch sequence file. The actual security data, including password(s), should be stored as a pointer in the ASCab so that password information is not serialized to disk. Pointers are not serialized from ASCab objects, but ASText objects, ASInt32 objects, and ASBool objects are serialized.


File: PDExpT.h
Line: 4849
PDCryptBatchUpdateSecurityDataProc 
Product availability: All
Platform availability: All

Syntax

ASBool (*PDCryptBatchUpdateSecurityDataProc)(PDDoc pdDoc, ASCab settings, ASAtom *cryptHandler, void **secDataP)

A callback for PDCryptBatchHandler. This function should update the crypt handler's security data without bringing up a dialog. This data is provided by a PDCryptBatchShowDialogProc(). The current security data can be obtained by calling PDDocGetNewSecurityData().


File: PDExpT.h
Line: 4964
PDCryptCanParseEncryptDictProc 
Product availability: All
Platform availability: All

Syntax

ASBool (*PDCryptCanParseEncryptDictProc)(PDDoc pdDoc, CosObj encryptDict)

(Optional) This call is used to provide PDCrypt handler interoperability. When an encrypted document is being opened and the security handler specified in the encryption dictionary is not present, this callback is used to determine if one of the registered security handlers can be used to open the document.


File: PDExpT.h
Line: 4765
PDCryptDisplaySecurityDataProc 
Product availability: All
Platform availability: All

Syntax

ASBool (*PDCryptDisplaySecurityDataProc)(PDDoc pdDoc, ASAtom cryptHandler)

Called when the security handler should bring up a document (security) information dialog box with the current settings. It also should return true when the user wants to change the settings.

If this callback is not supplied, the default information dialog is displayed with PDPerms bits information (an Acrobat 4.x-equivalent dialog).


File: PDExpT.h
Line: 4743
PDCryptEncryptDocMetadata 
Product availability: All
Platform availability: All

Syntax

ASBool (*PDCryptEncryptDocMetadata)(PDDoc pdDoc)

(Optional) A callback for PDCryptHandler. It determines whether a document's metadata will be encrypted. If this call is not implemented, the metadata is always encrypted. Note that documents with plain text metadata can be opened only by Acrobat versions 6.0 and later.


File: PDExpT.h
Line: 4808
PDCryptFillEncryptDictProc 
Product availability: All
Platform availability: All

Syntax

void (*PDCryptFillEncryptDictProc)(PDDoc pdDoc, CosObj encryptDict)

A callback for PDCryptHandler. It is called when an encrypted document is saved. It fills the document's Encryption dictionary with whatever information the security handler wants to store in the document.

Normally this callback is called after PDCryptUpdateSecurityDataProc(). The security data structure can be obtained with a call to PDDocGetNewSecurityData(), and encryptDict is filled based on this data.

The sequencing of events that the viewer performs during creation of the encryptDict is as follows:

See Also


File: PDExpT.h
Line: 4563
PDCryptFilterAuthorizeProc 
Product availability: All
Platform availability: All

Syntax

ASBool (*PDCryptFilterAuthorizeProc)(CosDoc dP, ASAtom filterName, CosObj encryptDict, ASBool bEncrypt, ASBool bUIAllowed)

(Optional) A callback for PDCryptFilterHandler. Acrobat's security mechanism calls this method to determine whether the user should have access to this filter.

See Also


File: PDExpT.h
Line: 5023
PDCryptFilterGetDataProc 
Product availability: All
Platform availability: All

Syntax

ASInt32 (*PDCryptFilterGetDataProc)(CosDoc dP, ASAtom filterName, char **key, ASBool bNewKey, ASBool bUIAllowed)

(Optional) A callback for PDCryptFilterHandler. Acrobat's security mechanism calls this method to retrieve the encryption/decryption key for this filter. It is called only when the filter's encryption method is V2.

See Also


File: PDExpT.h
Line: 5046
PDCryptFilterStreamProc 
Product availability: All
Platform availability: All

Syntax

void (*PDCryptFilterStreamProc)(CosDoc dP, ASAtom filterName, ASCryptStm stm, ASBool handOff, CosObj params, ASInt32 stmLength)

(Optional) A callback for PDCryptFilterHandler. Callbacks that conform to this prototype are called to encrypt or decrypt streams from a document.

The first call to a procedure of this type must fill out an ASCryptStmRec structure with pointers to callback routines for various types of stream access; see ASCryptStmProcs().

See Also


File: PDExpT.h
Line: 4999
PDCryptFreeAuthDataProc 
Product availability: All
Platform availability: All

Syntax

void (*PDCryptFreeAuthDataProc)(PDDoc pdDoc, void *authData)

(Optional) A callback for PDCryptHandler. It is used to free authorization data acquired via PDCryptNewAuthDataProc(). If this callback is omitted, the viewer defaults to freeing the data using ASfree().

See Also


File: PDExpT.h
Line: 4616
PDCryptFreeCryptDataProc 
Product availability: All
Platform availability: All

Syntax

void (*PDCryptFreeCryptDataProc)(PDDoc pdDoc, char *cryptData)

(Optional) A callback for PDCryptHandler. It is used to free authorization data acquired via PDCryptNewCryptDataProc(). If this callback is omitted, the viewer defaults to freeing the data using ASfree().

See Also


File: PDExpT.h
Line: 4630
PDCryptFreeSecurityDataProc 
Product availability: All
Platform availability: All

Syntax

void (*PDCryptFreeSecurityDataProc)(PDDoc pdDoc, void *secData)

(Optional) A callback for PDCryptHandler. It is used to free security data acquired via PDCryptNewSecurityDataProc(). If this callback is omitted, the viewer defaults to freeing the data using ASfree().

See Also


File: PDExpT.h
Line: 4602
PDCryptGetAuthDataExProc 
Product availability: All
Platform availability: All

Syntax

ASBool (*PDCryptGetAuthDataExProc)(PDDoc pdDoc, PDPermReqObj reqObj, PDPermReqOpr reqOpr, void **authDataP)

Replaces PDCryptGetAuthDataProc(). It is called whenever Acrobat needs to get authorization data and/or check permissions for operations.

PDPerms are now obsolete because Acrobat 5.0 introduces new permission controls. However, Acrobat still supports old security handlers.

See Also


File: PDExpT.h
Line: 4700
PDCryptGetAuthDataProc 
Product availability: All
Platform availability: All

Syntax

ASBool (*PDCryptGetAuthDataProc)(PDDoc pdDoc, PDPerms permWanted, void **authDataP)

A callback for PDCryptHandler. This callback is called from a PDAuthProc when a file is opened after PDCryptNewSecurityDataProc() is called.

The callback must determine the user's authorization properties for the document by obtaining authorization data, such as a user interface log in or password entry. It populates an authorization data structure with this data.

This callback may call the security handler's PDCryptNewAuthDataProc() to allocate the authorization data structure. The use of an authorization data structure is optional (an implementation may wish to contain authorization data within the security data structure). The authorization data structure is subsequently used by the security handler's PDCryptAuthorizeProc() to determine whether the user is authorized to open the file.

A security handler can specify the standard password dialog box by using AVCryptGetPassword(). In this case, authData is a char*.

See Also


File: PDExpT.h
Line: 4401
PDCryptGetDocPermsProc 
Product availability: All
Platform availability: All

Syntax

void (*PDCryptGetDocPermsProc)(PDDoc pdDoc, ASBool perms[PDPermReqObjLast][PDPermReqOprLast], ASInt16 *version)

A callback for PDCryptHandler. This function should extract and return information about the document permissions to display for the user: whether the user can print, edit, copy text and graphics, edit notes and do form fill in and signing.

The permissions returned are logically AND-ed with the document permissions returned by any other permissions handlers, and displayed to the user. All crypt handlers should implement this call so that consolidated permissions can be displayed. To display your own crypt handler's permissions, implement PDCryptDisplaySecurityDataProc().

If this callback is absent, Acrobat assumes that all the operations on the document are allowed.

See Also


File: PDExpT.h
Line: 4795
PDCryptGetInfoTextProc 
Product availability: All
Platform availability: All

Syntax

ASText (*PDCryptGetInfoTextProc)(PDDoc pdDoc, GCHTextType textType)

(Optional) A callback for PDCryptHandler. It provides information for display about document security settings.


File: PDExpT.h
Line: 4828
PDCryptGetSecurityInfoProc 
Product availability: All
Platform availability: All

Syntax

void (*PDCryptGetSecurityInfoProc)(PDDoc pdDoc, ASUns32 *secInfo)

(Optional) A callback for PDCryptHandler. It is called by PDDocGetNewSecurityInfo(). It extracts the security information from the security data structure, and returns the security information.

This function is also used after a Save As... to reset the permissions according to the current document.

A default set of permissions is used if this callback is absent:

pdInfoCanPrint|pdInfoCanEdit|pdInfoCanCopy|pdInfoCanEditNotes

See PDPerms.

See Also


File: PDExpT.h
Line: 4587
PDCryptNewAuthDataProc 
Product availability: All
Platform availability: All

Syntax

void * (*PDCryptNewAuthDataProc)(PDDoc pdDoc)

(Optional) A callback for PDCryptHandler. It creates a new empty authorization data structure. This structure is subsequently filled by PDCryptGetAuthDataProc(), then passed to PDCryptAuthorizeProc() and eventually to ASfree().

This callback is not called by the Acrobat viewer, but a security handler may use it if it wishes. The Acrobat viewer's standard security handler does not use this method.

See Also


File: PDExpT.h
Line: 4363
PDCryptNewCryptDataExProc 
Product availability: All
Platform availability: All

Syntax

void (*PDCryptNewCryptDataExProc)(PDDoc pdDoc, char **cryptData, ASInt32 *cryptDataLen, ASInt32 *cryptVersion)

A callback for PDCryptHandler. It sets up the key to be passed to initialize the RC4 cipher for encryption and decryption of a PDF file. It is called when an encrypted document is opened or saved.

The key is truncated when the length is greater than the viewer currently supports. Data is freed by PDCryptFreeCryptDataProc() if provided. Otherwise, ASfree() is used.

See Also


File: PDExpT.h
Line: 4654
PDCryptNewCryptDataProc 
Product availability: All
Platform availability: All

Syntax

void (*PDCryptNewCryptDataProc)(PDDoc pdDoc, char **cryptData, ASInt32 *cryptDataLen)

A callback for PDCryptHandler. It sets up the key to be passed to initialize the RC4 cipher for encryption and decryption of a PDF file. It is called when an encrypted document is opened or saved.

See Also


File: PDExpT.h
Line: 4524
PDCryptNewSecurityDataFromOriginalDocProc 
Product availability: All
Platform availability: All

Syntax

ASBool (*PDCryptNewSecurityDataFromOriginalDocProc)(PDDoc pdDoc, CosObj encryptDict, PDDoc alreadyOpenedDoc, CosObj openedEncryptDict, void **authDataP)

Called when the application needs to open a rolled back portion of the original document. A rolled back document is the original portion of the document when it is digitally signed. This functionality is used for document modification detection.

A rolled back document still requires authorization data which should be identical to the original document's. However, the authDataP structure is unique to each security handler; therefore, it cannot be duplicated by the application.

This callback is intended for opening a rolled back document silently by asking the security handler to provide authorization data for it. The security handler should be able to duplicate the security data associated with the original document and supply for the rolled back document. The callee is expected to authorize subsequent callbacks, including Crypt Filters.

If this callback is not provided, the security handler is asked for authorization data via a normal call such as PDCryptGetAuthDataExProc(). The side effect might include the security handler's prompting for a password for the rolled back document.


File: PDExpT.h
Line: 4728
PDCryptNewSecurityDataProc 
Product availability: All
Platform availability: All

Syntax

void * (*PDCryptNewSecurityDataProc)(PDDoc pdDoc, CosObj encryptDict)

(Optional) A callback for PDCryptHandler. It creates and populates a new structure that contains whatever security-related information the security handler requires (for example, permissions, whether the file has owner and/or user passwords, owner and/or user passwords, or other data used internally by the security handler). If encryptDict is not NULL, the structure should be populated based on the encryptDict parameter's contents. This method is intended only to initialize the security data structure.

This callback is called under two circumstances:

If a security handler does not have this callback, the document's newSecurityData field is set to NULL.

If a file is to be saved, then PDCryptUpdateSecurityDataProc() is subsequently called to allow user interface modification of the contents.

Security data is freed using PDCryptFreeSecurityDataProc(). If PDCryptFreeSecurityDataProc() is not defined, ASfree() is used.

See Also


File: PDExpT.h
Line: 4445
PDCryptReservedProc 
Product availability: All
Platform availability: All

Syntax

void * (*PDCryptReservedProc)(void)

(Optional) A callback for PDCryptHandler. It is used by the Acrobat WebBuy proprietary method of passing crypt data.


File: PDExpT.h
Line: 4749
PDCryptReservedProc2 
Product availability: All
Platform availability: All

Syntax

void * (*PDCryptReservedProc2)(PDDoc pdDoc, ASCab settings)

(Optional) Used by Acrobat for Automated Permission Testing.


File: PDExpT.h
Line: 4833
PDCryptUpdateSecurityDataProc 
Product availability: All
Platform availability: All

Syntax

ASBool (*PDCryptUpdateSecurityDataProc)(PDDoc pdDoc, ASAtom *cryptHandler, void **secDataP)

A callback for PDCryptHandler. It updates the security data structure that was created by PDCryptNewSecurityDataProc(). This structure can be obtained by calling PDDocGetNewSecurityData(). The security data structure of the previously saved file can be obtained with a call to PDDocGetSecurityData().

The security data structure should be updated to reflect the encryption parameters that will be used when saving the file (this information is usually obtained via dialogs). The encryption parameters are transferred to the Encrypt dictionary by a subsequent callback to PDCryptFillEncryptDictProc().

The security data should be allocated by ASmalloc() or a related function. Security data is freed using PDCryptFreeSecurityDataProc(). If PDCryptFreeSecurityDataProc() is not defined, ASfree() is used.

The callback can also update the security handler itself. For example, the standard encryption handler switches to no encryption if no passwords or permissions are set in the security dialog box. Return ASAtomNull in cryptHandler if no encryption is used in the saved file.

See Also


File: PDExpT.h
Line: 4508
PDCryptValidateSecurityDataProc 
Product availability: All
Platform availability: All

Syntax

void (*PDCryptValidateSecurityDataProc)(PDDoc pdDoc, void *secData)

(Optional) A callback for PDCryptHandler. It validates the security data structure, which specifies the user's permissions. This callback may modify the security data structure (for example, because the user is not authorized to change the security as they requested). A client may have called PDDocNewSecurityData() to obtain a new security data structure, then modified it, and then called PDDocSetNewSecurityData() to change the document security. This callback should be called before actually setting the document's security data.

This callback is not called automatically by the Acrobat viewer. It must be called, if desired, by the security handler's PDCryptUpdateSecurityDataProc().

See Also


File: PDExpT.h
Line: 4470
PDDocEnumProc 
Product availability: All
Platform availability: All

Syntax

ASBool (*PDDocEnumProc)(PDDoc pdDoc, void *clientData)

A callback for PDEnumDocs(). It is called once for each open PDDoc.

See Also


File: PDExpT.h
Line: 3599
PDDocPreSaveProc 
Product availability: All
Platform availability: All

Syntax

void (*PDDocPreSaveProc)(PDDoc pdDoc, PDDocPreSaveInfo preSaveInfo, void *clientData)

A callback in the PDDocSaveParams structure used by PDDocSaveWithParams(). Use this callback to flag Cos objects you wish to access while a PDDoc is being saved.

See Also


File: PDExpT.h
Line: 1625
PDDocPreWriteProc 
Product availability: All
Platform availability: All

Syntax

void (*PDDocPreWriteProc)(PDDoc pdDoc, void *clientData)

A callback in the PDDocSaveParams structure. It is invoked by PDDocSaveWithParams() immediately before a PDDoc is saved to disk.

See Also


File: PDExpT.h
Line: 1636
PDDocRequestEntireFileProc 
Product availability: All
Platform availability: All

Syntax

ASInt32 (*PDDocRequestEntireFileProc)(PDDoc pdDoc, PDDocRequestReason reason, void *clientData)

A callback used by PDDocRequestEntireFile. Use this callback to process a document file.

See Also


File: PDExpT.h
Line: 6429
PDDocRequestPagesProc 
Product availability: All
Platform availability: All

Syntax

ASInt32 (*PDDocRequestPagesProc)(PDDoc pdDoc, ASInt32 startPage, ASInt32 nPages, PDDocRequestReason reason, void *clientData)

A callback for PDDocRequestPages().


File: PDExpT.h
Line: 6408
PDDocWillExportAnnotCallback 
Product availability: All
Platform availability: All

Syntax

ASBool (*PDDocWillExportAnnotCallback)(PDDoc doc, PDPage pdpage, PDAnnot src, CosObj dict)

A callback for PDDocExportNotes. It determines whether an annotation is exported.

See Also


File: PDExpT.h
Line: 6093
PDDocWillExportAnnotProc 
Product availability: All
Platform availability: All

Syntax

ASBool (*PDDocWillExportAnnotProc)(PDAnnotHandler pdanh, PDAnnot src, PDAnnot dst)

A callback for PDAnnotHandler. It determines whether an annotation is exported.

See Also


File: PDExpT.h
Line: 622
PDDocWillImportAnnotCallback 
Product availability: All
Platform availability: All

Syntax

ASBool (*PDDocWillImportAnnotCallback)(PDDoc doc, PDPage pdPage, PDAnnot annot)

A callback for PDDocImportCosDocNotes() and PDDocImportNotes(). It determines whether an annotation will be imported.

See Also


File: PDExpT.h
Line: 6110
PDDocWillImportAnnotProc 
Product availability: All
Platform availability: All

Syntax

ASBool (*PDDocWillImportAnnotProc)(PDAnnotHandler pdanh, PDDoc doc, PDPage pdpage, PDAnnot annot)

A callback for PDAnnotHandler. It determines whether an annotation will be imported.

See Also


File: PDExpT.h
Line: 641
PDDocXAPMetadataDidChangeProc 
Product availability: All
Platform availability: All

Syntax

void (*PDDocXAPMetadataDidChangeProc)(PDDoc pdDoc, ASText newMetadata, void *data)

Receives the notification that the XMP metadata describing a document as a whole has changed.

Notifications


File: PDMetadataExpT.h
Line: 61
PDOCFindOutAutoStatePrefProc 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

ASBool (*PDOCFindOutAutoStatePrefProc)()

Declare the type PDOCFindOutAutoStatePrefProc, which is a callback that lets the client set the AutoState preference.


File: PDFLExpT.h
Line: 2368
PDOCFindOutLanguageProc 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

char * (*PDOCFindOutLanguageProc)()

Declare the type PDOCFindOutLanguageProc, which is a callback that lets the client set the current user interface language level.


File: PDFLExpT.h
Line: 2362
PDOCFindOutUserProc 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

ASText (*PDOCFindOutUserProc)(ASAtom indTtlOrOrg)

Declare the type PDOCFindOutUserProc, which is a callback that lets the client set the current user interface user level.


File: PDFLExpT.h
Line: 2365
PDOCFindOutZoomProc 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

float (*PDOCFindOutZoomProc)(PDDoc pdDoc)

Declare the type PDOCFindOutZoomProc, which is a callback that lets the client set the current user interface zoom level.


File: PDFLExpT.h
Line: 2359
StdPassword 
Product availability: All
Platform availability: All

Syntax

charStdPassword[MAX_PWCHARS+1]

File: PDExpT.h
Line: 4194

Method Detail
PDCryptAuthorizeFilterAccess()
Product availability: All
Platform availability: All

Syntax

ASBool PDCryptAuthorizeFilterAccess(PDDoc doc, ASAtom handlerName, ASAtom filterName, ASBool bEncrypt)

Gets authorization to encrypt or decrypt an embedded file, where that file's cryptographic filter is not the one used to open the document in which the file is embedded.

Parameters

doc — 

The document containing the embedded file whose filter access is requested.

 
handlerName — 

The security handler containing the Authorize() callback procedure to run.

 
filterName — 

The ASAtom corresponding to the name of the security filter used by the embedded file.

 
bEncrypt — 

When true, the access is required for an encryption operation. When false, it is a decryption operation.

Returns

true if the authorization succeeds, false otherwise.

See Also

Exceptions

pdErrNoCryptHandler is raised if there is no security handler registered for the document.

Since

PI_PDMODEL_VERSION >= 0x00060000

File: PDProcs.h
Line: 10696
PDDocAcquire() 
Product availability: All
Platform availability: All

Syntax

void PDDocAcquire(PDDoc doc)

Increments a document's reference count. The document will not be closed until the reference count is zero, or the application terminates.

Parameters

doc — 

IN/OUT The document whose reference count is incremented.

See Also

Since

PI_PDMODEL_VERSION >= 0x00020000

File: PDProcs.h
Line: 1399
PDDocAcquirePage() 
Product availability: All
Platform availability: All

Syntax

PDPage PDDocAcquirePage(PDDoc doc, ASInt32 pageNum)

Gets a PDPage from a document. It increments the page's reference count. After you are done using the page, release it using PDPageRelease(). If PDPageRelease() is not called, it could block the document containing the page from being closed. To avoid such problems, use the CSmartPDPage class, as it ensures that the page is released as it goes out of scope.

Parameters

doc — 

The document containing the page to acquire.

 
pageNum — 

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

Returns

The acquired page.

See Also

Exceptions

genErrBadParm

Since

PI_PDMODEL_VERSION >= 0x00020000

File: PDProcs.h
Line: 1563
PDDocAddBatesNumbering() 
Product availability: Acrobat, PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

ASBool PDDocAddBatesNumbering(PDDoc pdDoc, PDDocBatesNumberingParams batesParams, PDDocLayoutParamsRec params)

Adds Bates Numbering to a PDF document.

Parameters

pdDoc — 

The PDF document to which Bates Numbering is added.

 
batesParams — 

Bates Numbering specific parameters, which include the start number, number of digits, prefix, and suffix.

 
params — 

All layout parameters that are related to how Bates Numbering is placed on the page.

Returns

true if Bates Numbering was successfully added, false otherwise.

See Also

Exceptions

pdErrBadAction

Since

PI_PDMODEL_VERSION >= 0x00090000

File: PDBatesProcs.h
Line: 27
PDDocAddThread() 
Product availability: Acrobat, PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

void PDDocAddThread(PDDoc doc, ASInt32 addAfterIndex, PDThread thread)

Adds an article thread to a document after the specified thread index.

Parameters

doc — 

IN/OUT The document in which the thread is added. It must match the document used in the call to PDThreadNew() that created the thread.

 
addAfterIndex — 

IN/OUT The index of the thread after which thread is added.

 
thread — 

IN/OUT The thread to add.

See Also

Notifications

Since

PI_PDMODEL_VERSION >= 0x00020000

File: PDProcs.h
Line: 1863
PDDocAddWatermarkFromPDPage() 
Product availability: Acrobat, PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

void PDDocAddWatermarkFromPDPage(PDDoc pdDoc, PDPage pdPage, PDDocAddWatermarkParamsRec* pParams)

Adds a PDPage as a watermark to a page range in the given document.

Parameters

pdDoc — 

The document onto which the watermark will be added.

 
pdPage — 

The page to be added as a watermark.

 
pParams — 

Structure specifying how the watermark should be added to the document.


File: PDProcs.h
Line: 11179
PDDocAddWatermarkFromText() 
Product availability: Acrobat, PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

void PDDocAddWatermarkFromText(PDDoc pdDoc, PDDocWatermarkTextParamsRec* pTextParams, PDDocAddWatermarkParamsRec* pParams)

Adds a text-based watermark to a page range in the given document.

Parameters

pdDoc — 

The document onto which the watermark will be added.

 
pTextParams — 

Structure describing the text-based watermark to be added.

 
pParams — 

Structure specifying how the watermark should be added to the document.


File: PDProcs.h
Line: 11187
PDDocApplyRedactions() 
Product availability: Acrobat, PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

ASBool PDDocApplyRedactions(PDDoc pdDoc, PDApplyRedactionParams applyParams)

Applies a set of redaction marks to the document, permanently removing the affected document content and the marks themselves.

Parameters

pdDoc — 

IN/OUT The document to which the redaction marks should be applied.

 
applyParams — 

IN/OUT A pointer to a PDApplyRedactionParams specifying which redaction marks to apply and what parameters to use when applying them. If NULL, then all redaction marks present in the document will be applied.

Returns

true if the document's content was changed, false otherwise.

See Also

Exceptions

pdErrBadAnnotation is raised if any specified redaction marks are invalid

File: PDProcs.h
Line: 11815
PDDocAuthorize() 
Product availability: All
Platform availability: All

Syntax

PDPerms PDDocAuthorize(PDDoc pdDoc, PDPerms permsWanted, void* authData)

Deprecated in Acrobat 7.0. Use PDDocPermRequest() instead.

Adds permissions to the specified document, if permitted. It calls the PDCryptAuthorizeProc() callback of the document's security handler to determine which of the specified permissions will actually be granted. After calling this method, the document's permissions will be the OR of the previous permissions and the permissions granted by the PDCryptAuthorizeProc() callback.

Use PDDocPermRequest() to determine if a document's permissions allow a particular operation for a particular object.

Parameters

pdDoc — 

The document for which new permissions are requested.

 
permsWanted — 

The new permissions being requested. It must be an OR of the PDPerms values.

 
authData — 

A pointer to data to pass to the PDCryptAuthorizeProc() callback of the document's security handler. For the Acrobat viewer's built-in security handler, authData is a char* containing the password.

Returns

The OR of the previous value of the document's permissions field, and the permissions granted by the PDCryptAuthorizeProc() callback of the document's security handler. The result will be an OR of the PDPerms values.

See Also

Exceptions

pdErrNeedCryptHandler is raised if no security handler is associated with pdDoc. It also raises whatever exceptions are raised by the security handler's PDCryptAuthorizeProc() callback.

Since

PI_PDMODEL_VERSION >= 0x00020000

File: PDProcs.h
Line: 2407
PDDocCalculateImplicitMetadata() 
Product availability: Acrobat, PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

void PDDocCalculateImplicitMetadata(INPDDoc pdDoc)

Notifies all registered implicit metadata calculators to run. It issues the notification PDDocCalculateMetadata(), passing pdDoc to all registered handlers.

Parameters

pdDoc — 

The document for which implicit metadata is calculated.

See Also

Notifications

Since

PI_PDMETADATA_VERSION >= 0x00050000

File: PDMetadataProcs.h
Line: 278
PDDocCalculateMetadata() 
Product availability: All
Platform availability: All

Syntax

void PDDocCalculateMetadata(PDDoc doc, void* clientData)

The client is requested to calculate and set metadata items that depend on the state of the document. It is issued when a document is saved. It can also be issued explicitly via PDDocCalculateImplicitMetadata() .

Parameters

doc — 

The document for which implicit metadata is to be calculated.

 
clientData — 

A pointer to a block of user-supplied data that was passed when the client registered for this notification using AVAppRegisterNotification() .

See Also

Numerous, but especially PDDocCalculateImplicitMetadata

File: PIPokes.h
Line: 1989
PDDocCallOPIHandler() 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

void PDDocCallOPIHandler(OPIdict* opi, ASStm stm, ASBool* bl, void* clientData)

Sent during PostScript printing, when a form or image containing an OPI dictionary is encountered. If it returns true (by filling the boolean variable passed to it), the client is presumed to have taken care of the entire form or image, and PDFL will emit nothing. Otherwise, PDFL will generate OPI comments based on the dictionary.

Parameters

opi — 

The OPI dictionary.

 
stm — 

The PostScript print stream.

 
bl — 

The pointer to a bool variable which the client returns.

 
clientData — 

Client data.


File: PIPokes.h
Line: 2720
PDDocClearErrors() 
Product availability: All
Platform availability: All

Syntax

void PDDocClearErrors(PDDoc doc)

Clears all the non-fatal errors encountered since the document was opened, or PDDocClearErrors was called.

Parameters

doc — 

The document in which the non-fatal errors have occurred.

Since

PI_PDMODEL_VERSION >= 0x000A0000

File: PDProcs.h
Line: 12606
PDDocClearFlags() 
Product availability: All
Platform availability: All

Syntax

void PDDocClearFlags(PDDoc doc, ASInt32 flags)

Clears flags associated with a document. This method is most frequently used to mark a modified document as clean (by clearing the PDDocNeedsSave flag) to avoid bringing up the Save dialog box when the file is closed.

Parameters

doc — 

IN/OUT The document whose flags are cleared.

 
flags — 

IN/OUT The flags to clear. It must be an OR of the PDDocFlags values.

See Also

Since

PI_PDMODEL_VERSION >= 0x00020001

File: PDProcs.h
Line: 5358
PDDocClose() 
Product availability: All
Platform availability: All

Syntax

void PDDocClose(PDDoc doc)

Closes a document and releases its resources. If doc is NULL, it does nothing. Changes are not saved. You must use PDDocSave() to save any modifications before calling PDDocClose().

If the document has been modified but you wish to mark it as clean, use PDDocClearFlags().

Parameters

doc — 

The document to close.

See Also

Exceptions

pdErrUnableToCloseDueToRefs is raised if there are any outstanding references to objects in the document, and the document will still be valid (its resources will not be released).
genErrBadUnlock is raised if the document's open count is less than one.

Since

PI_PDMODEL_VERSION >= 0x00020000

File: PDProcs.h
Line: 1388
PDDocCopyToFile() 
Product availability: All
Platform availability: All

Syntax

void PDDocCopyToFile(PDDoc pdDoc, PDDocCopyParams params)

In Adobe Reader or for documents that are not dirty, this method copies the bytes from the document's ASFile to the specified location. This also occurs if the saveChanges field in params is false. If saveChanges is true, the document is dirty, and the product is Acrobat, a full save is performed to the specified file. The resulting file is linearized (optimized for the web). If the file already exists, it is overwritten.

Parameters

pdDoc — 

The document to copy.

 
params — 

A structure that defines how the PDF file is copied.

Exceptions

genErrBadParm is raised if an invalid argument is passed in params.
pdErrAlreadyOpen is raised if the target and source files are the same.
fileErrDiskFull is raised if there is no space for the copy.
pdErrCancelSave is raised if the save was canceled (cancelProc in params returned true).
pdErrUnableToRead is raised if a read error occurred on the source.
pdErrUnableToWrite is raised if a write error occurred on the destination.

Since

PI_PDMODEL_VERSION >= 0x00040005

File: PDProcs.h
Line: 7688
PDDocCountXAPMetadataArrayItems() 
Product availability: Acrobat, PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

ASInt32 PDDocCountXAPMetadataArrayItems(PDDoc pdDoc, ASText namespaceName, ASText path)

Returns the number of array items in a property array associated with a PDDoc.

Parameters

pdDoc — 

The document containing the metadata.

 
namespaceName — 

The XML namespace URI for the schema in which the property is to be found.

 
path — 

The name of the simple property to be modified.

Returns

An ASInt32 which is the number of array items in the property array.

See Also

Exceptions

pdMetadataErrCouldntCreateMetaXAP

Since

PI_PDMETADATA_VERSION >= 0x00080000

File: PDMetadataProcs.h
Line: 561
PDDocCreate() 
Product availability: Acrobat, PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

PDDoc PDDocCreate()

Creates a new document. The only Cos object in the document will be a Catalog. See Section 3.6 in the PDF Reference. After the document is created, at least one page must be added using PDDocCreatePage() or PDDocInsertPages() before the Acrobat viewer can display or save the document.

When you are done with the document, you must call PDDocClose() to release the resources used by the PDDoc; do not call PDDocRelease().

Returns

The newly created document.

See Also

Since

PI_PDMODEL_VERSION >= 0x00020000

File: PDProcs.h
Line: 1289
PDDocCreateNameTree() 
Product availability: Acrobat, PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

PDNameTree PDDocCreateNameTree(PDDoc thePDDoc, ASAtom theTree)

Retrieves the name tree inside the Names dictionary with the specified key name, or creates it if it does not exist.

Parameters

thePDDoc — 

The document in which the name tree is created.

 
theTree — 

The name of the name tree to create. A string can be converted to an ASAtom using ASAtomFromString().

Returns

The newly created PDNameTree for the PDDoc. It returns a NULL PDNameTree if pdDoc has no root dictionary. The return value should be tested with PDNameTreeIsValid().

See Also

Since

PI_PDMODEL_VERSION >= 0x00040000

File: PDProcs.h
Line: 6933
PDDocCreatePage() 
Product availability: Acrobat, PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

PDPage PDDocCreatePage(PDDoc doc, ASInt32 afterPageNum, ASFixedRect mediaBox)

Creates and acquires a new page. The page is inserted into the document at the specified location. Call PDPageRelease() when you are done using the page.

Parameters

doc — 

The document in which the page is created.

 
afterPageNum — 

The page number after which the new page is inserted. The first page is 0. Use PDBeforeFirstPage() (see PDExpT.h) to insert the new page at the beginning of a document.

 
mediaBox — 

A rectangle specifying the page's media box, specified in user space coordinates.

Returns

The newly created page.

See Also

Notifications

Since

PI_PDMODEL_VERSION >= 0x00020000

File: PDProcs.h
Line: 1588
PDDocCreatePDCollection() 
Product availability: All
Platform availability: All

Syntax

PDCollection PDDocCreatePDCollection(PDDoc pdDoc)

Creates a collection in a document. It replaces any existing collection.

Parameters

pdDoc — 

The document that will host the new collection.

Returns

The new collection object.


File: PDProcs.h
Line: 12196
PDDocCreateRedaction() 
Product availability: All
Platform availability: All

Syntax

PDAnnot PDDocCreateRedaction(PDDoc pdDoc, PDRedactParams redactionProps)

Creates a redaction mark on a given page. The resulting annotation will be added to the page, but the affected content will not be removed until PDDocApplyRedactions is called with this mark.

Parameters

pdDoc — 

IN/OUT The document for which the new redaction mark should be created.

 
redactionProps — 

IN A set of properties to be used for the new redaction mark.

Returns

The new annotation representing the redaction mark.

See Also

Exceptions

genErrBadParm is raised if redactionProps is NULL or if contains an invalid page number or an empty list of quads.

File: PDProcs.h
Line: 11830
PDDocCreateStructTreeRoot() 
Product availability: Acrobat, PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

void PDDocCreateStructTreeRoot(INPDDoc pdDoc, OUTPDSTreeRoot* treeRoot)

Creates a new StructTreeRoot element.

If PDDocCreateStructTreeRoot() is called on a PDDoc that already has a structure tree root, it returns without modifying the document.

It raises an exception if pdDoc already has a StructTreeRoot.

Parameters

pdDoc — 

IN/OUT The PDDoc for which the StructTreeRoot element is created.

 
treeRoot — 

IN/OUT (Filled by the method) The newly-created StructTreeRoot element.

See Also

Since

PI_PDS_WRITE_VERSION >= 0x00040000

File: PDSWriteProcs.h
Line: 68
PDDocCreateTextSelect() 
Product availability: All
Platform availability: All

Syntax

PDTextSelect PDDocCreateTextSelect(PDDoc doc, ASInt32 pageNum, ASFixedRect* boundingRect)

Creates a text selection that includes all words totally or partially enclosed by a rectangle. The text selection can then be set as the current selection using AVDocSetSelection().

Parameters

doc — 

The document in which a text selection is created.

 
pageNum — 

The page number on which the text selection is created.

 
boundingRect — 

A pointer to a rectangle specifying the text selection's bounding rectangle, specified in user space coordinates.

Returns

The newly created text selection.

See Also

Since

PI_PDMODEL_VERSION >= 0x00020000

File: PDProcs.h
Line: 2252
PDDocCreateThumbs() 
Product availability: Acrobat, PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

void PDDocCreateThumbs(PDDoc doc, ASInt32 firstPage, ASInt32 lastPage, PDThumbCreationServer server, void* serverClientData, ASAtom colorSpace, ASInt32 bitsPerComponent, ASInt32 hiVal, char* lookupTable, ProgressMonitor progMon, void* progMonClientData, CancelProc cancelProc, void* cancelProcClientData)

Creates thumbnail images for the specified range of pages. Thumbnail images are only created for pages that have none.

Use as large a page range as possible, because the color space object is shared by all the thumbnails created by a single invocation of this method. This means that if you call this method separately for each page, there will be duplicate color space objects.

See Section 4.5 in the PDF Reference for more details on color spaces.

See Developing Plug-ins and Applications for additional important information about creating thumbnails.

Parameters

doc — 

IN/OUT The document for which thumbnail images are created.

 
firstPage — 

IN/OUT The page number of the first page for which thumbnails are created. The first page is 0.

 
lastPage — 

IN/OUT The page number of the last page for which thumbnails are created. The constant PDLastPage (see PDExpT.h) can also be used.

 
server — 

IN/OUT A server (set of callback procedures) that provides the sampled image used as the thumbnail image. Pass NULL to use the default server.

 
serverClientData — 

IN/OUT User-supplied data to pass to the thumbnail creation server.

 
colorSpace — 

IN/OUT The color space in which the thumbnail data is represented. It must be DeviceRGB. Thumbnails may be created in either a direct or an indexed color space; however, it is strongly recommended that you use indexed color spaces over direct color spaces. Using direct color spaces with this version of Acrobat may cause bad looking thumbnails. To specify a direct color space, pass 0 for hiVal and NULL for lookupTable. To specify an indexed color space, pass the appropriate values in hiVal and lookupTable. Direct color spaces on Windows are supported in Acrobat 3.0. Prior to Acrobat 3.0 on Windows, you had to use indexed color spaces.

 
bitsPerComponent — 

IN/OUT The number of bits per color component in the thumbnail image's data. 8 is the only valid value.

 
hiVal — 

IN/OUT Used only for indexed color space; pass 0 for direct color spaces, as described in colorSpace. hiVal specifies the highest valid index in lookupTable. Because indices start at 0, the number of entries in lookupTable is hiVal + 1. hiVal must be 0 for device color spaces.

 
lookupTable — 

IN/OUT Used only for indexed color space; pass NULL for direct color spaces, as described in colorSpace. lookupTable is a table that maps data values to colors. It is used only for indexed color spaces. It must be NULL for device color spaces. For an indexed color space, the size of the lookup table must be (hiVal + 1):

  • sizeof(ASUns8)

  • 3, where the 3 arises because an RGB color space has three color components.

 
progMon — 

IN/OUT A monitor to call to display thumbnail creation progress. Use AVAppGetDocProgressMonitor() to obtain the standard progress monitor to pass for this parameter. NULL may be passed, in which case no progress monitor is used.

 
progMonClientData — 

IN/OUT A user-supplied data to pass to progMon each time it is called. It should be NULL if progMon is NULL.

 
cancelProc — 

IN/OUT A procedure to call frequently to allow the user to cancel thumbnail creation. Use AVAppGetCancelProc() to obtain the default cancel proc for this parameter. It may be NULL, in which case no cancel proc is used.

 
cancelProcClientData — 

IN/OUT A user-supplied data to pass to cancelProc each time it is called. It should be NULL if cancelProc is NULL.

See Also

Notifications

Since

PI_PDMODEL_VERSION >= 0x00020000

File: PDProcs.h
Line: 2007
PDDocCreateWordFinder() 
Product availability: All
Platform availability: All

Syntax

PDWordFinder PDDocCreateWordFinder(PDDoc doc, ASUns16* outEncInfo, char** outEncVec, char** ligatureTbl, ASInt16 algVersion, ASUns16 rdFlags, void* clientData)

Creates a word finder that is used to extract text in the host encoding from a PDF file. The word finder may either be used by PDWordFinderEnumWords() (which enumerates words one-by-one) or by PDWordFinderAcquireWordList() (which fills a table with all the words on a page).

A default ligature table is used, containing the following ligatures:

The glyph name is substituted for the ligature.

This method also works for non-Roman (CJK or Chinese-Japanese-Korean) viewers. In this case, words are extracted to the host encoding. Developers desiring Unicode output must use PDDocCreateWordFinderUCS(), which does the extraction for Roman or non-Roman text.

The type of PDWordFinder determines the encoding of the string returned by PDWordGetString(). For instance, if PDDocCreateWordFinderUCS() is used to create the word finder, PDWordGetString() returns only Unicode.

For CJK viewers, words are stored internally using CID encoding. For more information on CIDFonts and related topics, see Section 5.6 in the PDF Reference. For detailed information on CIDFonts, see Technical Note #5092, CID-Keyed Font Technology Overview, and Technical Note #5014, Adobe CMap and CIDFont Files Specification.

Parameters

doc — 

The document on which the word finder is used.

 
outEncInfo — 

An array of 256 flags, specifying the type of character at each position in the encoding. Each flag is an OR of the Character Type Codes. If outEncInfo is NULL, the platform's default encoding info is used. Use outEncInfo and outEncVec together; for every outEncInfo use a corresponding outEncVec to specify the character at that position in the encoding. Regardless of the characters specified in outEncInfo as word separators, a default set of word separators is used (see Glyph Names of Word Separators). There is no way to change the list of characters that are considered to be word separators.

 
outEncVec — 

Array of 256 NULL-terminated strings that are the glyph names in encoding order. See the discussion of character names in the PostScript Language Reference Manual. If outEncVec is NULL, the platform's default encoding vector is used. For non-UNIX Roman systems, it is WinAnsiEncoding on Windows and MacRomanEncoding on Mac OS. On UNIX (except HP-UX) Roman systems, it is ISO8859-1 (ISO Latin-1); for HP-UX, it is HP-ROMAN8. See Appendix D in the PDF Reference for descriptions of WinAnsiEncoding, MacRomanEncoding, and PDFDocEncoding. Use this parameter with outEncInfo. See outEncInfo for more information.

 
ligatureTbl — 

A NULL-terminated array of NULL-terminated strings. Each string is the glyph name of a ligature in the font. When a word contains a ligature, the glyph name of the ligature is substituted for the ligature (for example, ff is substituted for the ff ligature). This table must be terminated with NULL. If ligatureTbl is NULL, a default ligature table is used, containing the following ligatures:

  • fi

  • ff

  • fl

  • ffi

  • ffl

  • ch

  • cl

  • ct

  • ll

  • ss

  • fs

  • st

  • oe

  • OE

 
algVersion — 

The version of the word-finding algorithm to use (see PDExpT.h), as follows (pass 0 if your client does not care):

Version

Description

WF_LATEST_VERSION

To obtain the latest available version.

WF_VERSION_2

Version used for Acrobat 3.x, 4.x.

WF_VERSION_3

Available in Acrobat 5.0 without accessibility enabled. Includes some improved word-piecing algorithms.

WF_VERSION_4

For Acrobat 5.0 with accessibility enabled. Includes advanced word-ordering algorithms in addition to improved word-piecing algorithms.

 
rdFlags — 

Word-finding options that determine the tables filled when using PDWordFinderAcquireWordList(). It must be an OR of one or more of the WordFinder Sort Order Flags. In Acrobat 5.0 this parameter is ignored and you should pass in NULL.

 
clientData — 

A pointer to user-supplied data to pass to the newly created word finder.

Returns

The newly created word finder.

See Also

Since

PI_PDMODEL_VERSION >= 0x00020000

File: PDProcs.h
Line: 2175
PDDocCreateWordFinderEx() 
Product availability: All
Platform availability: All

Syntax

PDWordFinder PDDocCreateWordFinderEx(PDDoc doc, ASInt16 algVersion, ASBool outUnicode, PDWordFinderConfig wbConfig)

This is a version 6.0 replacement for PDDocCreateWordFinder() and PDDocCreateWordFinderUCS() that adds configurable word-breaking behavior. This method creates a word finder that is used to extract text from a PDF file, according to the given configuration. The word finder can be used to enumerate words one-by-one or to fill a table with all the words on a page. You can choose to find only words that are visible in a given context.

You can use version 6.0 methods such as PDWordGetCharOffsetEx() to extract character information from words if you create the word finder with WF_VERSION_3 or later.

Parameters

doc — 

The document on which the word finder is used.

 
algVersion — 

The version of the word-finding algorithm to use (see PDExpT.h), as follows (pass 0 if your client does not care):

Annotation

Use

WF_LATEST_VERSION

To obtain latest available version.

WF_VERSION_2

Version used for Acrobat 3.x, 4.x.

WF_VERSION_3

Available in Acrobat 5.0 and 6.0 without Tagged PDF support.

WF_VERSION_4

For Acrobat 5.0 and 6.0 with Tagged PDF support.

 
outUnicode — 

Whether to return Unicode. When true, the word finder encodes the extracted text in Unicode format. Otherwise, the word finder extracts the text in the host encoding.

 
wbConfig — 

A pointer to a configuration record for the new word finder that customizes the way the extraction is performed. The configuration is only used if the algorithm version is WF_VERSION_3 or higher. When it is NULL, the default configuration is used.

Returns

The newly created word finder object.

See Also

Since

PI_PDMODEL_VERSION >= 0x00060000

File: PDProcs.h
Line: 8286
PDDocCreateWordFinderUCS() 
Product availability: All
Platform availability: All

Syntax

PDWordFinder PDDocCreateWordFinderUCS(PDDoc doc, ASInt16 algVersion, ASUns16 rdFlags, void* clientData)

Creates a word finder that is used to extract text in Unicode format from a PDF file. The word finder may either be used by PDWordFinderEnumWords() (which enumerates words one-by-one) or by PDWordFinderAcquireWordList() (which fills a table with all the words on a page).

PDDocCreateWordFinder() also works for non-Roman character set viewers. For PDDocCreateWordFinder(), words are extracted to the host encoding. Users desiring Unicode output should use PDDocCreateWordFinderUCS().

The type of PDWordFinder determines the encoding of the string returned by PDWordGetString(). If PDDocCreateWordFinderUCS() is used to create the word finder, PDWordGetString() returns only Unicode. Note that there is no way to detect Unicode strings returned by PDWordGetString(), since there is no UCS header (FEFF) added to each string returned.

In CJK viewers, words are stored internally using CID encoding. For more information on CIDFonts and related topics, see Section 5.6 in the PDF Reference. For detailed information on CIDFonts, see Technical Note #5092, CID-Keyed Font Technology Overview, and Technical Note #5014, Adobe CMap and CIDFont Files Specification.

Parameters

doc — 

The document on which the word finder is used.

 
algVersion — 

The version of the word-finding algorithm to use. If it is WF_LATEST_VERSION (see PDExpT.h), the most recent version is used. Set to 0 to ignore the version.

 
rdFlags — 

Word-finding options that determine the tables filled when using PDWordFinderAcquireWordList(). It must be an OR of one or more of the WordFinder Sort Order Flags.

 
clientData — 

A pointer to user-supplied data to pass to the newly created word finder.

Returns

The newly created word finder.

See Also

Since

PI_PDMODEL_VERSION >= 0x00020003

File: PDProcs.h
Line: 6470
PDDocDeleteCollection() 
Product availability: All
Platform availability: All

Syntax

void PDDocDeleteCollection(PDDoc pdDoc)

Removes a collection dictionary from a document.

Parameters

pdDoc — 

The document whose collection dictionary is to be removed.


File: PDProcs.h
Line: 12201
PDDocDeletePages() 
Product availability: Acrobat, PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

void PDDocDeletePages(PDDoc doc, ASInt32 firstPage, ASInt32 lastPage, ProgressMonitor progMon, void* progMonClientData)

Deletes the specified pages.

Parameters

doc — 

The document from which pages are deleted.

 
firstPage — 

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

 
lastPage — 

The page number of the last page to delete.

 
progMon — 

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

 
progMonClientData — 

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

See Also

Notifications

Since

PI_PDMODEL_VERSION >= 0x00020000

File: PDProcs.h
Line: 1613
PDDocDeleteThumbs() 
Product availability: Acrobat, PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

void PDDocDeleteThumbs(PDDoc doc, ASInt32 firstPage, ASInt32 lastPage, ProgressMonitor progMon, void* progMonClientData)

Deletes thumbnail images for a range of pages in a document.

Parameters

doc — 

IN/OUT The document from which thumbnail images are deleted.

 
firstPage — 

IN/OUT The page number of the first page in doc whose thumbnail image is deleted. The first page is 0.

 
lastPage — 

IN/OUT The page number of the last page in doc whose thumbnail image is deleted.

 
progMon — 

IN/OUT A monitor to call to display thumbnail deletion progress. Use AVAppGetDocProgressMonitor() to obtain the standard progress monitor to pass for this parameter. NULL may be passed, in which case no progress monitor is used.

 
progMonClientData — 

IN/OUT A pointer to user-supplied data to pass to progMon. It should be NULL if progMon is NULL.

See Also

Notifications

Since

PI_PDMODEL_VERSION >= 0x00020000

File: PDProcs.h
Line: 2028
PDDocDidAddThread() 
Product availability: All
Platform availability: All

Syntax

void PDDocDidAddThread(PDDoc doc, PDThread thread, void* clientData)

A thread has been added to a document.

Parameters

doc — 

The document to which a thread was added.

 
thread — 

The thread that was added.

 
clientData — 

A pointer to a block of user-supplied data that was passed when the client registered for this notification using AVAppRegisterNotification() .

See Also

Notifications


File: PIPokes.h
Line: 772
PDDocDidChangePageAreas() 
Product availability: All
Platform availability: All

Syntax

void PDDocDidChangePageAreas(PDDoc pdDoc, ASInt32 areaMask, ASInt32 firstPage, ASInt32 lastPage, void* clientData)

Page areas changed.

Parameters

pdDoc — 

The document in which the page areas changed.

 
areaMask — 

The area mask.

 
firstPage — 

The first page.

 
lastPage — 

The last page.

 
clientData — 

A pointer to a block of user-supplied data that was passed when the client registered for this notification using AVAppRegisterNotification() .

See Also

Numerous

Notifications


File: PIPokes.h
Line: 2034
PDDocDidChangePages() 
Product availability: All
Platform availability: All

Syntax

void PDDocDidChangePages(PDDoc doc, PDOperation op, ASInt32 fromPage, ASInt32 toPage, ASInt32 error, void* clientData)

Pages have been inserted, deleted, moved, or modified.

Parameters

doc — 

The document in which pages have been changed.

 
op — 

The change that was made. op will be one of the PDOperation values.

 
fromPage — 

The page number of the first page that was modified. For page insertion, this is the number of the page before the first inserted page. For page deletion, this is the page number of the first deleted page.

 
toPage — 

The page number of the last page that was modified. If broadcast by PDDocCreatePage() , this is the number of the newly created page. When broadcast by PDDocInsertPages() , toPage is the number of pages in the document post-insertion; that is, it points to a page not in the document. If broadcast by PDDocDeletePages() , toPage is the number of pages in the PDDoc prior to deletion, pointing to a page not in the document.

 
error — 

The error code. error is set to 0 if no errors occurred while changing the pages. If an error occurred, error contains the error code.

 
clientData — 

A pointer to a block of user-supplied data that was passed when the client registered for this notification using AVAppRegisterNotification() .

See Also

Notifications


File: PIPokes.h
Line: 609
PDDocDidChangeThumbs() 
Product availability: All
Platform availability: All

Syntax

void PDDocDidChangeThumbs(PDDoc doc, void* clientData)

Thumbnail images have been added or removed. In addition to the expected ways in which this can occur, it can also occur if pages are inserted into a file.

Parameters

doc — 

The document in which thumbnail images have been changed.

 
clientData — 

A pointer to a block of user-supplied data that was passed when the client registered for this notification using AVAppRegisterNotification() .

See Also

Notifications


File: PIPokes.h
Line: 633
PDDocDidClose() 
Product availability: All
Platform availability: All

Syntax

void PDDocDidClose(PDDoc doc, void* clientData)

A PDDoc closed. A PDDoc is closed only if its reference count is zero.

Neither this notification, PDDocWillClose() , AVDocWillClose() , nor AVDocDidClose() are broadcast if the user selects Cancel when prompted to save a modified document as it is closed.

Parameters

doc — 

The document that closed.

 
clientData — 

A pointer to a block of user-supplied data that was passed in by the calling application when this notification was registered for using AVAppRegisterNotification() .

See Also

Notifications


File: PIPokes.h
Line: 1717
PDDocDidDeletePages() 
Product availability: All
Platform availability: All

Syntax

void PDDocDidDeletePages(PDDoc doc, ASInt32 fromPage, ASInt32 toPage, ASInt32 error, void* clientData)

One or more pages were deleted.

Parameters

doc — 

The document from which pages were deleted.

 
fromPage — 

The page number of the first page that was deleted.

 
toPage — 

The page number of the last page that was deleted.

 
error — 

The error code. error is set to 0 if no errors occurred while deleting the pages. If an error occurred, error contains the error code.

 
clientData — 

A pointer to a block of user-supplied data that was passed when the client registered for this notification using AVAppRegisterNotification() .

See Also

Notifications


File: PIPokes.h
Line: 548
PDDocDidExportAnnots() 
Product availability: All
Platform availability: All

Syntax

void PDDocDidExportAnnots(PDDoc doc, void* clientData)

The annotations of a document were exported.

Parameters

doc — 

IN/OUT The document whose annotations were exported.

 
clientData — 

IN/OUT A pointer to a block of user-supplied data that was passed in by the calling application when this notification was registered for using AVAppRegisterNotification() .

See Also

Notifications


File: PIPokes.h
Line: 1427
PDDocDidImportAnnots() 
Product availability: All
Platform availability: All

Syntax

void PDDocDidImportAnnots(PDDoc doc, void* clientData)

The annotations from one document were imported into another document.

Parameters

doc — 

IN/OUT The document into which annotations were imported.

 
clientData — 

IN/OUT A pointer to a block of user-supplied data that was passed in by the calling application when this notification was registered for using AVAppRegisterNotification() .

See Also

Notifications


File: PIPokes.h
Line: 1654
PDDocDidInsertPages() 
Product availability: All
Platform availability: All

Syntax

void PDDocDidInsertPages(PDDoc doc, ASInt32 insertAfterThisPage, PDDoc srcDoc, ASInt32 srcFromPage, ASInt32 srcToPage, ASInt32 error, void* clientData)

One or more pages have been inserted.

Parameters

doc — 

The document into which pages were inserted.

 
insertAfterThisPage — 

The page number (in doc) after which pages were inserted.

 
srcDoc — 

The document that provided the pages that were inserted. This is NULL when a new blank page is created and inserted into a document. This is NULL for a notification broadcast by PDDocCreatePage() .

 
srcFromPage — 

The page number (in srcDoc) of the first page that was inserted. It is not valid when a new blank page is created and inserted into a document. This is NULL for a notification broadcast by PDDocCreatePage() .

 
srcToPage — 

The page number (in srcDoc) of the last page that was inserted. It is not valid when a new blank page is created and inserted into a document. This is NULL for a notification broadcast by PDDocCreatePage() .

 
error — 

The error code. error is set to 0 if no errors occurred while inserting the pages. If an error occurred, error contains the error code.

 
clientData — 

A pointer to a block of user-supplied data that was passed when the client registered for this notification using AVAppRegisterNotification() .

See Also

Notifications


File: PIPokes.h
Line: 421
PDDocDidInsertPagesEx() 
Product availability: All
Platform availability: All

Syntax

void PDDocDidInsertPagesEx(PDDocInsertPagesParams params, void* clientData)

Pages were inserted into a document. This notification occurs after the PDDocDidInsertPages() notification.

Parameters

params — 

IN/OUT A structure describing how pages were inserted.

 
clientData — 

IN/OUT A pointer to a block of user-supplied data that was passed in by the calling application when this notification was registered for using AVAppRegisterNotification() .

See Also

Notifications


File: PIPokes.h
Line: 1737
PDDocDidMovePages() 
Product availability: All
Platform availability: All

Syntax

void PDDocDidMovePages(PDDoc doc, ASInt32 moveAfterThisPage, ASInt32 fromPage, ASInt32 toPage, ASInt32 error, void* clientData)

One or more pages were moved.

Parameters

doc — 

The document in which pages were moved.

 
moveAfterThisPage — 

The page number after which the moved pages were placed.

 
fromPage — 

The page number of the first page that was moved.

 
toPage — 

The page number of the last page that was moved.

 
error — 

The error code. error is set to 0 if no errors occurred while moving pages. If an error occurred, error contains the error code.

 
clientData — 

A pointer to a block of user-supplied data that was passed when the client registered for this notification using AVAppRegisterNotification() .

See Also

Notifications


File: PIPokes.h
Line: 511
PDDocDidOpen() 
Product availability: All
Platform availability: All

Syntax

void PDDocDidOpen(PDDoc doc, void* clientData)

A document was opened.

Parameters

doc — 

The document.

 
clientData — 

A pointer to a block of user-supplied data that was passed when the client registered for this notification using AVAppRegisterNotification() .

Notifications


File: PIPokes.h
Line: 1974
PDDocDidPrintPage() 
Product availability: All
Platform availability: All

Syntax

void PDDocDidPrintPage(PDDoc doc, ASInt32 page, ASStm stm, ASInt32 error, void* clientData)

This notification is broadcast once per page that is printed, after all marks have been made on the page. When printing to a PostScript printer, printing commands can also be sent that will be placed on the page after all other marks.

Parameters

doc — 

The document from which a page was printed.

 
page — 

The page number of the page that was printed.

 
stm — 

The PostScript print stream used when printing to a PostScript printer, and NULL when printing to a non-PostScript printer. When printing to a PostScript printer, clients can write printing commands into stm (using ASStmWrite() ) to add marks to the printed page after all other marks have been made. See PDDocWillPrintPage() for a description of the sequence of operations when printing a page to a PostScript printer.

 
error — 

The error code. error is set to 0 if no errors occurred while printing the page. If an error occurred, error contains the error code.

 
clientData — 

A pointer to a block of user-supplied data that was passed when the client registered for this notification using AVAppRegisterNotification() .

See Also

Notifications


File: PIPokes.h
Line: 759
PDDocDidPrintPages() 
Product availability: All
Platform availability: All

Syntax

void PDDocDidPrintPages(PDDoc doc, ASInt32 fromPage, ASInt32 toPage, ASInt32 error, void* clientData)

This notification is broadcast after printing ends.

Parameters

doc — 

The document from which pages were printed.

 
fromPage — 

The page number of the first page that was printed.

 
toPage — 

The page number of the last page that was printed.

 
error — 

The error code. error is set to 0 if no errors occurred while printing the pages. If an error occurred, error contains the error code.

 
clientData — 

A pointer to a block of user-supplied data that was passed when the client registered for this notification using AVAppRegisterNotification() .

See Also

Notifications


File: PIPokes.h
Line: 688
PDDocDidPrintTiledPage() 
Product availability: All
Platform availability: All

Syntax

void PDDocDidPrintTiledPage(PDDoc doc, ASInt32 page, ASStm stm, ASInt32 error, ASInt32 whichTile, ASInt32 numTiles, void* clientData)

This notification is obsolete in Acrobat 7.0 and later.

Clients who register for PDDocDidPrintTiledPage() will be called after the tile marks (if any) have been emitted for this tiled page. Tiled pages can be requested by the user from the Advanced print dialog box; clients are made aware of the selection via the tiled page notifications.

Parameters

doc — 

The document containing the tiled page.

 
page — 

The page being printed.

 
stm — 

The PostScript print stream used when printing to a PostScript printer, and NULL when printing to a non-PostScript printer. When printing to a PostScript printer, clients can write printing commands into stm (using ASStmWrite() ) to add marks to pages before any other marks have been made.

 
error — 

The error code. error is set to 0 if no errors occurred while printing the pages. If an error occurred, error contains the error code.

 
whichTile — 

The sheet to be printed.

 
numTiles — 

The number of sheets to be printed.

 
clientData — 

A pointer to a block of user-supplied data that was passed when the client registered for this notification using AVAppRegisterNotification() .

See Also

Notifications


File: PIPokes.h
Line: 1916
PDDocDidRemoveThread() 
Product availability: All
Platform availability: All

Syntax

void PDDocDidRemoveThread(PDDoc doc, ASInt32 index, void* clientData)

A thread was removed from a document.

Parameters

doc — 

The document from which a thread was removed.

 
index — 

The index of the thread that was removed. Because the thread has already been removed, it is not possible to access it using index.

 
clientData — 

A pointer to a block of user-supplied data that was passed when the client registered for this notification using AVAppRegisterNotification() .

See Also

Notifications


File: PIPokes.h
Line: 787
PDDocDidReplacePages() 
Product availability: All
Platform availability: All

Syntax

void PDDocDidReplacePages(PDDoc doc, ASInt32 fromPage, ASInt32 toPage, PDDoc srcDoc, ASInt32 srcFromPage, ASInt32 srcToPage, ASInt32 error, void* clientData)

One or more pages have been replaced.

Parameters

doc — 

The document in which pages have been replaced.

 
fromPage — 

The page number (in doc) of the first page that was replaced.

 
toPage — 

The page number (in doc) of the last page that was replaced.

 
srcDoc — 

The document that provided the replacement pages.

 
srcFromPage — 

The page number (in srcDoc) of the first replacement page.

 
srcToPage — 

The page number (in srcDoc) of the last replacement page.

 
error — 

The error code. error is set to 0 if no errors occurred while replacing pages. If an error occurred, error contains the error code.

 
clientData — 

A pointer to a block of user-supplied data that was passed when the client registered for this notification using AVAppRegisterNotification() .

See Also

Notifications


File: PIPokes.h
Line: 470
PDDocDidSave() 
Product availability: All
Platform availability: All

Syntax

void PDDocDidSave(PDDoc doc, ASInt32 err, void* clientData)

A document has been saved.

The PDDocDidSave() notification takes place just after the save operation finishes. At the time of a DidSave() notification, a client or application can reacquire resources from the PDDoc if needed. It should examine the error code err associated with the save. If the save was not successful, the error code is non-zero. In the case of a unsuccessful save, a client or application should not attempt to do anything further with this PDDoc.

See PDDocWillSaveEx() for important information on releasing objects derived from the PDDoc before it is saved.

Parameters

doc — 

The document that was saved.

 
err — 

The error code. err is set to 0 if no errors occurred while saving the file. If an error occurred, err contains the error code.

 
clientData — 

A pointer to a block of user-supplied data that was passed when the client registered for this notification using AVAppRegisterNotification() .

See Also

Notifications


File: PIPokes.h
Line: 839
PDDocEnumFonts() 
Product availability: All
Platform availability: All

Syntax

void PDDocEnumFonts(PDDoc doc, ASInt32 firstPage, ASInt32 lastPage, PDFontEnumProc eproc, void* clientData, ProgressMonitor progMon, void* progMonClientData)

Enumerates all the fonts in the specified page range. This may take a considerable amount of time for a large page range.

Parameters

doc — 

The document whose fonts are enumerated.

 
firstPage — 

The page number of the first page for which fonts are enumerated. The first page is 0.

 
lastPage — 

The page number of the last page for which fonts are enumerated.

 
eproc — 

A user-supplied callback to call for each font. Enumeration terminates if eproc returns false.

 
clientData — 

A pointer to user-supplied data to pass to eproc each time it is called.

 
progMon — 

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

 
progMonClientData — 

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

See Also

Since

PI_PDMODEL_VERSION >= 0x00020000

File: PDProcs.h
Line: 1906
PDDocEnumLoadedFonts() 
Product availability: All
Platform availability: All

Syntax

void PDDocEnumLoadedFonts(PDDoc doc, PDFontEnumProc proc, void* clientData)

Enumerates all the fonts that have been encountered so far. A font is loaded when a page that uses it is processed. This typically happens when a page is drawn or its thumbnail image is created.

Parameters

doc — 

IN/OUT The document whose loaded fonts are enumerated.

 
proc — 

IN/OUT A user-supplied callback to call for each loaded font. Enumeration terminates if proc returns false.

 
clientData — 

IN/OUT A pointer to user-supplied data to pass to proc each time it is called.

See Also

Since

PI_PDMODEL_VERSION >= 0x00020000

File: PDProcs.h
Line: 1924
PDDocEnumOCConfigs() 
Product availability: All
Platform availability: All

Syntax

void PDDocEnumOCConfigs(PDDoc pdDoc, PDOCConfigEnumProc enumProc, void* clientData)

Enumerates the optional-content configurations for the document, calling the supplied procedure for each one. These include the configuration for the D configuration dictionary and those for all entries in the Configs array dictionary.

Parameters

pdDoc — 

The document whose configurations are enumerated.

 
enumProc — 

A user-supplied callback to call for each configuration. Enumeration terminates if enumProc returns false.

 
clientData — 

A pointer to user-supplied data to pass to proc each time it is called.

See Also

Since

PI_PDMODEL_VERSION >= 0x00060000

File: PDProcs.h
Line: 10169
PDDocEnumOCGs() 
Product availability: All
Platform availability: All

Syntax

void PDDocEnumOCGs(PDDoc pdDoc, PDOCGEnumProc enumProc, void* clientData)

Enumerates the optional-content groups for the document, calling the supplied procedure for each one. Enumeration continues until all groups have been enumerated, or until enumProc returns false. Each group is reported once, even if it is referenced multiple times in a page, or on multiple pages.

Parameters

pdDoc — 

The document whose groups are enumerated.

 
enumProc — 

A user-supplied callback to call for each group. Enumeration terminates if enumProc returns false.

 
clientData — 

A pointer to user-supplied data to pass to enumProc each time it is called.

See Also

Since

PI_PDMODEL_VERSION >= 0x00060000

File: PDProcs.h
Line: 9066
PDDocEnumPDSElementsWithUserProperties() 
Product availability: All
Platform availability: All

Syntax

ASBool PDDocEnumPDSElementsWithUserProperties(PDDoc doc, EnumElementsWithUserPropertiesProc proc, void* clientData)

Enumerates the elements in the document's structure tree that have UserProperties attributes or classes, calling the supplied enumeration procedure for each such element found. The procedure returns true to continue enumeration, or false to halt enumeration.

Parameters

doc — 

The PDDoc whose structure elements are to be enumerated.

 
proc — 

The procedure to call for each PDSElement found to have UserProperties.

 
clientData — 

Client-supplied data to be passed to the client callback.

Returns

true if the enumeration completes, false if the enumeration callback returns false.

Since

PI_PDS_READ_VERSION >= 0x00070000

File: PDSReadProcs.h
Line: 898
PDDocEnumResources() 
Product availability: All
Platform availability: All

Syntax

void PDDocEnumResources(PDDoc pdDoc, ASInt32 startPage, ASInt32 endPage, ASAtom resourceType, CosObjEnumProc enumProc, void* clientData)

Enumerates the specified type of page resources, for a specified range of pages.

This method enumerates resources in each page's Resources dictionary (ColorSpace resources, Fonts, ExtGState objects, or others). In addition, it looks inside in-line images and page contents to enumerate ColorSpace resources that are not in the Resources dictionary, such as DeviceGray, DeviceRGB, and DeviceCMYK.

Parameters

pdDoc — 

IN/OUT The document whose resources are enumerated.

 
startPage — 

IN/OUT The first page whose resources are enumerated. The first page in a document is 0.

 
endPage — 

IN/OUT The last page whose resources are enumerated.

 
resourceType — 

IN/OUT Resource type to enumerate. It must be one of the valid PDF resource types, such as Font, ColorSpace, XObject, Pattern, and so on, described in Section 3.7 in the PDF Reference. Pass ASAtomNull to enumerate all resource types.

 
enumProc — 

IN/OUT A user-supplied callback to call once for each resource of the specified type. The resource is presented as a CosObj, and it is the first parameter of enumProc (the second parameter is unused).

 
clientData — 

IN/OUT User-supplied data to pass to enumProc each time it is called.

See Also

Exceptions

genErrBadParm
pdErrOpNotPermitted

Since

PI_PDMODEL_VERSION >= 0x00040000

File: PDProcs.h
Line: 6622
PDDocExportNotes() 
Product availability: Acrobat, PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

CosDoc PDDocExportNotes(PDDoc doc, ASFileSys unused1, ASPathName unused2, void* unused3, void* unused4, PDDocWillExportAnnotCallback exportFilter, ASInt32* numNotesP)

Creates a document containing empty pages plus text annotations (notes) from sourceDoc. It does not create a new document if sourceDoc contains no notes.

Parameters

doc — 

The document from which notes are exported.

 
unused1 — 

Currently unused.

 
unused2 — 

Currently unused.

 
unused3 — 

Currently unused.

 
unused4 — 

Currently unused.

 
exportFilter — 

A user-supplied routine that selects which notes to export.

 
numNotesP — 

If non-NULL, the number of notes exported.

Returns

The CosDoc of the document created to hold the exported notes.

See Also

Notifications

Since

PI_PDMODEL_VERSION >= 0x00040000

File: PDProcs.h
Line: 6693
PDDocExportSomeNotes() 
Product availability: Acrobat, PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

CosDoc PDDocExportSomeNotes(PDDoc doc, ASFileSys unused1, ASPathName unused2, void* unused3, void* unused4, PDDocWillExportAnnotCallback exportFilter, PDAnnotArray pdanArray, ASInt32* numNotesP)

Like PDDocExportNotes(), but the caller provides the list of annotations to export. This is useful in scenarios when it may be inappropriate to use PDDocExportNotes() and look for annotations on every page. This is an especially important consideration when in a browser.

Parameters

doc — 

The document from which notes are exported.

 
unused1 — 

Currently unused.

 
unused2 — 

Currently unused.

 
unused3 — 

Currently unused.

 
unused4 — 

Currently unused.

 
exportFilter — 

A user-supplied routine that selects which notes to export.

 
pdanArray — 

An array of PDAnnotArrayRec objects; the number of items in the arrray is the number of pages in doc.

 
numNotesP — 

(Filled by the method) If non-NULL, the number of notes exported.

Returns

The CosDoc of the document created to hold the exported notes.

See Also

Notifications

Since

PI_PDMODEL_VERSION >= 0x00050000

File: PDProcs.h
Line: 8019
PDDocFindPageNumForLabel() 
Product availability: All
Platform availability: All

Syntax

ASInt32 PDDocFindPageNumForLabel(PDDoc pdDoc, const char* labelStr, ASInt32 labelLen)

Superseded by PDDocFindPageNumForLabelEx() in Acrobat 6.0.

Finds the first page in the document with a specified label.

Parameters

pdDoc — 

The document to search for the page named in labelStr.

 
labelStr — 

The label of the page to find.

 
labelLen — 

The length of labelStr.

Returns

The page number of the first page with the specified label, or -1 if no such page exists.

See Also

Since

PI_PDMODEL_VERSION >= 0x00040000

File: PDProcs.h
Line: 7243
PDDocFindPageNumForLabelEx() 
Product availability: All
Platform availability: All

Syntax

ASInt32 PDDocFindPageNumForLabelEx(PDDoc pdDoc, ASConstText labelText)

Supersedes PDDocFindPageNumForLabel in Acrobat 6.0.

Finds the first page in the document with a specified label.

Parameters

pdDoc — 

The document to search for the page named in labelStr.

 
labelText — 

The label of the page to find.

Returns

The page number of the first page with the specified label, or -1 if no such page exists.

See Also

Since

PI_PDMODEL_VERSION >= 0x00060000

File: PDProcs.h
Line: 10965
PDDocFlattenOC() 
Product availability: All
Platform availability: All

Syntax

ASBool PDDocFlattenOC(PDDoc pdDoc, PDOCContext context)

Replaces the contents of every page in the document with a version that has no optional content, containing only what was visible on the page when the call was made, and removes all other optional-content information.

Parameters

pdDoc — 

The document to be modified.

 
context — 

The optional-content context in which content is checked for visibility.

Returns

true if the operation is successful, false otherwise.

See Also


File: PDProcs.h
Line: 10355
PDDocFromCosDoc() 
Product availability: All
Platform availability: All

Syntax

PDDoc PDDocFromCosDoc(CosDoc cosDoc)

Gets the PDDoc associated with a CosDoc.

Parameters

cosDoc — 

The Cos-level document object for which a PDDoc is obtained. This object represents the PDF.

Returns

The PDDoc associated with cosDoc.

See Also

Exceptions

genErrBadParm is raised if the CosDoc is not valid.
pdErrNoPDDocForCosDoc is raised if there is no PDDoc associated with this CosDoc.

Since

PI_PDMODEL_VERSION >= 0x00040000

File: PDProcs.h
Line: 6578
PDDocGetBookmarkRoot() 
Product availability: All
Platform availability: All

Syntax

PDBookmark PDDocGetBookmarkRoot(PDDoc pdDoc)

Gets the root of the document's bookmark tree. The return value is valid even if the document's bookmark tree is empty (meaning that there is no Outlines key in the underlying PDF file).

Parameters

pdDoc — 

IN/OUT Document whose root bookmark is obtained.

Returns

The document's root bookmark.

Since

PI_PDMODEL_VERSION >= 0x00020000

File: PDProcs.h
Line: 1532
PDDocGetCosDoc() 
Product availability: All
Platform availability: All

Syntax

CosDoc PDDocGetCosDoc(PDDoc doc)

Gets a document's Cos-level document object.

Parameters

doc — 

The document whose CosDoc is obtained.

Returns

The document's CosDoc.

See Also

Since

PI_PDMODEL_VERSION >= 0x00020000

File: PDProcs.h
Line: 1473
PDDocGetCryptHandler() 
Product availability: All
Platform availability: All

Syntax

ASAtom PDDocGetCryptHandler(PDDoc doc)

Gets the specified document's current security handler (that is, the security handler that was used to open the document).

Parameters

doc — 

The document whose new security handler is obtained.

Returns

The ASAtom corresponding to the name of the document's security handler. It returns ASAtomNull if the document does not have a current security handler.

See Also

Since

PI_PDMODEL_VERSION >= 0x00070000

File: PDProcs.h
Line: 11227
PDDocGetCryptHandlerClientData() 
Product availability: All
Platform availability: All

Syntax

void* PDDocGetCryptHandlerClientData(PDDoc pdDoc)

Gets the client data for the encryption handler associated with the PDDoc. This is the client data provided as a parameter in PDRegisterCryptHandlerEx().

Parameters

pdDoc — 

The document whose encryption handler client data is obtained.

Returns

Client data for the encryption handler associated with the PDDoc. It returns NULL if there is no encryption handler or no client data was provided.

See Also

Since

PI_PDMODEL_VERSION >= 0x00020002

File: PDProcs.h
Line: 6046
PDDocGetCryptRevision() 
Product availability: All
Platform availability: All

Syntax

ASInt32 PDDocGetCryptRevision(PDDoc pdDoc)

Sets the cryptRevision param based on the Security handler of the document. This is either retrieved directly from the Security handler or read from the encrypt dict.

Parameters

pdDoc — 

The document.

Returns

The Crypt Revision retreived from the Security handler or encrypt dict or 0 if not found or not encrypted

Since

PI_PDMODEL_VERSION >= 0x000A0000

File: PDProcs.h
Line: 12598
PDDocGetCryptVersion() 
Product availability: All
Platform availability: All

Syntax

ASInt32 PDDocGetCryptVersion(PDDoc pdDoc)

Sets the cryptVersion param based on the Security handler of the document. This is either retrieved directly from the Security handler or read from the encrypt dict.

Parameters

pdDoc — 

The document.

Returns

The Crypt Version retreived from the Security handler or encrypt dict or 0 if not found or not encrypted

Since

PI_PDMODEL_VERSION >= 0x000A0000

File: PDProcs.h
Line: 12590
PDDocGetFile() 
Product availability: All
Platform availability: All

Syntax

ASFile PDDocGetFile(PDDoc doc)

Gets the file object for a document.

Parameters

doc — 

The document whose ASFile is obtained.

Returns

The document's ASFile.

Since

PI_PDMODEL_VERSION >= 0x00020000

File: PDProcs.h
Line: 1481
PDDocGetFlags() 
Product availability: All
Platform availability: All

Syntax

ASInt32 PDDocGetFlags(PDDoc doc)

Gets information about the document's file and its state.

Parameters

doc — 

IN/OUT The document whose flags are obtained.

Returns

Flags field, containing an OR of the PDDocFlags values.

See Also

Since

PI_PDMODEL_VERSION >= 0x00020000

File: PDProcs.h
Line: 1424
PDDocGetFullScreen() 
Product availability: All
Platform availability: All

Syntax

ASBool PDDocGetFullScreen(PDDoc pdDoc)

Tests whether the document will open in full-screen mode. This provides an alternative to calling PDDocGetPageMode() to test for PDFullScreen.

Parameters

pdDoc — 

The document to test.

Returns

true if the PDDoc is in full-screen mode, false otherwise.

See Also

Since

PI_PDMODEL_VERSION >= 0x00020002

File: PDProcs.h
Line: 6058
PDDocGetID() 
Product availability: All
Platform availability: All

Syntax

ASInt32 PDDocGetID(PDDoc doc, ASInt32 nElemNum, ASUns8* buffer, ASInt32 bufferSize)

Gets an element of a document's file identifier. See Section 10.3 in the PDF Reference for a description of file IDs.

Parameters

doc — 

The document whose file ID is obtained.

 
nElemNum — 

The element number to get from the document's file ID. It must be one of the following:

Value

Description

0

The permanent ID.

1

The permanent ID.

 
buffer — 

(Filled by the method) If buffer is non-NULL, then up to bufferSize bytes of the ID will be written to the buffer.

 
bufferSize — 

The length of buffer in bytes.

Returns

The number of bytes in the ID element.

Since

PI_PDMODEL_VERSION >= 0x00020000

File: PDProcs.h
Line: 1504
PDDocGetInfo() 
Product availability: All
Platform availability: All

Syntax

ASInt32 PDDocGetInfo(PDDoc doc, const char* infoKey, char* buffer, ASInt32 bufSize)

Gets the value of a key in a document's Info dictionary, or the value of this same key in the XMP metadata, whichever is later. However, it is preferable to use PDDocGetXAPMetadataProperty(), because it also allows accessing XMP properties that are not duplicated in the Info dictionary.

See Section 10.2.1 in the PDF Reference for information about Info dictionaries. All values in the Info dictionary should be strings; other data types such as numbers and booleans should not be used as values in the Info dictionary.

Users may define their own Info dictionary entries. In this case, it is strongly recommended that the key have the developer's prefix assigned by the Adobe Solutions Network.

Parameters

doc — 

The document whose Info dictionary key is obtained.

 
infoKey — 

The name of the Info dictionary key whose value is obtained.

 
buffer — 

(Filled by the method) The buffer containing the value associated with infoKey. If buffer is NULL, the method will just return the number of bytes required.

 
bufSize — 

The maximum number of bytes that can be written into buffer.

Returns

If buffer is NULL, it returns the number of bytes in the specified key's value. If buffer is not NULL, it returns the number of bytes copied into buffer, excluding the terminating NULL. You must pass at least the length + 1 as the buffer size since the routine adds a '\0' terminator to the data, even though the data is not a C string (it can contain embedded '\0' values).

See Also

Since

PI_PDMODEL_VERSION >= 0x00020000

File: PDProcs.h
Line: 2296
PDDocGetInfoASText() 
Product availability: All
Platform availability: All

Syntax

void PDDocGetInfoASText(PDDoc doc, const ASText key, ASText value)

Gets the value of a key in a document's Info dictionary, or the value of this same key in the XMP metadata, whichever is latest as an ASText object.

Parameters

doc — 

The document whose Info dictionary key is obtained.

 
key — 

The name of the Info dictionary key whose value is obtained.

 
value — 

(Filled by the method) The text object containing the value associated with key. The client must pass a valid ASText object value. The routine does not allocate it.

See Also

Since

PI_PDMODEL_VERSION >= 0x00080000

File: PDProcs.h
Line: 11381
PDDocGetLabelForPageNum() 
Product availability: All
Platform availability: All

Syntax

ASInt32 PDDocGetLabelForPageNum(PDDoc pdDoc, ASInt32 pageNum, char* buffer, ASInt32 bufferLen)

Superseded by PDDocGetLabelForPageNumEx() in Acrobat 6.0.

Retrieves the label string associated with the given page number. The page number is returned in host encoding and is truncated to the length of the buffer.

Parameters

pdDoc — 

The document containing the page for which a label is requested.

 
pageNum — 

The number of the page whose label is requested.

 
buffer — 

If a label exists for pageNum, it will be placed in this buffer.

 
bufferLen — 

The length of the label (NULL-terminated).

Returns

The length of the resulting label. If no such page number exists, the resulting string will be the ASCII representation of pageNum + 1.

See Also

Since

PI_PDMODEL_VERSION >= 0x00040000

File: PDProcs.h
Line: 7220
PDDocGetLabelForPageNumEx() 
Product availability: All
Platform availability: All

Syntax

void PDDocGetLabelForPageNumEx(PDDoc pdDoc, ASInt32 pageNum, ASText text)

Supersedes PDDocGetLabelForPageNum() in Acrobat 6.0.

Retrieves the label string associated with the given page number. The page number is returned in host encoding as a ASText object.

Parameters

pdDoc — 

The document containing the page for which a label is requested.

 
pageNum — 

The number of the page whose label is requested.

 
text — 

If a label exists for pageNum, it is returned in this object.

See Also

Since

PI_PDMODEL_VERSION >= 0x00060000

File: PDProcs.h
Line: 10944
PDDocGetLayoutMode() 
Product availability: All
Platform availability: All

Syntax

PDLayoutMode PDDocGetLayoutMode(PDDoc doc)

Gets the value of the PageLayout key in the Catalog dictionary.

Parameters

doc — 

IN The document whose layout mode is obtained.

Returns

Layout mode value from the PDF Catalog dictionary.

See Also

Since

PI_PDMODEL_VERSION >= 0x00070000

File: PDProcs.h
Line: 11207
PDDocGetMergedXAPKeywords() 
Product availability: Acrobat, PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

ASText PDDocGetMergedXAPKeywords(PDDoc pdDoc)

Yields an ASText containing a semicolon-separated list of fields. The first such field is the entire contents of the pdf:Keywords property of the document XMP; the remaining fields are the contents of successive items in the xmp:Keywords bag of keyword items.

The document's metadata is not modified as a result of this call.

Parameters

pdDoc — 

The document containing the metadata from which to extract the merged list of keywords.

Returns

An ASText containing the textual representation of the merged list of keywords. The ASText returned becomes the sole property of the caller.

Since

PI_PDMETADATA_VERSION >= 0x00070000

File: PDMetadataProcs.h
Line: 439
PDDocGetNameTree() 
Product availability: All
Platform availability: All

Syntax

PDNameTree PDDocGetNameTree(PDDoc thePDDoc, ASAtom theTree)

Retrieves a name tree, with the key name specified in theTree, from the Names dictionary of thePDDoc.

Parameters

thePDDoc — 

IN/OUT The document containing the name tree desired.

 
theTree — 

IN/OUT The name of the tree requested. This can be created by passing a string to the ASAtomFromString() method.

Returns

The PDNameTree requested.

See Also

Since

PI_PDMODEL_VERSION >= 0x00040000

File: PDProcs.h
Line: 6915
PDDocGetNewCryptHandler() 
Product availability: All
Platform availability: All

Syntax

ASAtom PDDocGetNewCryptHandler(PDDoc doc)

Gets the specified document's new security handler (that is, the security handler that will be used after the document is saved).

If the document does not have a new security handler, it returns the document's current security handler.

Parameters

doc — 

The document whose new security handler is obtained.

Returns

The ASAtom corresponding to the pdfName of the document's new security handler. It returns ASAtomNull if the document does not have a new security handler.

See Also

Since

PI_PDMODEL_VERSION >= 0x00020000

File: PDProcs.h
Line: 2503
PDDocGetNewSecurityData() 
Product availability: All
Platform availability: All

Syntax

void* PDDocGetNewSecurityData(PDDoc doc)

Gets the security data structure for the specified document's new security handler. Use PDDocGetSecurityData() to get the security data structure for the document's current security handler.

Parameters

doc — 

The document whose new security data structure is obtained.

Returns

The security data structure for the document's new security handler.

See Also

Since

PI_PDMODEL_VERSION >= 0x00020000

File: PDProcs.h
Line: 2368
PDDocGetNewSecurityInfo() 
Product availability: All
Platform availability: All

Syntax

void PDDocGetNewSecurityInfo(PDDoc pdDoc, ASUns32* secInfo)

Gets the security information from the specified document's new security handler. It calls the PDCryptGetSecurityInfoProc() callback of the document's new security handler. No permissions are required to call this method.

It raises only those exceptions raised by the new security handler's PDCryptGetSecurityInfoProc() callback.

Parameters

pdDoc — 

IN/OUT The document whose new security information is obtained.

 
secInfo — 

IN/OUT (Filled by the method) The document's new security information. The value must be an OR of the Security Info Flags. It is set to pdInfoCanPrint | pdInfoCanEdit | pdInfoCanCopy | pdInfoCanEditNotes (see PDPerms) if the document's new security handler does not have a PDCryptGetSecurityInfoProc() callback.

See Also

Since

PI_PDMODEL_VERSION >= 0x00020000

File: PDProcs.h
Line: 2524
PDDocGetNthError() 
Product availability: All
Platform availability: All

Syntax

ASInt32 PDDocGetNthError(PDDoc doc, ASInt32 errNumber, ASInt32* errorP, char* buffer, ASInt32 bufSize)

Returns the error code and string for the nth non-fatal error encountered since the document was opened, or PDDocClearErrors was called.

Parameters

doc — 

The document in which the error has occurred.

 
errNumber — 

This is the serial number of the non-fatal error to be returned.

 
errorP — 

The error code. Use ASGetErrorString() to get the error message.

 
buffer — 

If there is a string associated with this error, the string is copied to this buffer if it is non-NULL and is NULL-terminated.

 
bufSize — 

The maximum number of bytes that will be written to the buffer.

Returns

If there is a string associated with this error, the length of that string is returned. If there is no string, the return value is zero.

Since

PI_PDMODEL_VERSION >= 0x00090000

File: PDProcs.h
Line: 11883
PDDocGetNumErrors() 
Product availability: All
Platform availability: All

Syntax

ASInt32 PDDocGetNumErrors(PDDoc doc)

Return the number of non-fatal errors encountered since the document was opened, or PDDocClearErrors was called.

Parameters

doc — 

The document in which the non-fatal errors have occurred.

Returns

Since

PI_PDMODEL_VERSION >= 0x00090000

File: PDProcs.h
Line: 11870
PDDocGetNumOCGs() 
Product availability: All
Platform availability: All

Syntax

ASUns32 PDDocGetNumOCGs(PDDoc pdDoc)

Returns the number of optional-content groups associated with a document, which is the number of unique entries in the document's OCProperties OCGs array.

Parameters

pdDoc — 

The document whose groups are counted.

Returns

The number of OCGs for the document.

See Also

Since

PI_PDMODEL_VERSION >= 0x00060000

File: PDProcs.h
Line: 10201
PDDocGetNumPages() 
Product availability: All
Platform availability: All

Syntax

ASInt32 PDDocGetNumPages(PDDoc doc)

Gets the number of pages in a document.

Parameters

doc — 

IN/OUT The document for which the number of pages is obtained.

Returns

The number of pages in the document. Remember to subtract 1 from this value if you are going to pass it to a PD- level method that takes a zero-based page number.

Since

PI_PDMODEL_VERSION >= 0x00020000

File: PDProcs.h
Line: 1543
PDDocGetNumThreads() 
Product availability: All
Platform availability: All

Syntax

ASInt32 PDDocGetNumThreads(PDDoc doc)

Gets the number of article threads in a document.

Parameters

doc — 

IN/OUT The document whose article thread count is obtained.

Returns

The number of article threads in the document.

Since

PI_PDMODEL_VERSION >= 0x00020000

File: PDProcs.h
Line: 1822
PDDocGetOCConfig() 
Product availability: All
Platform availability: All

Syntax

PDOCConfig PDDocGetOCConfig(PDDoc pdDoc)

Gets the built-in default optional-content configuration for the document from the OCProperties D entry.

Parameters

pdDoc — 

The document whose configuration is obtained.

Returns

The document's current optional-content configuration.

See Also

Since

PI_PDMODEL_VERSION >= 0x00060000

File: PDProcs.h
Line: 9895
PDDocGetOCContext() 
Product availability: All
Platform availability: All

Syntax

PDOCContext PDDocGetOCContext(PDDoc pdDoc)

Gets the built-in default optional-content context for the document. This context is used by all content drawing and enumeration calls that do not take an optional-content context parameter, or for which no context is specified.

Parameters

pdDoc — 

The document whose context is obtained.

Returns

The document's current optional-content context.

See Also

Since

PI_PDMODEL_VERSION >= 0x00060000

File: PDProcs.h
Line: 9366
PDDocGetOCGs() 
Product availability: All
Platform availability: All

Syntax

PDOCG PDDocGetOCGs(PDDoc pdDoc)

Gets the optional-content groups for the document. The order of the groups is not guaranteed to be the creation order, and is not the same as the display order (see PDOCConfigGetOCGOrder()).

Parameters

pdDoc — 

The document whose OCGs are obtained.

Returns

A NULL-terminated array of PDOCG objects. The client is responsible for freeing the array using ASfree().

See Also

Since

PI_PDMODEL_VERSION >= 0x00060000

File: PDProcs.h
Line: 10221
PDDocGetOpenAction() 
Product availability: All
Platform availability: All

Syntax

PDAction PDDocGetOpenAction(PDDoc doc)

Gets the value of the OpenAction key in the Catalog dictionary, which is the action performed when the document is opened. After you obtain the action, you can execute it with AVDocPerformAction().

Parameters

doc — 

IN/OUT The document whose open action is obtained.

Returns

The document's open action. It is invalid if there is no OpenAction key in the Catalog dictionary (this can be tested with PDActionIsValid()).

See Also

Since

PI_PDMODEL_VERSION >= 0x00020000

File: PDProcs.h
Line: 1257
PDDocGetPageLabel() 
Product availability: All
Platform availability: All

Syntax

PDPageLabel PDDocGetPageLabel(PDDoc pdDoc, ASInt32 pageNum, ASInt32* firstPage, ASInt32* lastPage)

Returns the label that is in effect for the given page.

Parameters

pdDoc — 

The document for which a page label is desired.

 
pageNum — 

The page number of the page for which a label is requested.

 
firstPage — 

(Filled by the method) If non-NULL, it is the number of the first page that the page label is attached to.

 
lastPage — 

(Filled by the method) If non-NULL, it is the number of the last page that the page label is attached to. Setting lastPage to non-NULL forces the implementation to perform another traverse of the page label tree, with some slight performance impact.

Returns

The label that is in effect for the given page. If there is no label object in effect, this method returns an invalid page label object, and firstPage and lastPage will be set to -1.

See Also

Since

PI_PDMODEL_VERSION >= 0x00040000

File: PDProcs.h
Line: 7079
PDDocGetPageMode() 
Product availability: All
Platform availability: All

Syntax

PDPageMode PDDocGetPageMode(PDDoc doc)

Gets the value of the PageMode key in the Catalog dictionary.

Parameters

doc — 

IN/OUT The document whose page mode is obtained.

Returns

Page mode value from PDF Catalog dictionary.

See Also

Since

PI_PDMODEL_VERSION >= 0x00020000

File: PDProcs.h
Line: 1453
PDDocGetPageObjByNum() 
Product availability: All
Platform availability: All

Syntax

CosObj PDDocGetPageObjByNum(PDDoc pdd, ASInt32 nPage)

Returns the page Cos object corresponding to the given page number.

Parameters

pdd — 

The PDDoc containing the given page.

 
nPage — 

The page number.

Returns

A Cos object representing the page, or an object of type CosNull if the page does not exist.

Exceptions

genErrBadParm
pdErrBadPageObj

Since

PI_PDMODEL_VERSION >= 0x00050000

File: PDProcs.h
Line: 7853
PDDocGetPDCollection() 
Product availability: All
Platform availability: All

Syntax

PDCollection PDDocGetPDCollection(PDDoc pdDoc)

Gets the collection object in a document.

Parameters

pdDoc — 

The document.

Returns

The collection. If the document does not have a collection, the returned collection is invalid.


File: PDProcs.h
Line: 12190
PDDocGetPermissions() 
Product availability: All
Platform availability: All

Syntax

PDPerms PDDocGetPermissions(PDDoc doc)

Deprecated in Acrobat 5.0. Use PDDocPermRequest() instead.

Gets the permissions for the specified document. You can set permissions with PDDocAuthorize().

Parameters

doc — 

The document whose permissions are obtained.

Returns

A bit field indicating the document's permissions. It is an OR of the PDPerms values.

See Also

Since

PI_PDMODEL_VERSION >= 0x00020000

File: PDProcs.h
Line: 2540
PDDocGetSecurityData() 
Product availability: All
Platform availability: All

Syntax

void* PDDocGetSecurityData(PDDoc doc)

Superseded in Acrobat 5.0 by PDDocPermRequest.

Gets the security data structure for the specified document's current security handler. Use PDDocGetNewSecurityData() to get the data structure for the document's new security handler.

Parameters

doc — 

The document whose security data structure is obtained.

Returns

A pointer to the document's current security data structure.

See Also

Since

PI_PDMODEL_VERSION >= 0x00020000

File: PDProcs.h
Line: 2349
PDDocGetStructTreeRoot() 
Product availability: All
Platform availability: All

Syntax

ASBool PDDocGetStructTreeRoot(INPDDoc pdDoc, OUTPDSTreeRoot* treeRoot)

Gets the structure tree root for a document.

Parameters

pdDoc — 

The PDDoc whose root is obtained.

 
treeRoot — 

(Filled by the method) The structure tree root.

Returns

true if structure tree root found, false otherwise.

See Also

Since

PI_PDS_READ_VERSION >= 0x00040000

File: PDSReadProcs.h
Line: 61
PDDocGetThread() 
Product availability: All
Platform availability: All

Syntax

PDThread PDDocGetThread(PDDoc doc, ASInt32 index)

Gets an article thread having the specified index.

Parameters

doc — 

IN/OUT The document containing the article thread.

 
index — 

IN/OUT The index of the article thread to obtain.

Returns

The specified article thread.

See Also

Since

PI_PDMODEL_VERSION >= 0x00020000

File: PDProcs.h
Line: 1836
PDDocGetThreadIndex() 
Product availability: All
Platform availability: All

Syntax

ASInt32 PDDocGetThreadIndex(PDDoc doc, PDThread thread)

Gets the index of the specified article thread.

Parameters

doc — 

IN/OUT The document containing the thread.

 
thread — 

IN/OUT The thread whose index is obtained.

Returns

The index of thread in doc. It returns -1 if thread is not in doc.

Since

PI_PDMODEL_VERSION >= 0x00020000

File: PDProcs.h
Line: 1846
PDDocGetTrapped() 
Product availability: All
Platform availability: All

Syntax

ASAtom PDDocGetTrapped(PDDoc pdDoc)

Gets the value of the Trapped key in the Info dictionary.

Parameters

pdDoc — 

The document whose Trapped key value is obtained.

Returns

The value of the Trapped key in the Info dictionary if the entry exists and is a name, or ASAtomNull if the entry does not exist or is not a name.

See Also

Since

PI_PDMODEL_VERSION >= 0x00060000

File: PDProcs.h
Line: 10899
PDDocGetVersion() 
Product availability: All
Platform availability: All

Syntax

void PDDocGetVersion(PDDoc doc, ASInt16* majorP, ASInt16* minorP)

Gets the major and minor PDF document versions. This is the PDF version of the document, which is specified in the header of a PDF file in the string "%PDF-xx. yy" where xx is the major version and yy is the minor version. For example, version 1.2 has the string "%PDF<code>-1</code>.2". See Section H.1 in the PDF Reference.

Parameters

doc — 

IN/OUT The document whose version is obtained.

 
majorP — 

IN/OUT (Filled by the method) The major version number.

 
minorP — 

IN/OUT (Filled by the method) The minor version number.

Since

PI_PDMODEL_VERSION >= 0x00020000

File: PDProcs.h
Line: 1520
PDDocGetVersionEx() 
Product availability: All
Platform availability: All

Syntax

void PDDocGetVersionEx(PDDoc doc, ASUns32* majorP, ASUns32* minorP, CosObj* adbeExtensionBaseP, ASUns32* adbeExtensionLevelP)

Returns the Adobe version of the PDF format to which the PDF file conforms. For PDF versions 1.0 through 1.7, this method will return a major version of 1, a minor version in the range of 0 through 7, and an adbeExtensionLevel of 0. For Acrobat 9, this method will return a major version of 1 and a minor version of 8. For Acrobat 10, this method will return a major version of 1 and a minor version of 9. Starting with Acrobat 9, Adobe extensions to the PDF format will be identified via the Extensions dictionary in the catalog; in this case, the major and minor versions will be returned, and the Adobe extension level will be returned via the last argument.

Parameters

doc — 

IN/OUT The document whose version is obtained.

 
majorP — 

IN/OUT (Filled by the method) The major version number.

 
minorP — 

IN/OUT (Filled by the method) The minor version number.

 
adbeExtensionBaseP — 

IN/OUT (Filled in by the method) The value of the BaseVersion entry in the ADBE dictionary. If there is no Extensions dictionary or no ADBE sub-dictionary, the value returned will be a null CosObj.

 
adbeExtensionLevelP — 

IN/OUT (Filled in by the method) The values of the ExtensionLevel entry in the ADBE dictionary. If there is no Extensions dictionary or no ADBE sub-dictionary, the value returned will be zero.

Since

PI_PDMODEL_VERSION >= 0x00090000

File: PDProcs.h
Line: 11909
PDDocGetWordFinder() 
Product availability: All
Platform availability: All

Syntax

PDWordFinder PDDocGetWordFinder(PDDoc docP, ASInt16 WXEVersion)

Gets the word finder associated with a document. It is not necessary to destroy the word finder returned by this method.

Parameters

docP — 

The document whose word finder is obtained.

 
WXEVersion — 

The version of the word finder to get.

Returns

The document's word finder. It returns NULL if the document does not have a word finder or its version does not match the version requested.

See Also

Exceptions

genErrBadParm is thrown if an invalid version number is passed.

Since

PI_PDMODEL_VERSION >= 0x00020000

File: PDProcs.h
Line: 2047
PDDocGetXAPMetadata() 
Product availability: Acrobat, PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

ASText PDDocGetXAPMetadata(INPDDoc pdDoc)

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).

Parameters

pdDoc — 

The document containing the metadata.

Returns

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

See Also

Exceptions

pdMetadataErrCouldntCreateMetaXAP

Since

PI_PDMETADATA_VERSION >= 0x00050000

File: PDMetadataProcs.h
Line: 140
PDDocGetXAPMetadataArrayItem() 
Product availability: Acrobat, PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

ASText PDDocGetXAPMetadataArrayItem(PDDoc pdDoc, ASText namespaceName, ASText path, ASInt32 index)

Gets the value of an XMP metadata array item, associated with a document, based on an index. It returns an ASText object containing the XML text of the value of the specified property in the XMP metadata array associated with the document pdDoc. The ASText object becomes the property of the client, which is free to alter or destroy it.

Parameters

pdDoc — 

The document containing the metadata.

 
namespaceName — 

The XML namespace URI for the schema in which the property is to be found.

 
path — 

The name of the desired simple property.

 
index — 

The index in the metadata property array associated with the property.

Returns

An ASText object containing the XML text of the value of the specified property in the XMP metadata associated with the document pdDoc, or an empty ASText object if no such property is found.

See Also

Exceptions

pdMetadataErrCouldntCreateMetaXAP

Since

PI_PDMETADATA_VERSION >= 0x00080000

File: PDMetadataProcs.h
Line: 501
PDDocGetXAPMetadataProperty() 
Product availability: Acrobat, PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

ASText PDDocGetXAPMetadataProperty(PDDoc pdDoc, ASText namespaceName, ASText path)

Gets the value of an XMP metadata property associated with a document. It returns an ASText whose text is the XML text of the value of the specified property in 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 can represent all properties in the pdDoc object's Info dictionary, as well as other properties. This call is preferred to PDDocGetInfo(), which only allows access to properties that are in the Info dictionary (although the latter is supported for compatibility).

Parameters

pdDoc — 

The document containing the metadata.

 
namespaceName — 

The XML namespace URI for the schema in which the property is to be found.

 
path — 

The name of the desired simple property. Note that XMP properties can have an XML substructure; this method can only retrieve values from simple textual properties.

Returns

An ASText object containing the XML text of the value of the specified property in the XMP metadata associated with the document pdDoc, or an empty ASText if no such property is found.

See Also

Exceptions

pdMetadataErrCouldntCreateMetaXAP

Since

PI_PDMETADATA_VERSION >= 0x00060000

File: PDMetadataProcs.h
Line: 381
PDDocHasISOExtensions() 
Product availability: All
Platform availability: All

Syntax

ASBool PDDocHasISOExtensions(PDDoc doc)

Returns true if the document contains an Extensions dictionary as defined by ISO 32000 for specifying the inclusion of features beyond the ISO 32000 specification. Starting with Acrobat 9, Adobe extensions to the PDF format will be identified via this Extensions dictionary in the catalog.

Parameters

doc — 

IN/OUT The document tested for ISO extensions.

Returns

Since

PI_PDMODEL_VERSION >= 0x00090000

File: PDProcs.h
Line: 11922
PDDocHasOC() 
Product availability: All
Platform availability: All

Syntax

ASBool PDDocHasOC(PDDoc pdDoc)

Determines whether the optional content feature is associated with the document. The document is considered to have optional content if there is an OCProperties dictionary in the document's catalog, and that dictionary has one or more entries in the OCGs array.

Parameters

pdDoc — 

The document whose OC status is obtained.

Returns

true if the document has optional content, false otherwise.

See Also

Since

PI_PDMODEL_VERSION >= 0x00060000

File: PDProcs.h
Line: 10185
PDDocHasUserProperties() 
Product availability: All
Platform availability: All

Syntax

ASBool PDDocHasUserProperties(PDDoc doc)

Returns true if the document declares that it has structure elements that conform to the UserProperties attributes or class conventions.

This is based on both the presence of StructTreeRoot, and a value of "true" for the UserProperties key in the document's MarkInfo dictionary.

Parameters

doc — 

The PDDoc to be examined.

Returns

An ASBool indicating whether the document declares that it has structure elements with UserProperties attributes or classes.

Since

PI_PDS_READ_VERSION >= 0x00070000

File: PDSReadProcs.h
Line: 880
PDDocImportCosDocNotes() 
Product availability: Acrobat, PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

ASInt32 PDDocImportCosDocNotes(PDDoc doc, CosDoc src, const char* noteTitle, ASInt32 noteTitleLen, PDColorValue color, void* progMon, void* monClientData, PDDocWillImportAnnotCallback importFilter)

Adds text annotations from sourceDoc to doc.

It raises an exception if the given object has the wrong Cos type. It also raises exceptions if storage is exhausted or file access fails.

Parameters

doc — 

The document that will receive the imported annotations.

 
src — 

The document from which the annotations will be imported.

 
noteTitle — 

Not currently used.

 
noteTitleLen — 

Not currently used.

 
color — 

If non-NULL, the color attribute of imported annotations. color indicates the color space (PDDeviceGray, PDDeviceRGB, PDDeviceCMYK), and color values for the annotation.

 
progMon — 

If supplied, it is a procedure to call regularly to update a progress bar for the user.

 
monClientData — 

If supplied, it is a pointer to the private data buffer used by progMon.

 
importFilter — 

A user-supplied procedure that will be called to provide a filtering process, allowing only desired annotations to import.

Returns

The number of notes imported.

See Also

Notifications

Since

PI_PDMODEL_VERSION >= 0x00040000

File: PDProcs.h
Line: 6662
PDDocImportNotes() 
Product availability: Acrobat, PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

ASInt32 PDDocImportNotes(PDDoc doc, PDDoc sourceDoc, void* progMon, void* monClientData, PDDocWillImportAnnotCallback importFilter)

Adds text annotations (notes) from sourceDoc to doc.

It raises an exception if the given object has the wrong Cos type. Also raises exceptions if storage is exhausted or file access fails.

Parameters

doc — 

The document to which the notes are exported.

 
sourceDoc — 

The document from which the notes are exported.

 
progMon — 

A user-supplied progress monitor.

 
monClientData — 

Data supplied by the monitoring routine.

 
importFilter — 

A user-supplied filter which determines what type of notes will be exported.

Returns

The number of notes imported.

See Also

Notifications

Since

PI_PDMODEL_VERSION >= 0x00040000

File: PDProcs.h
Line: 7272
PDDocInksDidChange() 
Product availability: All
Platform availability: All

Syntax

void PDDocInksDidChange(PDDoc doc, void* clientData)

Sent when the inks for the document change.

Parameters

doc — 

The document.

 
clientData — 

A pointer to a block of user-supplied data that was passed when the client registered for this notification using AVAppRegisterNotification() .


File: PIPokes.h
Line: 2686
PDDocInsertPages() 
Product availability: Acrobat, PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

void PDDocInsertPages(PDDoc doc, ASInt32 mergeAfterThisPage, PDDoc doc2, ASInt32 startPage, ASInt32 numPages, ASUns16 insertFlags, ProgressMonitor progMon, void* progMonClientData, CancelProc cancelProc, void* cancelProcClientData)

Inserts numPages pages from doc2 into doc. All annotations, and anything else associated with the page (such as a thumbnail image) are copied from the doc2 pages to the new pages in doc. This method does not insert pages if doc equals doc2.

The insertFlags parameter controls whether bookmarks and threads are inserted along with the specified pages. Setting The PDInsertAll flag has two effects:

Document logical structure from doc2 is copied into doc. If less than the whole of doc2 is being inserted, only those structure elements having content on the copied pages, and the ancestors of those elements, are copied into the logical structure tree of doc. The top-level children of the structure tree root of doc2 are copied as new top-level children of the structure tree root of doc; a structure tree root is created in doc if there was none before. The role maps of the two structure trees are merged, with name conflicts resolved in favor of the role mappings present in doc. Attribute objects having scalar values, or values that are arrays of scalar values, are copied. Class map information from doc2 is also merged into that for doc.

Parameters

doc — 

The document into which pages are inserted. This document must have at least one page.

 
mergeAfterThisPage — 

The page number in doc after which pages from doc2 are inserted. The first page is 0. If PDBeforeFirstPage (see PDExpT.h) is used, the pages are inserted before the first page in doc. Use PDLastPage to insert pages after the last page in doc.

 
doc2 — 

The document containing the pages that are inserted into doc.

 
startPage — 

The page number of the first page in doc2 to insert into doc. The first page is 0.

 
numPages — 

The number of pages in doc2 to insert into doc. Use PDAllPages to insert all pages from doc2 into doc.

 
insertFlags — 

Flags that determine what additional information is copied from doc2 into doc. It is an OR of the following constants (see PDExpT.h):

Constant

Description

PDInsertBookmarks

Inserts bookmarks as well as pages. The bookmark tree of doc2 is merged into the bookmark tree of doc by copying it as a new first-level subtree of the doc parameter's bookmark tree root, of which it becomes the last child. If doc has no bookmark tree, it acquires one identical to the bookmark tree from doc2.

PDInsertThreads

Inserts threads as well as pages.

PDInsertAll

Inserts document data from pages.

 
progMon — 

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

 
progMonClientData — 

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

 
cancelProc — 

A cancel procedure. Use AVAppGetCancelProc() to obtain the current cancel procedure. It may be NULL, in which case no cancel proc is used.

 
cancelProcClientData — 

A pointer to user-supplied data to pass to cancelProc each time it is called. It should be NULL if cancelProc is NULL.

See Also

Exceptions

pdErrOpNotPermitted is raised unless doc is editable and doc2 is not encrypted or the owner opened it.
pdErrCantUseNewVersion is raised if doc2 is a newer major version than the Acrobat viewer understands.
pdErrTooManyPagesForInsert is raised if the insertion would result in a document with too many pages.
genErrBadParm is raised if mergeAfterThisPage is an invalid page number or doc has no pages.
genErrNoMemory is raised if there is insufficient memory to perform the insertion.
pdErrWhileRecoverInsertPages is raised if an error occurs while trying to recover from an error during inserting.

Notifications

Since

PI_PDMODEL_VERSION >= 0x00020000

File: PDProcs.h
Line: 1751
PDDocMergeXAPKeywords() 
Product availability: Acrobat, PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

void PDDocMergeXAPKeywords(PDDoc pdDoc)

Causes a string produced as by PDDocGetMergedXAPKeywords() to be stored as the new value of the pdf:Keywords property, and the former value of the pdf:Keywords property to be stored as an item in the xmp:Keywords bag of keyword items.

The algorithm used to compute merged keywords lists detects the case in which the keywords lists have already been merged and makes no changes to the XMP metadata in this case.

Parameters

pdDoc — 

The document containing the metadata that is to be modified to make the pdf:Keywords and xmp:Keywords properties conform.

Since

PI_PDMETADATA_VERSION >= 0x00070000

File: PDMetadataProcs.h
Line: 461
PDDocMovePage() 
Product availability: Acrobat, PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

void PDDocMovePage(PDDoc doc, ASInt32 moveToAfterThisPage, ASInt32 pageToMove)

Moves one page in a document.

Parameters

doc — 

The document in which the page is moved.

 
moveToAfterThisPage — 

The new location of the page to move. The first page is 0. It may either be a page number, or the constant PDBeforeFirstPage (see PDExpT.h).

 
pageToMove — 

The page number of the page to move.

See Also

Exceptions

genErrBadParm is raised if moveAfterThisPage or pageToMove is invalid. Other exceptions may be raised as well.

Notifications

Since

PI_PDMODEL_VERSION >= 0x00020000

File: PDProcs.h
Line: 1633
PDDocNewSecurityData() 
Product availability: All
Platform availability: All

Syntax

void* PDDocNewSecurityData(PDDoc doc)

Creates a security data structure appropriate for the specified document's new security handler. The new security handler must have been previously set using PDDocSetNewCryptHandler(). The structure is created by calling the new security handler's PDCryptNewSecurityDataProc().

After calling PDDocNewSecurityData(), fill the structure as appropriate, call PDDocSetNewSecurityData() with the structure, and then free the structure using ASfree().

Parameters

doc — 

The document for which a security data structure is created.

Returns

The newly created security data structure.

See Also

Exceptions

pdErrOpNotPermitted is raised if pdPermSecure (see PDPerms) has not been granted for doc.
pdErrNeedCryptHandler is raised if the document does not have a new security handler.

Since

PI_PDMODEL_VERSION >= 0x00020000

File: PDProcs.h
Line: 2430
PDDocOCDidChange() 
Product availability: All
Platform availability: All

Syntax

void PDDocOCDidChange(PDDoc doc, PDDocOCChangeType whatHappened, void* object, ASErrorCode error, void* clientData)

An optional-content context changed in a PDDoc in a way that could affect the visibility state of content.

Parameters

doc — 

The document containing the optional-content context whose visibility state changed.

 
whatHappened — 

The type of change that occurred.

 
object — 

A pointer to the object that changed. The kind of object this can be depends on the type of change that occurred:

Value

Type of object

kPDOCGCreate

PDOCG

kPDOCGDestroy

NULL

kPDOCGProperties

PDOCG

kPDOCConfigChange

PDOCConfig

kPDOCConfigCreate

PDOCConfig

kPDOCConfigDestroy

NULL

kPDOCGReplace

PDOCG (the replacement)

kPDDocRemoveOC

NULL

 
error — 

If non-zero, it indicates an error that occurred while setting the optional-content context.

 
clientData — 

A pointer to a block of user-supplied data that was passed when the client registered for this notification using AVAppRegisterNotification() .

Notifications


File: PIPokes.h
Line: 2404
PDDocOCWillChange() 
Product availability: All
Platform availability: All

Syntax

void PDDocOCWillChange(PDDoc doc, PDDocOCChangeType whatWillHappen, void* object, void* clientData)

An optional-content context is changing in a PDDoc in a way that could affect the visibility state of content.

Parameters

doc — 

The document containing the optional-content context whose visibility state is changing.

 
whatWillHappen — 

The type of change that will occur.

 
object — 

A pointer to the object that will change. The kind of object this can be depends on the type of change that will occur:

Value

Type of object

kPDOCGCreate

PDOCG

kPDOCGDestroy

NULL

kPDOCGProperties

PDOCG

kPDOCConfigChange

PDOCConfig

kPDOCConfigCreate

PDOCConfig

kPDOCConfigDestroy

NULL

kPDOCGReplace

PDOCG (the replacement)

kPDDocRemoveOC

NULL

 
clientData — 

A pointer to a block of user-supplied data that was passed when the client registered for this notification using AVAppRegisterNotification() .

Notifications


File: PIPokes.h
Line: 2374
PDDocOpen() 
Product availability: All
Platform availability: All

Syntax

PDDoc PDDocOpen(ASPathName fileName, ASFileSys fileSys, PDAuthProc authProc, ASBool doRepair)

Opens the specified document. If the document is already open, it returns a reference to the already opened PDDoc. You must call PDDocClose() once for every successful open. If the call fails and the exception is pdErrNeedRebuild, then call again with doRepair set to true. This allows the application to decide whether to perform the time-consuming repair operation.

Parameters

fileName — 

A path name to the file, specified in whatever format is correct for fileSys.

 
fileSys — 

A pointer to an ASFileSysRec containing the file system in which the file resides. If it is NULL, it uses the default file system.

 
authProc — 

An authorization callback, called only if the file has been secured (that is, if the file has either the user or the master password set). This callback should obtain whatever information is needed to determine whether the user is authorized to open the file, then call PDDocPermRequest(). The Acrobat viewer's built-in authorization procedure requires the user to enter a password, and allows the user to try three times before giving up. If the authProc requires data, use PDDocOpenEx() instead of PDDocOpen().

 
doRepair — 

If true, attempt to repair the file if it is damaged. If false, do not attempt to repair the file if it is damaged.

Returns

The newly-opened document.

See Also

Exceptions

pdErrNeedPassword or other errors are raised if the file is encrypted and authProc is NULL or returns false.
pdErrNotEnoughMemoryToOpenDoc or genErrNoMemory is raised if there is insufficient memory to open the document.
pdErrNeedRebuild is raised if the document needs to be rebuilt and doRepair is false.
pdErrBadOutlineObj is raised if the Outlines object appears to be invalid (if the value of the Outlines key in the Catalog is not a NULL or dictionary object).
pdErrBadRootObj is raised if the Catalog object (as returned by CosDocGetRoot()) is not a dictionary.
pdErrBadBaseObj is raised if the Pages tree appears to be invalid (if the value of the Pages key in the Catalog is not a NULL or dictionary object).
pdErrTooManyPagesForOpen is raised if the document contains too many pages.
cosSynErrNoHeader is raised if the document's header appears to be bad.
cosSynErrNoStartXRef is raised if no end-of-file line can be located.
cosErrRebuildFailed is raised if doRepair is true and rebuild failed.

Since

PI_PDMODEL_VERSION >= 0x00020000

File: PDProcs.h
Line: 1241
PDDocOpenEx() 
Product availability: All
Platform availability: All

Syntax

PDDoc PDDocOpenEx(ASPathName fileName, ASFileSys fileSys, PDAuthProcEx authProcEx, void* authProcClientData, ASBool doRepair)

Opens the specified document. If the document is already open, it returns a reference to the already opened PDDoc. You must call PDDocClose() once for every successful open. If the call fails and the exception is pdErrNeedRebuild, then call again with doRepair equal to true. This allows the application to decide whether to perform the time-consuming repair operation.

Parameters

fileName — 

A path name to the file, specified in whatever format is correct for fileSys.

 
fileSys — 

A pointer to an ASFileSysRec containing the file system in which the file resides.

 
authProcEx — 

An authorization callback, called only if the file has been secured (meaning that the file has either the user or the master password set). This callback should obtain whatever information is needed to determine whether the user is authorized to open the file, then call PDDocAuthorize()() (which returns the permissions that the authentication data enables). The Acrobat viewer's built-in authorization procedure requires the user to enter a password, and allows the user to try three times before giving up.

 
authProcClientData — 

A pointer to user-supplied data to pass to authProcEx() each time it is called.

 
doRepair — 

If true, attempt to repair the file if it is damaged. If false, do not attempt to repair the file if it is damaged.

Returns

The newly-opened document.

See Also

Exceptions

pdErrNeedPassword is raised if the file is encrypted and authProcEx() is NULL or returns false.
pdErrNotEnoughMemoryToOpenDoc or genErrNoMemory is raised if there is insufficient memory to open the document.
pdErrNeedRebuild is raised if the document needs to be rebuilt and doRepair is false.
pdErrBadOutlineObj is raised if the Outlines object appears to be invalid (if the value of the Outlines key in the Catalog is not a NULL or dictionary object).
pdErrBadRootObj is raised if the Catalog object (as returned by CosDocGetRoot()) is not a dictionary.
pdErrBadBaseObj is raised if the Pages tree appears to be invalid (if the value of the Pages key in the Catalog is not a NULL or dictionary object).
pdErrTooManyPagesForOpen is raised if the document contains too many pages.
cosSynErrNoHeader is raised if the document's header appears to be bad.
cosSynErrNoStartXRef is raised if no end-of-file line can be located.
cosErrRebuildFailed is raised if doRepair is true and rebuild failed.

Since

PI_PDMODEL_VERSION >= 0x00020002

File: PDProcs.h
Line: 5962
PDDocOpenFromASFile() 
Product availability: All
Platform availability: All

Syntax

PDDoc PDDocOpenFromASFile(ASFile aFile, PDAuthProc authProc, ASBool doRepair)

Opens the document specified by the ASFile. aFile must be a valid ASFile. It is the caller's responsibility to dispose of the ASFile after calling PDDocClose().

This method is useful when the document referenced by the ASFile is not on the local machine, and is being retrieved incrementally using the multi-read protocol of an ASFileSys. If the bytes required to open a PDDoc are not yet available, this method will raise the exception fileErrBytesNotReady. The client should call PDDocOpenFromASFile() until this exception is no longer raised.

Parameters

aFile — 

The ASFile to open. The ASFile should be released after the PDDoc is closed.

 
authProc — 

An authorization callback, called only if the file is encrypted. This callback should obtain whatever information is needed to determine whether the user is authorized to open the file, then call PDDocAuthorize() (which returns the permissions that the authentication data enables). The Acrobat viewer's built-in authorization procedure requires the user to enter a password, and allows the user to try three times before giving up.

 
doRepair — 

If true, attempt to repair the file if it is damaged. If false, do not attempt to repair the file if it is damaged.

Returns

A valid PDDoc if successfully opened.

See Also

Exceptions

pdErrNeedPassword is raised if the file is encrypted and authProc is NULL or returns false.
fileErrBytesNotReady is raised if the bytes required to open a PDDoc are not yet available.

Since

PI_PDMODEL_VERSION >= 0x00020002

File: PDProcs.h
Line: 5466
PDDocOpenFromASFileEx() 
Product availability: All
Platform availability: All

Syntax

PDDoc PDDocOpenFromASFileEx(ASFile aFile, PDAuthProcEx authProcEx, void* authProcClientData, ASBool doRepair)

Opens the document specified by the ASFile. aFile must be a valid ASFile. It is the caller's responsibility to dispose of the ASFile after calling PDDocClose().

This method is useful when the document referenced by the ASFile is not on the local machine, and is being retrieved incrementally using the multiread protocol of an ASFileSys. If the bytes required to open a PDDoc are not yet available, this method will raise the exception fileErrBytesNotReady. The client should call PDDocOpenFromASFile() until this exception is no longer raised.

Parameters

aFile — 

The ASFile to open. The ASFile should be released after the PDDoc is closed.

 
authProcEx — 

An authorization callback, called only if the file is encrypted. This callback should obtain whatever information is needed to determine whether the user is authorized to open the file, then call PDDocAuthorize() (which returns the permissions that the authentication data enables). The Acrobat viewer's built-in authorization procedure requires the user to enter a password, and allows the user to try three times before giving up.

 
authProcClientData — 

A pointer to user-supplied data to pass to authProcEx() each time it is called.

 
doRepair — 

If true, attempt to repair the file if it is damaged. If false, do not attempt to repair the file if it is damaged.

Returns

A valid PDDoc if successfully opened.

See Also

Exceptions

pdErrNeedPassword is raised if the file is encrypted and authProc is NULL or returns false.
fileErrBytesNotReady is raised if the bytes required to open a PDDoc are not yet available.

Since

PI_PDMODEL_VERSION >= 0x00020002

File: PDProcs.h
Line: 6003
PDDocOpenWithParams() 
Product availability: All
Platform availability: All

Syntax

PDDoc PDDocOpenWithParams(PDDocOpenParams openParams)

Opens the document specified by the ASFile or ASFileSys/ASPathName. If both are set, the ASFile is used and the fileSys and pathName are ignored.

Parameters

openParams — 

IN/OUT A structure that defines which PDF file is opened. It contains parameters such as a file name, a file system, an authorization procedure, and a set of flags that define what permissions the user has on a file.

Returns

The PDDoc for the PDF document described by the structure passed in openParams.

See Also

Since

PI_PDMODEL_VERSION >= 0x00040000

File: PDProcs.h
Line: 7171
PDDocPageDirectionDidChange() 
Product availability: All
Platform availability: All

Syntax

void PDDocPageDirectionDidChange(PDDoc doc, void* clientData)

Sent when the page direction of the document changes. The page direction is determined by the Direction key in the ViewerPreferences dictionary.

Parameters

doc — 

The document.

 
clientData — 

A pointer to a block of user-supplied data that was passed when the client registered for this notification using AVAppRegisterNotification() .


File: PIPokes.h
Line: 2599
PDDocPageLabelDidChange() 
Product availability: All
Platform availability: All

Syntax

void PDDocPageLabelDidChange(PDDoc doc, ASInt32 firstPage, ASInt32 lastPage, void* clientData)

A range of pages' labels changed in a PDDoc.

Parameters

doc — 

IN/OUT The document containing the pages whose labels changed.

 
firstPage — 

IN/OUT The number of the first page whose label changed.

 
lastPage — 

IN/OUT The number of the last page whose label changed.

 
clientData — 

IN/OUT A pointer to a block of user-supplied data that was passed in by the calling application when this notification was registered for using AVAppRegisterNotification() .

See Also


File: PIPokes.h
Line: 1376
PDDocPermRequest() 
Product availability: All
Platform availability: All

Syntax

PDPermReqStatus PDDocPermRequest(PDDoc pdDoc, PDPermReqObj reqObj, PDPermReqOpr reqOpr, void* authData)

This method supersedes PDDocGetPermissions().

Checks the permissions associated with the specified document using the latest permissions format, and determines whether the requested operation is allowed for the specified object in the document.

This method first checks the requested object and operation in a cached permissions list. If a value is not found, it calls the document's permission handlers, followed by security handlers via PDCryptAuthorizeExProc() to request permissions for the operation. The final permission is a logical AND of the permissions granted by individual permissions and/or security handlers. If the document's security handler does not support this Acrobat 5.0 call, the method calls PDCryptAuthorizeProc() instead. The method then interprets the returned PDPerms to determine whether the requested operation is allowed for the specified object in the document.

This method may throw exceptions.

Parameters

pdDoc — 

The PDDoc whose permissions are being requested.

 
reqObj — 

The target object of the permissions request.

 
reqOpr — 

The target operation of the permissions request.

 
authData — 

A pointer to an authorization data structure.

Returns

The request status constant, 0 if the requested operation is allowed, a non-zero status code otherwise.

See Also

Since

PI_PDMODEL_VERSION >= 0x00050000

File: PDProcs.h
Line: 7730
PDDocPermRequestNoUB() 
Product availability: All
Platform availability: All

Syntax

PDPermReqStatus PDDocPermRequestNoUB(PDDoc pdDoc, PDPermReqObj reqObj, PDPermReqOpr reqOpr, void* authData)

PDDocPermRequestNoUB() indicates whether the permission would have been granted had the document not been Rights Enabled.

This may throw numerous exceptions.

Parameters

pdDoc — 

The PDDoc whose permissions are being requested.

 
reqObj — 

The target object of the permissions request.

 
reqOpr — 

The target operation of the permissions request.

 
authData — 

A pointer to an authorization data structure.

Returns

The request status constant: 0 if the requested operation is allowed, a non-zero status code otherwise.

See Also

Since

PI_PDMODEL_VERSION >= 0x00070000

File: PDProcs.h
Line: 11131
PDDocPermsReady() 
Product availability: All
Platform availability: All

Syntax

void PDDocPermsReady(PDDoc doc, void* clientData)

A document was opened and its permissions (if present) have been validated.

Parameters

doc — 

The document.

 
clientData — 

A pointer to a block of user-supplied data that was passed in by the calling application when this notification was registered for using AVAppRegisterNotification() .

Notifications


File: PIPokes.h
Line: 2540
PDDocPrintingTiledPage() 
Product availability: All
Platform availability: All

Syntax

void PDDocPrintingTiledPage(PDDoc doc, ASInt32 page, ASStm stm, ASInt32 whichRow, ASInt32 whichColumn, ASInt32 numRows, ASInt32 numColumns, ASFixedRect* cropRegion, PDTile tile, void* clientData)

This notification is obsolete in Acrobat 7.0 and later.

Clients who register for PDDocPrintingTilePage() will be called just after the page contents have been emitted for this tile. Tiled pages can be requested by the user from the Advanced print dialog box; clients are made aware of the selection via the tiled page notifications.

Parameters

doc — 

The document containing the tiled page.

 
page — 

The page being printed.

 
stm — 

The PostScript print stream used when printing to a PostScript printer, and NULL when printing to a non-PostScript printer. When printing to a PostScript printer, clients can write printing commands into stm (using ASStmWrite() ) to add marks to pages before any other marks have been made.

 
whichRow — 

The row that is being printed.

 
whichColumn — 

The column that is being printed.

 
numRows — 

The number of rows to be printed.

 
numColumns — 

The number of columns to be printed.

 
cropRegion — 

A pointer to an ASFixedRect that represents the region of the PDPage being cropped to for this sheet.

 
tile — 

The PDTile currently in use. The fields in this structure can be modified as necessary to affect tiling output.

 
clientData — 

A pointer to a block of user-supplied data that was passed when the client registered for this notification using AVAppRegisterNotification() .

See Also

Notifications


File: PIPokes.h
Line: 1886
PDDocReadAhead() 
Product availability: All
Platform availability: All

Syntax

void PDDocReadAhead(PDDoc doc, ASUns32 flags, void* clientData)

Used for page-at-a-time downloading and byte-serving Acrobat data. If a document is being viewed over a slow file system, PDDocReadAhead() issues a byte range request for all the data associated with the flags in flags.

Parameters

doc — 

IN/OUT The document being read.

 
flags — 

IN/OUT Flags describing type of data to read ahead. It must be an OR of flags in PDDocReadAhead() Flags.

 
clientData — 

IN/OUT Currently unused.

Since

PI_PDMODEL_VERSION >= 0x00020002

File: PDProcs.h
Line: 5903
PDDocReadAheadEmbeddedFile() 
Product availability: All
Platform availability: All

Syntax

void PDDocReadAheadEmbeddedFile(PDDoc doc, CosObj embeddedFileObj)

Used for page-at-a-time downloading and byte-serving Acrobat data. If a document is being viewed over a slow file system, the method issues a byte range request for all the data associated with an embedded file.

Parameters

doc — 

The document being read.

 
embeddedFileObj — 

The Cos object of the embedded file stream (the stream referenced by entries in the EF dictionary).

Since

PI_PDMODEL_VERSION >= 0x00060000

File: PDProcs.h
Line: 10845
PDDocReadAheadPages() 
Product availability: All
Platform availability: All

Syntax

void PDDocReadAheadPages(PDDoc doc, ASInt32 startPage, ASInt32 nPages)

Reads ahead nPages starting at startPage (if the file is linearized).

Parameters

doc — 

IN/OUT The document for which pages are read ahead.

 
startPage — 

IN/OUT The page for which read ahead is initiated.

 
nPages — 

IN/OUT The number of pages to read ahead.

Since

PI_PDMODEL_VERSION >= 0x00040000

File: PDProcs.h
Line: 7186
PDDocRelease() 
Product availability: All
Platform availability: All

Syntax

void PDDocRelease(PDDoc doc)

Decrements a document's reference count. The document will not be closed until the reference count is zero, or the application terminates.

Parameters

doc — 

IN/OUT The document whose reference count is decremented.

See Also

Exceptions

genErrBadParm

Since

PI_PDMODEL_VERSION >= 0x00020000

File: PDProcs.h
Line: 1411
PDDocRemoveBatesNumbering() 
Product availability: Acrobat, PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

ASBool PDDocRemoveBatesNumbering(PDDoc pdDoc)

Remove Bates Numbering from a PDF document.

Parameters

pdDoc — 

The PDF document from which Bates Numbering is to be removed.

Returns

true if Bates Numbering was successfully removed, false otherwise.

See Also

Exceptions

pdErrBadAction

Since

PI_PDMODEL_VERSION >= 0x00090000

File: PDBatesProcs.h
Line: 36
PDDocRemoveNameTree() 
Product availability: Acrobat, PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

void PDDocRemoveNameTree(PDDoc thePDDoc, ASAtom theTree)

Removes the name tree inside the Names dictionary with the specified key name. It does nothing if no object with that name exists.

Parameters

thePDDoc — 

IN/OUT The document from which a name tree is removed.

 
theTree — 

IN/OUT The name tree to remove.

See Also

Since

PI_PDMODEL_VERSION >= 0x00040000

File: PDProcs.h
Line: 6947
PDDocRemoveOpenAction() 
Product availability: Acrobat, PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

void PDDocRemoveOpenAction(PDDoc doc)

Removes the value of the OpenAction key in the Catalog dictionary. The value is the action performed when the document is opened.

Parameters

doc — 

IN/OUT The document whose open action is removed.

See Also

Exceptions

genErrBadParm
pdErrOpNotPermitted

Since

PI_PDMODEL_VERSION >= 0x00050000

File: PDProcs.h
Line: 7814
PDDocRemovePageLabel() 
Product availability: Acrobat, PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

void PDDocRemovePageLabel(PDDoc pdDoc, ASInt32 pageNum)

Removes the page label that is attached to the specified page, effectively merging the specified range with the previous page label sequence.

Parameters

pdDoc — 

The document from which a page label is removed.

 
pageNum — 

The page from which the page label is removed.

See Also

Since

PI_PDMODEL_VERSION >= 0x00040000

File: PDProcs.h
Line: 7151
PDDocRemoveStructTreeRoot() 
Product availability: Acrobat, PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

void PDDocRemoveStructTreeRoot(INPDDoc pdDoc)

Removes, but does not destroy, the specified StructTreeRoot element from the specified PDDoc.

Parameters

pdDoc — 

IN/OUT The PDDoc for which the StructTreeRoot element is removed.

See Also

Since

PI_PDS_WRITE_VERSION >= 0x00040000

File: PDSWriteProcs.h
Line: 79
PDDocRemoveThread() 
Product availability: Acrobat, PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

void PDDocRemoveThread(PDDoc doc, ASInt32 index)

Removes an article thread from a document. If you also wish to destroy the thread, use PDThreadDestroy() after calling PDDocRemoveThread().

Parameters

doc — 

IN/OUT The document from which the thread is removed.

 
index — 

IN/OUT The index of the thread to remove.

See Also

Notifications

Since

PI_PDMODEL_VERSION >= 0x00020000

File: PDProcs.h
Line: 1879
PDDocReplaceOCG() 
Product availability: All
Platform availability: All

Syntax

void PDDocReplaceOCG(PDOCG replaceOCG, PDOCG keepOCG)

In the document associated with a specified optional-content group, replaces that group with another group.

Parameters

replaceOCG — 

The OCG to replace.

 
keepOCG — 

The replacement OCG.

See Also

Since

PI_PDMODEL_VERSION >= 0x00060000

File: PDProcs.h
Line: 10236
PDDocReplacePages() 
Product availability: Acrobat, PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

void PDDocReplacePages(PDDoc doc, ASInt32 startPage, PDDoc doc2, ASInt32 startPageDoc2, ASInt32 numPages, ASBool mergeTextAnnots, ProgressMonitor progMon, void* progMonClientData, CancelProc cancelProc, void* cancelProcClientData)

Replaces the specified range of pages in one document with pages from another. The contents, resources, size and rotation of the pages are replaced. The bookmarks are not copied, because they are attached to the document, not to individual pages.

Parameters

doc — 

The document in which pages are replaced.

 
startPage — 

The first page number in doc to replace. The first page is 0.

 
doc2 — 

The document from which pages are copied into doc.

 
startPageDoc2 — 

The page number of the first page in doc2 to copy. The first page is 0.

 
numPages — 

The number of pages to replace.

 
mergeTextAnnots — 

If true, text annotations from doc2 are appended if they are different than all existing annotations on the page in doc. No other types of annotations are copied.

 
progMon — 

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

 
progMonClientData — 

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

 
cancelProc — 

Currently unused. A cancel procedure. Use AVAppGetCancelProc() to obtain the current cancel procedure. It may be NULL, in which case no cancel proc is used.

 
cancelProcClientData — 

A pointer to user-supplied data to pass to cancelProc each time it is called. It should be NULL if cancelProc is NULL.

See Also

Exceptions

pdErrOpNotPermitted is raised unless doc is editable and doc2 is not encrypted or the owner opened it.
pdErrCantUseNewVersion is raised if doc2 is a newer major version than the Acrobat viewer understands.
genErrBadParm is raised if one of the following conditions is true:
genErrNoMemory is raised if there is insufficient memory to perform the insertion.

Notifications

Since

PI_PDMODEL_VERSION >= 0x00020000

File: PDProcs.h
Line: 1812
PDDocRequestEntireFile() 
Product availability: All
Platform availability: All

Syntax

void PDDocRequestEntireFile(PDDoc doc, PDDocRequestEntireFileProc requestProc, void* clientData)

Requests the document file and performs the specified procedure on it.

Parameters

doc — 

The document for which pages are read ahead.

 
requestProc — 

The procedure to call to process the request.

 
clientData — 

A pointer to user-defined data to pass to the requestProc.

Since

PI_PDMODEL_VERSION >= 0x00060000

File: PDProcs.h
Line: 10727
PDDocRequestPages() 
Product availability: All
Platform availability: All

Syntax

void PDDocRequestPages(PDDoc doc, ASInt32 startPage, ASInt32 nPages, PDDocRequestPagesProc requestProc, void* clientData)

Requests nPages starting at startPage, and performs a specified procedure on them.

Parameters

doc — 

The document for which pages are read ahead.

 
startPage — 

The first page requested.

 
nPages — 

The number of pages requested.

 
requestProc — 

The procedure to call to process the request.

 
clientData — 

A pointer to user-defined data to pass to the requestProc.

Since

PI_PDMODEL_VERSION >= 0x00060000

File: PDProcs.h
Line: 10715
PDDocResetInkUsage() 
Product availability: Acrobat, PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

void PDDocResetInkUsage(PDDoc doc)

Resets the cached ink (spot color) usage information in a document. This should be called when the set of non-process colorants for a document have been changed. Calling this will force the cached information to be recomputed.

Parameters

doc — 

IN The document on which to reset set the ink usage.


File: PDProcs.h
Line: 11862
PDDocSave() 
Product availability: Acrobat, PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

void PDDocSave(PDDoc doc, PDSaveFlags saveFlags, ASPathName newPath, ASFileSys fileSys, ProgressMonitor progMon, void* progMonClientData)

Saves a document to disk. If a full save is requested to the original path, the file is saved to a file system-determined temporary file, the old file is deleted, and the temporary file is renamed to newPath. You must call PDDocClose() to release resources; do not call PDDocRelease().

If the document was created with PDDocCreate(), at least one page must be added using PDDocCreatePage() or PDDocInsertPages() before Acrobat can save the document.

You can replace this method with your own version, using HFTReplaceEntry().

A full save with linearization optimizes the PDF file. During optimization, all objects in a PDF file are rearranged, many of them acquiring not only a new file position, but also a new Cos object number. At the end of the save operation, Acrobat flushes its information of the PD layer and below to synchronize its in-memory state with the new disk file just written.

It is crucial that all objects that have been acquired from a PDDoc be released before Acrobat attempts to flush its in-memory state. This includes any object that was acquired with a PD*Acquire method, such as PDDocAcquirePage() or PDBeadAcquirePage(). Failing to release these objects before the full save results in a save error, and the resulting PDF file is not valid. In addition, all PD level objects and Cos objects derived from the PDDoc are no longer valid after the full save. Attempting to use these objects after a full save produces undefined results.

Clients and applications should register for the PDDocWillSaveEx() and PDDocDidSave() notifications so that they can clean up appropriately. See these notifications for more information on releasing and reacquiring objects from the PDDoc.

Parameters

doc — 

The document to save.

 
saveFlags — 

A bit field composed of an OR of the PDSaveFlags values.

 
newPath — 

The path to which the file is saved. A path must be specified when either PDSaveFull or PDSaveCopy are used for saveFlags. If PDSaveIncremental is specified in saveFlags, then newPath should be NULL. If PDSaveFull is specified and newPath is the same as the file's original path, the new file is saved to a file system-determined temporary path, then the old file is deleted and the new file is renamed to newPath.

 
fileSys — 

The file system. If it is NULL, uses the fileSys of the document's current backing file. Files can only be saved to the same file system. fileSys must be either NULL or the default file system obtained with ASGetDefaultFileSys(), otherwise an error is raised.

 
progMon — 

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

 
progMonClientData — 

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

See Also

Exceptions

pdErrAfterSave is raised if the save was completed successfully, but there were problems cleaning up afterwards. The document is no longer consistent and cannot be changed. It must be closed and reopened.
pdErrOpNotPermitted is raised if saving is not permitted. Saving is permitted if either edit or editNotes (see PDPerms) is allowed, or you are doing a full save and saveAs is allowed.
pdErrAlreadyOpen is raised if PDSaveFull is used, and the file specified by newPath is already open.

Notifications

Since

PI_PDMODEL_VERSION >= 0x00020000

File: PDProcs.h
Line: 1366
PDDocSaveWithParams() 
Product availability: Acrobat, PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

void PDDocSaveWithParams(PDDoc doc, PDDocSaveParams inParams)

Saves a document to disk as specified in a parameter's structure. This is essentially the same as PDDocSave() with two additional parameters: a cancel proc and cancel proc client data (so you could cut and paste description information and other information from PDDocSave()).

You can replace this method with your own version, using HFTReplaceEntry().

Parameters

doc — 

The document to save.

 
inParams — 

A PDDocSaveParams structure specifying how the document should be saved.

See Also

Since

PI_PDMODEL_VERSION >= 0x00020002

File: PDProcs.h
Line: 6094
PDDocSetFlags() 
Product availability: All
Platform availability: All

Syntax

void PDDocSetFlags(PDDoc doc, ASInt32 flags)

Sets information about the document's file and its state. This method can only be used to set, not clear, flags. As a result, it is not possible, for example, to use this method to clear the flag that indicates that a document has been modified and needs to be saved. Instead, use PDDocClearFlags() to clear flags.

Parameters

doc — 

IN/OUT The document whose flags are set.

 
flags — 

IN/OUT A bit field composed of an OR of the PDDocFlags values.

See Also

Since

PI_PDMODEL_VERSION >= 0x00020000

File: PDProcs.h
Line: 1440
PDDocSetFullScreen() 
Product availability: Acrobat, PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

void PDDocSetFullScreen(PDDoc pdDoc, ASBool fs)

Sets whether this document opens in full-screen mode. This provides an alternative to calling PDDocSetPageMode() with PDFullScreen.

Parameters

pdDoc — 

The document to set.

 
fs — 

true if the document is set to open in full-screen mode, false otherwise.

See Also

Since

PI_PDMODEL_VERSION >= 0x00020002

File: PDProcs.h
Line: 6070
PDDocSetInfo() 
Product availability: Acrobat, PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

void PDDocSetInfo(PDDoc doc, const char* infoKey, const char* buffer, ASInt32 nBytes)

Sets the value of a key in a document's Info dictionary. However, it is preferable to use PDDocSetXAPMetadataProperty(), because it also allows accessing XMP properties that are not duplicated in the Info dictionary.

See Section 10.2.1 on Info dictionaries in the PDF Reference for information about Info dictionaries. All values in the Info dictionary should be strings; other data types such as numbers and Boolean values should not be used as values in the Info dictionary. If an Info dictionary key is specified that is not currently in the Info dictionary, it is added to the dictionary.

Users may define their own Info dictionary entries. In this case, it is strongly recommended that the key have the developer's prefix assigned by the Adobe Developers Association.

Parameters

doc — 

The document whose Info dictionary key is set.

 
infoKey — 

The name of the Info dictionary key whose value is set.

 
buffer — 

The buffer containing the value to associate with infoKey.

 
nBytes — 

The number of bytes in buffer.

See Also

Since

PI_PDMODEL_VERSION >= 0x00020000

File: PDProcs.h
Line: 2331
PDDocSetInfoAsASText() 
Product availability: All
Platform availability: All

Syntax

void PDDocSetInfoAsASText(PDDoc doc, const ASText infoKey, const ASText value)

Sets the value of a key in a document's Info dictionary.

Parameters

doc — 

The document whose Info dictionary key is set.

 
infoKey — 

The name of the Info dictionary key whose value is set.

 
value — 

The text object containing the value to associate with infoKey.

See Also

Since

PI_PDMODEL_VERSION >= 0x00080000

File: PDProcs.h
Line: 11399
PDDocSetLayoutMode() 
Product availability: Acrobat, PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

void PDDocSetLayoutMode(PDDoc doc, PDLayoutMode mode)

Sets the value of the PageLayout key in the Catalog dictionary.

Parameters

doc — 

IN The document whose page mode is set.

 
mode — 

IN The layout mode to set.

See Also

Since

PI_PDMODEL_VERSION >= 0x00070000

File: PDProcs.h
Line: 11197
PDDocSetMinorVersion() 
Product availability: All
Platform availability: All

Syntax

void PDDocSetMinorVersion(PDDoc pdDoc, ASInt16 minor)

Sets the PDF minor version to the greater of its current value and the requested value. This function should be called when any feature requiring a PDF version of 1.7 or higher is applied to a document.

Parameters

pdDoc — 

The document.

 
minor — 

The minimum required minor version

Since

PI_PDMODEL_VERSION >= 0x00080000

File: PDProcs.h
Line: 11723
PDDocSetNewCryptFilterData() 
Product availability: All
Platform availability: All

Syntax

void PDDocSetNewCryptFilterData(PDDoc doc, ASAtom filterName, char* cryptData, ASInt32 cryptDataLen)

Sets the encrypted data for the specified document's encryption filter to decrypt. Call this before accessing the stream to be decrypted.

Parameters

doc — 

The document whose new encrypted data is set.

 
filterName — 

The ASAtom corresponding to the name of the security filter used by the document.

 
cryptData — 

The new encrypted data for the document.

 
cryptDataLen — 

The length of cryptData in bytes.

See Also

Exceptions

pdErrNoCryptHandler is raised if there is no security handler registered for the document.
pdErrOpNotPermitted is raised if the document's permissions do not allow its data to be modified.

Since

PI_PDMODEL_VERSION >= 0x00060000

File: PDProcs.h
Line: 10650
PDDocSetNewCryptFilterMethod() 
Product availability: All
Platform availability: All

Syntax

void PDDocSetNewCryptFilterMethod(PDDoc doc, ASAtom filterName, ASAtom method)

Sets or resets the specified document's security filter method, used for encryption and decryption of the document's data.

Parameters

doc — 

The document whose new security filter method is set.

 
filterName — 

The ASAtom corresponding to the name of the security filter to use.

 
method — 

One of five supported security methods:

  • None (default)

  • V2 (RC4)

  • V3 (RC4)

  • AESV1

  • AESV2 (128 bit)

  • AESV3 (256 bit)

See Also

Exceptions

pdErrNoCryptHandler is raised if there is no security handler registered for the document.

Since

PI_PDMODEL_VERSION >= 0x00060000

File: PDProcs.h
Line: 10626
PDDocSetNewCryptHandler() 
Product availability: Acrobat, PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

void PDDocSetNewCryptHandler(PDDoc pdDoc, ASAtom newCryptHandler)

Sets the specified document's new security handler (that is, the security handler that will be used after the document is saved).

This method returns with no action if the new security handler is the same as the old one. Otherwise, it calls the new security handler's PDCryptNewSecurityDataProc() to set the document's newSecurityData field. If the new security handler does not have this callback, the document's newSecurityData field is set to 0.

Parameters

pdDoc — 

The document whose new security handler is set.

 
newCryptHandler — 

The ASAtom for the name of the new security handler to use for the document. This name must be the same as the pdfName used when the security handler was registered using PDRegisterCryptHandler(). Use ASAtomNull to remove security from the document.

See Also

Exceptions

pdErrNoCryptHandler is raised if there is no security handler registered with the specified name and the name is not ASAtomNull.
pdErrOpNotPermitted is raised if the document's permissions do not allow its security to be modified.

Since

PI_PDMODEL_VERSION >= 0x00020000

File: PDProcs.h
Line: 2482
PDDocSetNewCryptHandlerEx() 
Product availability: Acrobat, PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

void PDDocSetNewCryptHandlerEx(PDDoc pdDoc, ASAtom newCryptHandler, void* currentAuthData)

Extends PDDocSetNewCryptHandler() for Acrobat 6.0. It sets the specified document's new security handler (that is, the security handler that will be used after the document is saved). This method should be called when the current document's security handler requires authorization data to validate permission to change security handlers.

This method returns with no action if the new security handler is the same as the old one. Otherwise, the new security handler's PDCryptNewSecurityDataProc() is called to set the document's newSecurityData field. If the new security handler does not have this callback, the document's newSecurityData field is set to 0.

Parameters

pdDoc — 

The document whose new security handler is set.

 
newCryptHandler — 

The ASAtom corresponding to the name of the new security handler to use for the document. This name must be the same as the pdfName used when the security handler was registered using PDRegisterCryptHandler(). Use ASAtomNull to remove security from the document.

 
currentAuthData — 

A pointer to authorization data to be passed to the PDCryptAuthorizeProc() callback for the document's current security handler. For the Acrobat viewer's built-in security handler, the password is passed in the authData parameter.

See Also

Exceptions

pdErrNoCryptHandler is raised if there is no security handler registered with the specified name and the name is not ASAtomNull.
pdErrOpNotPermitted is raised if the document's permissions do not allow its security to be modified.

Since

PI_PDMODEL_VERSION >= 0x00060000

File: PDProcs.h
Line: 10886
PDDocSetNewDefaultFilters() 
Product availability: All
Platform availability: All

Syntax

void PDDocSetNewDefaultFilters(PDDoc doc, ASAtom defaultStmFilterName, ASAtom defaultStrFilterName)

Sets or resets the document's default security filter methods for streams and strings, used to encrypt and decrypt the document's data. This method is only valid with version 4 algorithms (/V 4 in the Encrypt dictionary).

Parameters

doc — 

The document whose new security filter is set.

 
defaultStmFilterName — 

The ASAtom corresponding to the name of the default security filter to use for streams. The filter must exist and be registered.

 
defaultStrFilterName — 

The ASAtom corresponding to the name of the default security filter to use for strings. The filter must exist and be registered.

See Also

Exceptions

pdErrNoCryptHandler is raised if there is no security handler registered for the document.

Since

PI_PDMODEL_VERSION >= 0x00060000

File: PDProcs.h
Line: 10673
PDDocSetNewSecurityData() 
Product availability: Acrobat, PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

void PDDocSetNewSecurityData(PDDoc pdDoc, void* secData)

Sets the security data structure for the specified document's new security handler. Use PDDocSetNewCryptHandler() to set a new security handler for a document.

Parameters

pdDoc — 

IN/OUT The document whose new security data structure is set.

 
secData — 

IN/OUT A pointer to the new security data structure to set for doc. See PDDocNewSecurityData() for information on creating and filling this structure.

See Also

Exceptions

pdErrNeedCryptHandler is raised if the document does not have a new security handler.
pdErrOpNotPermitted is raised if the document's permissions cannot be changed.

Since

PI_PDMODEL_VERSION >= 0x00020000

File: PDProcs.h
Line: 2451
PDDocSetOpenAction() 
Product availability: Acrobat, PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

void PDDocSetOpenAction(PDDoc doc, PDAction action)

Sets the value of the OpenAction key in the Catalog dictionary, which is the action performed when the document is opened.

Parameters

doc — 

The document whose open action is set.

 
action — 

The open action you want to set.

See Also

Since

PI_PDMODEL_VERSION >= 0x00020000

File: PDProcs.h
Line: 1268
PDDocSetPageLabel() 
Product availability: Acrobat, PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

void PDDocSetPageLabel(PDDoc pdDoc, ASInt32 pageNum, PDPageLabel pgLabel)

Attaches a label to a page. This establishes the numbering scheme for that page and all pages following it, until another page label is encountered. This label allows PDF producers to define a page numbering system other than the Acrobat default.

If pageNum is less than 0 or greater than the number of pages in pdDoc, the method does nothing.

Parameters

pdDoc — 

The document containing the page to label.

 
pageNum — 

The number of the page to label.

 
pgLabel — 

The label for the page specified by pageNum.

See Also

Exceptions

genErrBadParm is raised if pgLabel is not a valid PDPageLabel.

Notifications

Since

PI_PDMODEL_VERSION >= 0x00040000

File: PDProcs.h
Line: 7137
PDDocSetPageMode() 
Product availability: Acrobat, PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

void PDDocSetPageMode(PDDoc doc, PDPageMode mode)

Sets the value of the PageMode key in the Catalog dictionary.

Parameters

doc — 

IN/OUT The document whose page mode is set.

 
mode — 

IN/OUT The page mode to set.

See Also

Since

PI_PDMODEL_VERSION >= 0x00020000

File: PDProcs.h
Line: 1464
PDDocSetTrapped() 
Product availability: Acrobat, PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

void PDDocSetTrapped(PDDoc pdDoc, ASAtom newValue)

Sets the value of the Trapped key in the Info dictionary to the specified ASAtom.

This method causes the corresponding XMP metadata item to be set to a string reflecting the characters in the ASAtom.

Parameters

pdDoc — 

The document whose Trapped key value to set.

 
newValue — 

The new value of the Trapped key in the Info dictionary, or ASAtomNull to remove any existing entry. The method does not check that the value is one of the allowed values for the key.

See Also

Since

PI_PDMODEL_VERSION >= 0x00060000

File: PDProcs.h
Line: 10918
PDDocSetXAPMetadata() 
Product availability: Acrobat, PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

void PDDocSetXAPMetadata(INPDDoc pdDoc, INASText metadataASText)

Sets the XMP metadata associated with a document. It replaces the XMP metadata associated with the document pdDoc with the XMP metadata stored in metadataASText.

The contents of metadataASText must be well-formed XML and Resource Description Format (RDF), as defined by the W3C (see ), that also forms valid XMP. If metadataASText is ill-formed, an error is raised.

The call does not destroy metadataASText or alter its text. This method copies the textual information it needs, so subsequent alteration or destruction of metadataASText does not affect the document XMP metadata.

Calling PDDocSetXAPMetadata() changes the contents of the pdDoc object's Info dictionary to reflect the values of corresponding metadata properties represented in metadataASText. The XMP metadata can also contain properties that are not reflected in the Info dictionary.

Parameters

pdDoc — 

The document whose metadata is to be set.

 
metadataASText — 

An ASText object containing the metadata to be stored in the document.

See Also

Exceptions

ErrSysPDModel
pdMetadataErrCouldntCreateMetaXAP
pdErrOpNotPermitted is raised if pdDoc is not writable.

Notifications

Since

PI_PDMETADATA_VERSION >= 0x00050000

File: PDMetadataProcs.h
Line: 192
PDDocSetXAPMetadataArrayItem() 
Product availability: Acrobat, PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

void PDDocSetXAPMetadataArrayItem(PDDoc pdDoc, ASText namespaceName, ASText namespacePrefix, ASText path, ASInt32 index, ASText newValue)

Sets the value of an XMP metadata array item, associated with a document, based on an index.

Parameters

pdDoc — 

The document containing the metadata.

 
namespaceName — 

The XML namespace URI for the schema in which the property is to be found.

 
namespacePrefix — 

A brief string to be used as an abbreviation when creating the XML representation of the property. This string must not be empty.

 
path — 

The name of the simple property to be modified.

 
index — 

The index in the metadata property array associated with the property.

 
newValue — 

The new XML text value for the property.

See Also

Exceptions

pdMetadataErrCouldntCreateMetaXAP

Since

PI_PDMETADATA_VERSION >= 0x00080000

File: PDMetadataProcs.h
Line: 535
PDDocSetXAPMetadataProperty() 
Product availability: Acrobat, PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

void PDDocSetXAPMetadataProperty(PDDoc pdDoc, ASText namespaceName, ASText namespacePrefix, ASText path, ASText newValue)

Sets the value of an XMP metadata property associated with a document. The XMP metadata represents all the properties in pdDoc object's Info dictionary, and can also contain properties that are not in the Info dictionary. This call is preferred to PDDocSetInfo(), which only allows access to properties that are in the Info dictionary (although the older function is supported for compatibility).

Parameters

pdDoc — 

The document containing the metadata.

 
namespaceName — 

The XML namespace URI for the schema in which the property is to be found.

 
namespacePrefix — 

A brief string to be used as an abbreviation when creating the XML representation of the property. This string must not be empty.

 
path — 

The name of the simple property to be modified.

 
newValue — 

The new XML text value for the property.

See Also

Exceptions

pdMetadataErrCouldntCreateMetaXAP

Since

PI_PDMETADATA_VERSION >= 0x00060000

File: PDMetadataProcs.h
Line: 417
PDDocWillChangePages() 
Product availability: All
Platform availability: All

Syntax

void PDDocWillChangePages(PDDoc doc, PDOperation op, ASInt32 fromPage, ASInt32 toPage, void* clientData)

Pages will be inserted, deleted, moved, or modified.

Parameters

doc — 

The document in which pages will be changed.

 
op — 

The change that will be made. op will be one of the PDOperation values.

 
fromPage — 

The page number of the first page that will be modified.

 
toPage — 

The page number of the last page that will be modified.

 
clientData — 

A pointer to a block of user-supplied data that was passed when the client registered for this notification using AVAppRegisterNotification() .

See Also

Notifications


File: PIPokes.h
Line: 569
PDDocWillClose() 
Product availability: All
Platform availability: All

Syntax

void PDDocWillClose(PDDoc doc, void* clientData)

A PDDoc will be closed. A PDDoc is closed only if its reference count is zero.

Neither this notification, PDDocDidClose() , AVDocWillClose() , nor AVDocDidClose() are broadcast if the user selects Cancel when prompted to save a modified document as it is closed.

Parameters

doc — 

The document to close.

 
clientData — 

A pointer to a block of user-supplied data that was passed in by the calling application when this notification was registered for using AVAppRegisterNotification() .

See Also

Notifications


File: PIPokes.h
Line: 1359
PDDocWillDeletePages() 
Product availability: All
Platform availability: All

Syntax

void PDDocWillDeletePages(PDDoc doc, ASInt32 fromPage, ASInt32 toPage, void* clientData)

One or more pages will be deleted.

Parameters

doc — 

The document from which pages will be deleted.

 
fromPage — 

The page number of the first page that will be deleted.

 
toPage — 

The page number of the last page that will be deleted.

 
clientData — 

A pointer to a block of user-supplied data that was passed when the client registered for this notification using AVAppRegisterNotification() .

See Also

Notifications


File: PIPokes.h
Line: 528
PDDocWillExportAnnots() 
Product availability: All
Platform availability: All

Syntax

void PDDocWillExportAnnots(PDDoc doc, void* clientData)

The annotations of a document will be exported.

Parameters

doc — 

IN/OUT The document whose annotations will be exported.

 
clientData — 

IN/OUT A pointer to a block of user-supplied data that was passed in by the calling application when this notification was registered for using AVAppRegisterNotification() .

See Also

Notifications


File: PIPokes.h
Line: 1393
PDDocWillImportAnnots() 
Product availability: All
Platform availability: All

Syntax

void PDDocWillImportAnnots(PDDoc doc, void* clientData)

The annotations from one document will be imported into another document.

Parameters

doc — 

IN/OUT The document into which annotations will be imported.

 
clientData — 

IN/OUT A pointer to a block of user-supplied data that was passed in by the calling application when this notification was registered for using AVAppRegisterNotification() .

See Also

Notifications


File: PIPokes.h
Line: 1411
PDDocWillInsertPages() 
Product availability: All
Platform availability: All

Syntax

void PDDocWillInsertPages(PDDoc doc, ASInt32 insertAfterThisPage, PDDoc srcDoc, ASInt32 srcFromPage, ASInt32 srcToPage, void* clientData)

One or more pages will be inserted.

Parameters

doc — 

The document into which pages will be inserted.

 
insertAfterThisPage — 

The page number (in doc) after which pages will be inserted.

 
srcDoc — 

The document that provides the pages to insert. This is NULL when a new blank page is created and inserted into a document. This is NULL for a notification broadcast by PDDocCreatePage() .

 
srcFromPage — 

The page number (in srcDoc) of the first page that will be inserted. It is not valid when a new blank page is created and inserted into a document. This is NULL for a notification broadcast by PDDocCreatePage() .

 
srcToPage — 

The page number (in srcDoc) of the last page that will be inserted. It is not valid when a new blank page is created and inserted into a document. This is NULL for a notification broadcast by PDDocCreatePage() .

 
clientData — 

A pointer to a block of user-supplied data that was passed when the client registered for this notification using AVAppRegisterNotification() .

See Also

Notifications


File: PIPokes.h
Line: 390
PDDocWillInsertPagesEx() 
Product availability: All
Platform availability: All

Syntax

void PDDocWillInsertPagesEx(PDDocInsertPagesParams params, void* clientData)

Pages will be inserted into a document. This notification occurs after the PDDocWillInsertPages() notification.

Parameters

params — 

IN/OUT A structure describing how pages will be inserted.

 
clientData — 

IN/OUT A pointer to a block of user-supplied data that was passed in by the calling application when this notification was registered for using AVAppRegisterNotification() .

See Also

Notifications


File: PIPokes.h
Line: 1755
PDDocWillMovePages() 
Product availability: All
Platform availability: All

Syntax

void PDDocWillMovePages(PDDoc doc, ASInt32 moveAfterThisPage, ASInt32 fromPage, ASInt32 toPage, void* clientData)

One or more pages will be moved.

Parameters

doc — 

The document in which pages will be moved.

 
moveAfterThisPage — 

The page number after which the moved pages will be placed.

 
fromPage — 

The page number of the first page to move.

 
toPage — 

The page number of the last page to move.

 
clientData — 

A pointer to a block of user-supplied data that was passed when the client registered for this notification using AVAppRegisterNotification() .

See Also

Notifications


File: PIPokes.h
Line: 490
PDDocWillPrintDoc() 
Product availability: All
Platform availability: All

Syntax

void PDDocWillPrintDoc(PDDoc doc, ASStm stm, ASInt32 psLevel, void* clientData)

This notification is broadcast before a document is printed, and before any marks are made on the first page. When printing to a PostScript printer, printing commands can also be sent that are placed on the page before any other marks. For example, a setpagedevice operator could be placed in the print stream.

Parameters

doc — 

The document that is about to be printed.

 
stm — 

The PostScript print stream used when printing to a PostScript printer, and NULL when printing to a non-PostScript printer. When printing to a PostScript printer, clients can write printing commands into stm (using ASStmWrite() ) to add marks to pages before any other marks have been made. In the 2.x Acrobat viewers, the page printing sequence to a PostScript printer is:

page setup (including setpagedevice) ... save ... gsave ... save ... begin ... begin ... begin ... PDDocWillPrintPage() ... page contents ... PDDocDidPrintPage() ... end ... end ... end ... restore ... restore ... showpage.

This sequence must not be relied upon, and it is to some extent dependent on the printer driver in use. Nevertheless, it is true that by the time the PDDocWillPrintPage() notification is broadcast, it is too late to perform any setpagedevice operations.

 
psLevel — 

When printing to a PostScript printer, psLevel is either 1 or 2, representing the PostScript level available on the printer. When printing to a non-PostScript printer, psLevel is 0. psLevel is useful in determining whether the output device is a PostScript printer. In addition, when printing to a PostScript printer, psLevel is useful to determine the operators that can be sent in any printing code downloaded using the PDDocWillPrintDoc() , PDDocWillPrintPage() , and PDDocDidPrintPage() notifications.

 
clientData — 

A pointer to a block of user-supplied data that was passed when the client registered for this notification using AVAppRegisterNotification() .

See Also

Notifications


File: PIPokes.h
Line: 1276
PDDocWillPrintDocInMode() 
Product availability: All
Platform availability: All

Syntax

void PDDocWillPrintDocInMode(PDDoc doc, PDPrintWhat printMode, void* clientData)

Sent before a document is printed, before any marks are made on the first page. Page resources and contents may be modified at the time this notification is broadcast.

Parameters

doc — 

The document that is about to be printed.

 
printMode — 

A constant that describes what is being printed:

  • The document only.

  • The document with annotations.

  • The form data only.

 
clientData — 

A pointer to a block of user-supplied data that was passed when the client registered for this notification using AVAppRegisterNotification() .

See Also

Notifications


File: PIPokes.h
Line: 2448
PDDocWillPrintPage() 
Product availability: All
Platform availability: All

Syntax

void PDDocWillPrintPage(PDDoc doc, ASInt32 page, ASStm stm, void* clientData)

This notification is broadcast once per page that is printed, before any marks are made on the page. When printing to a PostScript printer, printing commands can also be sent that will be placed on the page before any other marks.

Parameters

doc — 

The document from which a page is about to be printed.

 
page — 

The page number of the page that is about to be printed.

 
stm — 

The PostScript print stream used when printing to a PostScript printer, or NULL when printing to a non-PostScript printer. When printing to a PostScript printer, clients can write printing commands into stm with ASStmWrite() to add marks to the printed page before any other marks have been made. In the 2.x Acrobat viewers, the page printing sequence to a PostScript printer is:

page setup (including setpagedevice) ... save ... gsave ... save ... begin ... begin ... begin ... PDDocWillPrintPage() ... page contents ... PDDocDidPrintPage() ... end ... end ... end ... restore ... restore ... showpage

This sequence must not be relied upon, and depends on the printer driver in use. However, by the time the PDDocWillPrintPage() notification is broadcast, it is too late to perform any setpagedevice operations.

 
clientData — 

A pointer to a block of user-supplied data that was passed when the client registered for this notification using AVAppRegisterNotification() .

See Also

Notifications


File: PIPokes.h
Line: 729
PDDocWillPrintPages() 
Product availability: All
Platform availability: All

Syntax

void PDDocWillPrintPages(PDDoc doc, ASInt32 fromPage, ASInt32 toPage, ASInt32 psLevel, ASBool binaryOK, void* clientData)

This notification is broadcast when printing begins, before any pages are printed.

Parameters

doc — 

The document from which pages will be printed.

 
fromPage — 

The page number of the first page that will be printed.

 
toPage — 

The page number of the last page that will be printed.

 
psLevel — 

When printing to a PostScript printer, psLevel is either 1 or 2, representing the PostScript level available on the printer. When printing to a non-PostScript printer, psLevel is 0. psLevel is useful in determining whether the output device is a PostScript printer. In addition, when printing to a PostScript printer, psLevel is useful to determine the operators that can be sent in any printing code downloaded using the PDDocWillPrintDoc() , PDDocWillPrintPage() , and PDDocDidPrintPage() notifications.

 
binaryOK — 

Valid only when printing to a PostScript printer. It indicates whether binary data can be sent.

 
clientData — 

A pointer to a block of user-supplied data that was passed when the client registered for this notification using AVAppRegisterNotification() .

See Also

Notifications


File: PIPokes.h
Line: 667
PDDocWillPrintTiledPage() 
Product availability: All
Platform availability: All

Syntax

void PDDocWillPrintTiledPage(PDDoc doc, ASInt32 page, ASStm stm, ASInt32 whichTile, ASInt32 numTiles, ASFixedRect* cropRegion, PDTile tile, void* clientData)

This notification is obsolete in Acrobat 7.0 and later.

This notification is broadcast before a tiled page is printed. Tiled pages can be requested by the user from the Advanced print dialog box; clients are made aware of the selection via the tiled page notifications.

Parameters

doc — 

The document containing the tiled page.

 
page — 

The page to be printed.

 
stm — 

The PostScript print stream used when printing to a PostScript printer, and NULL when printing to a non-PostScript printer. When printing to a PostScript printer, clients can write printing commands into stm (using ASStmWrite() ) to add marks to pages before any other marks have been made.

 
whichTile — 

The sheet to be printed.

 
numTiles — 

The total number of sheets to be printed.

 
cropRegion — 

A pointer to an ASFixedRect that represents the region of the PDPage being cropped to for this sheet.

 
tile — 

The PDTile currently in use. The fields in this structure can be modified as necessary to affect tiling output.

 
clientData — 

A pointer to a block of user-supplied data that was passed when the client registered for this notification using AVAppRegisterNotification() .

See Also

Notifications


File: PIPokes.h
Line: 1849
PDDocWillRemoveThread() 
Product availability: All
Platform availability: All

Syntax

void PDDocWillRemoveThread(PDDoc doc, ASInt32 index, void* clientData)

A thread will be removed from a document.

Parameters

doc — 

The document from which a thread will be removed.

 
index — 

The index of the thread that will be removed. Use PDDocGetThread() to obtain the thread from its index.

 
clientData — 

A pointer to a block of user-supplied data that was passed when the client registered for this notification using AVAppRegisterNotification() .

See Also

Notifications


File: PIPokes.h
Line: 1133
PDDocWillReplacePages() 
Product availability: All
Platform availability: All

Syntax

void PDDocWillReplacePages(PDDoc doc, ASInt32 fromPage, ASInt32 toPage, PDDoc srcDoc, ASInt32 srcFromPage, ASInt32 srcToPage, void* clientData)

One or more pages will be replaced.

Parameters

doc — 

The document in which pages will be replaced.

 
fromPage — 

The page number (in doc) of the first page that will be replaced.

 
toPage — 

The page number (in doc) of the last page that will be replaced.

 
srcDoc — 

The document that provides the replacement pages.

 
srcFromPage — 

The page number (in srcDoc) of the first replacement page.

 
srcToPage — 

The page number (in srcDoc) of the last replacement page.

 
clientData — 

A pointer to a block of user-supplied data that was passed when the client registered for this notification using AVAppRegisterNotification() .

See Also

Notifications


File: PIPokes.h
Line: 444
PDDocWillSave() 
Product availability: All
Platform availability: All

Syntax

void PDDocWillSave(PDDoc doc, void* clientData)

A document will be saved.

The PDDocWillSave() notification takes place just before the save operation begins. At the time of a WillSave() notification, the current PDDoc is valid.

See PDDocWillSaveEx() for important information on releasing objects derived from the PDDoc before it is saved, and PDDocDidSave() for information on reacquiring objects from the PDDoc after it has been saved.

Parameters

doc — 

The document that will be saved.

 
clientData — 

A pointer to a block of user-supplied data that was passed when the client registered for this notification using AVAppRegisterNotification() .

See Also

Notifications


File: PIPokes.h
Line: 810
PDDocWillSaveEx() 
Product availability: All
Platform availability: All

Syntax

void PDDocWillSaveEx(PDDoc doc, PDDocSaveParams params, void* clientData)

A document will be saved.

The PDDocWillSaveEx() notification takes place just before the save operation begins. At the time of a PDDoc WillSaveEx() notification, the current PDDoc is valid.

At this time, clients should inspect the save flags field saveFlags in params. In the case of a full save, they should release any objects that they have acquired from the PDDoc with methods, such as PDPageRelease() . During this notification, plug-in's should also forget any PD-level or Cos-level objects that had been derived from the PDDoc; these will not be valid after the save.

See PDDocDidSave() for information on reacquiring objects from the PDDoc after it has been saved.

Parameters

doc — 

The document that will be saved.

 
params — 

The PDDocSaveParams() parameters used when saving a file using PDDocSaveWithParams() .

 
clientData — 

A pointer to a block of user-supplied data that was passed when the client registered for this notification using AVAppRegisterNotification() .

See Also

Notifications


File: PIPokes.h
Line: 1308
PDDocXAPMetadataDidChange() 
Product availability: All
Platform availability: All

Syntax

void PDDocXAPMetadataDidChange(PDDoc pdDoc, ASText newMetadata, void* clientData)

The XMP metadata describing the document as a whole has changed.

Parameters

pdDoc — 

The PDDoc whose describing XMP metadata has changed.

 
newMetadata — 

A serialized representation of the new describing XMP metadata.

 
clientData — 

A pointer to a block of user-supplied data that was passed when the client registered for this notification using AVAppRegisterNotification() .

See Also


File: PIPokes.h
Line: 2637
PDOCRegisterFindOutAutoStatePrefProc() 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

void PDOCRegisterFindOutAutoStatePrefProc(PDOCFindOutAutoStatePrefProc proc)

Registers a callback to the client user interface that can tell the core what the current AutoState preference is.

Parameters

proc


File: PDFLProcs.h
Line: 838
PDOCRegisterFindOutLanguageProc() 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

void PDOCRegisterFindOutLanguageProc(PDOCFindOutLanguageProc proc)

Registers a callback to the client user interface that can tell the core what the current language is.

Parameters

proc


File: PDFLProcs.h
Line: 828
PDOCRegisterFindOutUserProc() 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

void PDOCRegisterFindOutUserProc(PDOCFindOutUserProc proc)

Registers a callback to the client user interface that can tell the core what the current user is.

Parameters

proc


File: PDFLProcs.h
Line: 833
PDOCRegisterFindOutZoomProc() 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

void PDOCRegisterFindOutZoomProc(PDOCFindOutZoomProc proc)

Registers a callback to the client user interface that can tell the core what the current zoom level is.

Parameters

proc


File: PDFLProcs.h
Line: 823