PDFix SDK  7.2.0
Loading...
Searching...
No Matches
Callbacks

Typedefs

typedef int(* PdfCancelProc) (void *client_data)
 PdfCancelProc. More...
 
typedef void(* PdfEventProc) (void *client_data)
 PdfEventProc. More...
 
typedef void(* PdsObjectEventProc) (PdsObject *obj, PdfEventType event, const wchar_t *key, int index, void *client_data)
 PdsObjectEventProc. More...
 
typedef void(* PdsContentEventProc) (PdsContent *content, PdfEventType event, void *client_data)
 PdsContentEventProc. More...
 
typedef void(* PdsPageObjectEventProc) (PdsPageObject *page_object, PdfEventType event, void *client_data)
 PdsPageObjectEventProc. More...
 
typedef unsigned long(* PdfDigestDataProc) (int buffer_count, const unsigned char *buffer_to_sign[], unsigned long buffer_size[], unsigned char *sign_buff, unsigned long sign_buff_size, void *client_data)
 PdfDigestDataProc. More...
 
typedef int(* PsStreamReadProc) (int offset, void *buffer, int size, void *client_data)
 
typedef int(* PsStreamWriteProc) (int offset, void *buffer, int size, void *client_data)
 
typedef void(* PsStreamDestroyProc) (void *client_data)
 Called at end of stream so you can do clean up and free allocated memory. More...
 
typedef int(* PsStreamGetSizeProc) (void *client_data)
 
typedef int(* PsStreamGetPosProc) (void *client_data)
 This is called to get the current position. More...
 
typedef void(* PdfSecurityDestroyProc) (void *client_data)
 This is called when security handler is destroyed. More...
 
typedef bool(* PdfSecuritySetAuthorizationDataProc) (void *data, void *client_data)
 This is called when PdfCustomSecurityHandler::SetAuthorizationData procedure is executed. More...
 
typedef bool(* PdfSecurityOnInitProc) (const PdsDictionary *trailer, void *client_data)
 This is called when the document is authorized. More...
 
typedef int(* PdfSecurityGetPermissionsProc) (void *client_data)
 This is called to get the permissions set to the current document. More...
 
typedef bool(* PdfSecurityIsMetadataEncryptedProc) (void *client_data)
 This is called to get whether to encrypt metadata dictionary or not. More...
 
typedef void(* PdfSecurityUpdateEncryptDictProc) (PdsDictionary *encrypt_dict, const PdsArray *id_array, void *client_data)
 This is called on document save when encryption dictionary is filled or just updated. More...
 
typedef bool(* PdfSecurityAuthorizeOwnerProc) (void *client_data)
 This is called when user wants to authorize owner of the document. see PdfDoc::Authorize. More...
 
typedef int(* PdfSecurityGetDecryptSizeProc) (const void *data, int size, void *client_data)
 This is called to get the size of decrypted data. More...
 
typedef int(* PdfSecurityDecryptContentProc) (int objnum, int gennum, const void *data, int data_size, void *dest, int dest_size, void *client_data)
 This is called to decrypt the data. More...
 
typedef int(* PdfSecurityGetEncryptSizeProc) (const void *data, int size, void *client_data)
 This is called to get the size of encrypted data. More...
 
typedef int(* PdfSecurityEncryptContentProc) (int objnum, int gennum, const void *data, int data_size, void *dest, int dest_size, void *client_data)
 This is called to encryp the data. More...
 
typedef bool(* PdfGetAuthDataProc) (PdfDoc *doc, PdfSecurityHandler *handler, void *client_data)
 This is called to get the authorization data and set it to the handler. More...
 
typedef PdfSecurityHandler *(* PdfSecurityCreateHandlerProc) (void *client_data)
 This is called when the document is authozied to create registered security handler. More...
 
typedef bool(* PdfAnnotHandlerCanCopyProc) (PdfAnnot *annot)
 This is called to know if the copy operation is expected to succeed. More...
 
typedef void *(* PdfAnnotHandlerCopyProc) (PdfAnnot *annot)
 This is called to copy data from the annotation object to a new clipboard structure. More...
 
typedef bool(* PdfAnnotHandlerCanPasteProc) (PdfPage *dest_page, const PdfPoint *center, void *client_data)
 This is called to know if the paste operation is expected to succeed. More...
 
typedef PdfAnnot *(* PdfAnnotHandlerPasteProc) (PdfPage *dest_page, const PdfPoint *center, void *client_data)
 
typedef bool(* PdfAnnotHandlerDestroyDataProc) (void *client_data)
 This is called to destroy annotation clipboard data created by copy procedure. More...
 
typedef void(* PdfAnnotHandlerDestroyProc) ()
 This is called when the annotation handler is being destroyed.
 
typedef bool(* PdfActionHandlerCanCopyProc) (PdfAction *action)
 This is called to know if the copy operation is expected to succeed. More...
 
typedef void *(* PdfActionHandlerCopyProc) (PdfAction *action)
 This is called to copy data from the action object to a new clipboard structure. More...
 
typedef bool(* PdfActionHandlerCanPasteProc) (PdfDoc *dest_doc, void *client_data)
 This is called to know if the paste operation is expected to succeed. More...
 
typedef PdfAction *(* PdfActionHandlerPasteProc) (PdfDoc *dest_doc, void *client_data)
 This is called to paste action clipboard data to the destination document. More...
 
typedef bool(* PdfActionHandlerDestroyDataProc) (void *client_data)
 This is called to destroy action clipboard data created by copy procedure. More...
 
typedef void(* PdfActionHandlerDestroyProc) ()
 This is called to when the action handler is being destroyed.
 
typedef PdfEnumResultType(* PdfAnnotEnumProc) (PdfPage *page, PdfAnnot *annot, void *client_data)
 This is called to destroy action clipboard data created by copy procedure. More...
 
typedef PdfEnumResultType(* PdfPageObjectEnumProc) (PdfPage *page, PdsPageObject *object, void *client_data)
 This is called to destroy action clipboard data created by copy procedure. More...
 
typedef PdfEnumResultType(* PdfStructElemEnumProc) (PdfDoc *doc, PdsStructElement *parent_elem, int index, void *client_data)
 This is called to destroy action clipboard data created by copy procedure. More...
 

Detailed Description

PDFix SDK Callbacks.

Typedef Documentation

◆ PdfActionHandlerCanCopyProc

typedef bool(* PdfActionHandlerCanCopyProc) (PdfAction *action)

This is called to know if the copy operation is expected to succeed.

Parameters
actionThe action object.
Returns
true if the action can be copied, false if it cannot.

◆ PdfActionHandlerCanPasteProc

typedef bool(* PdfActionHandlerCanPasteProc) (PdfDoc *dest_doc, void *client_data)

This is called to know if the paste operation is expected to succeed.

Parameters
dest_docThe destination document.
client_dataThe action data to test.
Returns
true if the action can be pasted, false otherwise.

◆ PdfActionHandlerCopyProc

typedef void *(* PdfActionHandlerCopyProc) (PdfAction *action)

This is called to copy data from the action object to a new clipboard structure.

Parameters
actionThe action object.
Returns
clipboard structure containing the copied data.

◆ PdfActionHandlerDestroyDataProc

typedef bool(* PdfActionHandlerDestroyDataProc) (void *client_data)

This is called to destroy action clipboard data created by copy procedure.

Parameters
client_data
Returns
true if succeed, false otherwise.

◆ PdfActionHandlerPasteProc

typedef PdfAction *(* PdfActionHandlerPasteProc) (PdfDoc *dest_doc, void *client_data)

This is called to paste action clipboard data to the destination document.

Parameters
dest_docThe destination document.
client_dataThe action data to paste.
Returns
new action object containing the pasted data and associated with the document.

◆ PdfAnnotEnumProc

typedef PdfEnumResultType(* PdfAnnotEnumProc) (PdfPage *page, PdfAnnot *annot, void *client_data)

This is called to destroy action clipboard data created by copy procedure.

Parameters
client_data
Returns
true if succeed, false otherwise.

◆ PdfAnnotHandlerCanCopyProc

typedef bool(* PdfAnnotHandlerCanCopyProc) (PdfAnnot *annot)

This is called to know if the copy operation is expected to succeed.

Parameters
annotThe annotation object.
Returns
true if the annotation can be copied, false if it cannot.

◆ PdfAnnotHandlerCanPasteProc

typedef bool(* PdfAnnotHandlerCanPasteProc) (PdfPage *dest_page, const PdfPoint *center, void *client_data)

This is called to know if the paste operation is expected to succeed.

Parameters
dest_pageThe page to which the annotation would be pasted.
centerThe location for the center of the annotation on the destination page.
client_dataThe copied annotation data to test.
Returns
true if the annotation can be pasted, false otherwise.a);

◆ PdfAnnotHandlerCopyProc

typedef void *(* PdfAnnotHandlerCopyProc) (PdfAnnot *annot)

This is called to copy data from the annotation object to a new clipboard structure.

Parameters
annotThe annotation object.
Returns
clipboard structure containing the copied data.

◆ PdfAnnotHandlerDestroyDataProc

typedef bool(* PdfAnnotHandlerDestroyDataProc) (void *client_data)

This is called to destroy annotation clipboard data created by copy procedure.

Parameters
client_dataThe clipborad annotation data to be deleted.
Returns
true if succeed, false otherwise.

◆ PdfAnnotHandlerPasteProc

typedef PdfAnnot *(* PdfAnnotHandlerPasteProc) (PdfPage *dest_page, const PdfPoint *center, void *client_data)

This is called to paste annotation clipboard data to the destination page aligned to the center point.

Parameters
dest_pageThe page to which the annotation is pasted.
centerThe location for the center of the annotation on the destination page.
client_dataThe copied annotation data to paste.
Returns
new annotation object associated with the page's document.

◆ PdfCancelProc

typedef int(* PdfCancelProc) (void *client_data)

PdfCancelProc.

\proc_type the name of procedure currently executed. \proc_progress the name of procedure currently executed.

Parameters
client_dataPointer to user-supplied data to pass to PdfCancelProc each time it is called.
Returns
true if process should be cancelled, false otherwise.

◆ PdfDigestDataProc

typedef unsigned long(* PdfDigestDataProc) (int buffer_count, const unsigned char *buffer_to_sign[], unsigned long buffer_size[], unsigned char *sign_buff, unsigned long sign_buff_size, void *client_data)

PdfDigestDataProc.

Parameters
buffer_count
buffer_to_sign
buffer_size
sign_buff(filled by method) If the buffer is null function returns required length of the buffer.
sign_buff_sizeLength of a signed buffer.
client_dataPointer to user-supplied data to pass to PdfDigestDataProc each time it is called.
Returns
Required lenght.
See also
PdfCustomDigSig::RegisterDigestDataLenProc

◆ PdfEventProc

typedef void(* PdfEventProc) (void *client_data)

PdfEventProc.

Parameters
client_dataPointer to user-supplied data to pass to PdfEventProc each time it is called.
See also
Pdfix::RegisterEvent

◆ PdfGetAuthDataProc

typedef bool(* PdfGetAuthDataProc) (PdfDoc *doc, PdfSecurityHandler *handler, void *client_data)

This is called to get the authorization data and set it to the handler.

Parameters
doccurrent pdf document
handlersecurity handler
client_dataUser-supplied data.
Returns
true if data aquisition was successfull, false otherwise

◆ PdfPageObjectEnumProc

typedef PdfEnumResultType(* PdfPageObjectEnumProc) (PdfPage *page, PdsPageObject *object, void *client_data)

This is called to destroy action clipboard data created by copy procedure.

Parameters
client_data
Returns
true if succeed, false otherwise.

◆ PdfSecurityAuthorizeOwnerProc

typedef bool(* PdfSecurityAuthorizeOwnerProc) (void *client_data)

This is called when user wants to authorize owner of the document. see PdfDoc::Authorize.

Parameters
client_dataUser-supplied data that was passed.

◆ PdfSecurityCreateHandlerProc

typedef PdfSecurityHandler *(* PdfSecurityCreateHandlerProc) (void *client_data)

This is called when the document is authozied to create registered security handler.

Parameters
client_dataUser-supplied data that was passed.
Returns
new instance security handler

◆ PdfSecurityDecryptContentProc

typedef int(* PdfSecurityDecryptContentProc) (int objnum, int gennum, const void *data, int data_size, void *dest, int dest_size, void *client_data)

This is called to decrypt the data.

Parameters
objnumObject number
gennumGeneration number
datadata to decrypt
data_sizesize ot the data to decrypt
destoutput data
dest_sizesize of the output data
client_dataUser-supplied data that was passed.
Returns
size of the decrypted data

◆ PdfSecurityDestroyProc

typedef void(* PdfSecurityDestroyProc) (void *client_data)

This is called when security handler is destroyed.

Parameters
client_dataUser-supplied data that was passed.

◆ PdfSecurityEncryptContentProc

typedef int(* PdfSecurityEncryptContentProc) (int objnum, int gennum, const void *data, int data_size, void *dest, int dest_size, void *client_data)

This is called to encryp the data.

Parameters
objnumObject number
gennumGeneration number
datadata to encrypt
data_sizesize ot the data to encrypt
destoutput data
dest_sizesize of the output data
client_dataUser-supplied data that was passed.
Returns
size of the encrypted data

◆ PdfSecurityGetDecryptSizeProc

typedef int(* PdfSecurityGetDecryptSizeProc) (const void *data, int size, void *client_data)

This is called to get the size of decrypted data.

Parameters
datadata to decrypt
sizesize of the data
client_dataUser-supplied data that was passed.
Returns
size of the decrypted data

◆ PdfSecurityGetEncryptSizeProc

typedef int(* PdfSecurityGetEncryptSizeProc) (const void *data, int size, void *client_data)

This is called to get the size of encrypted data.

Parameters
datadata to encrypt
sizesize of the data
client_dataUser-supplied data that was passed.
Returns
size of the encrypted data

◆ PdfSecurityGetPermissionsProc

typedef int(* PdfSecurityGetPermissionsProc) (void *client_data)

This is called to get the permissions set to the current document.

Parameters
client_dataUser-supplied data that was passed.
Returns
permission flags

◆ PdfSecurityIsMetadataEncryptedProc

typedef bool(* PdfSecurityIsMetadataEncryptedProc) (void *client_data)

This is called to get whether to encrypt metadata dictionary or not.

Parameters
client_dataUser-supplied data that was passed.
Returns
if metadata will be encrypted

◆ PdfSecurityOnInitProc

typedef bool(* PdfSecurityOnInitProc) (const PdsDictionary *trailer, void *client_data)

This is called when the document is authorized.

Parameters
trailerdocument trailer dictionary
client_dataUser-supplied data that was passed.
Returns
initialization procedure was successfull

◆ PdfSecuritySetAuthorizationDataProc

typedef bool(* PdfSecuritySetAuthorizationDataProc) (void *data, void *client_data)

This is called when PdfCustomSecurityHandler::SetAuthorizationData procedure is executed.

Parameters
datacurrent pdf document
client_dataUser-supplied data that was passed.
Returns
procedure was successfull

◆ PdfSecurityUpdateEncryptDictProc

typedef void(* PdfSecurityUpdateEncryptDictProc) (PdsDictionary *encrypt_dict, const PdsArray *id_array, void *client_data)

This is called on document save when encryption dictionary is filled or just updated.

Parameters
encrypt_dictraw pointer to document's encryption dictionary
id_arrayraw pointer to document's ID array
client_dataUser-supplied data that was passed.

◆ PdfStructElemEnumProc

typedef PdfEnumResultType(* PdfStructElemEnumProc) (PdfDoc *doc, PdsStructElement *parent_elem, int index, void *client_data)

This is called to destroy action clipboard data created by copy procedure.

Parameters
client_data
Returns
true if succeed, false otherwise.
Parameters
indexparent struct element
client_dataindex of child in structElem array

◆ PdsContentEventProc

typedef void(* PdsContentEventProc) (PdsContent *content, PdfEventType event, void *client_data)

PdsContentEventProc.

Parameters
objobject on which the event occurs
eventthe event type
client_dataPointer to user-supplied data to pass to PdfEventProc each time it is called.

◆ PdsObjectEventProc

typedef void(* PdsObjectEventProc) (PdsObject *obj, PdfEventType event, const wchar_t *key, int index, void *client_data)

PdsObjectEventProc.

Parameters
objobject on which the event occurs
eventthe event type
keythe changed key (applicable to PdsDictionary)
indexthe changed index (applicable to PdsArray)
client_dataPointer to user-supplied data to pass to PdfEventProc each time it is called.

◆ PdsPageObjectEventProc

typedef void(* PdsPageObjectEventProc) (PdsPageObject *page_object, PdfEventType event, void *client_data)

PdsPageObjectEventProc.

Parameters
objobject on which the event occurs
eventthe event type
client_dataPointer to user-supplied data to pass to PdfEventProc each time it is called.

◆ PsStreamDestroyProc

typedef void(* PsStreamDestroyProc) (void *client_data)

Called at end of stream so you can do clean up and free allocated memory.

Parameters
client_dataUser-supplied data that was passed.

◆ PsStreamGetPosProc

typedef int(* PsStreamGetPosProc) (void *client_data)

This is called to get the current position.

Parameters
client_dataUser-supplied data that was passed.
Returns
The size of the stream in bytes.

◆ PsStreamGetSizeProc

typedef int(* PsStreamGetSizeProc) (void *client_data)

This is called to get the length of the stream, which may be NULL if the stream cannot be set to a new position. PsStreamSeekProc() and PsStreamGetLength() must be provided together.

Parameters
client_dataUser-supplied data that was passed.
Returns
The size of the stream in bytes.

◆ PsStreamReadProc

typedef int(* PsStreamReadProc) (int offset, void *buffer, int size, void *client_data)

Called by the PsStream object for Read operation. This procedure must return the number of bytes specified by size, obtaining them in any way it wishes. If your procedure reads data from a file, it is generally quite inefficient to open the file, read the bytes, then close the file each time bytes are requested. Instead, consider opening the file the first time bytes are requested from it, reading the entire file into a secondary buffer, and closing the file.When subsequent requests for data from the file are received, simply copy data from the secondary buffer, rather than re - opening the file.

Parameters
bufferBuffer into which your procedure must place the number of bytes specified by size.
offsetThe seek position.
sizeThe size of data in bytes.
client_dataUser-supplied data that was passed.
Returns
The number of bytes actually read or written.

◆ PsStreamWriteProc

typedef int(* PsStreamWriteProc) (int offset, void *buffer, int size, void *client_data)

Called by the PsStream object for Write operation. This procedure must return the number of bytes specified by size, obtaining them in any way it wishes. If your procedure reads data from a file, it is generally quite inefficient to open the file, read the bytes, then close the file each time bytes are requested. Instead, consider opening the file the first time bytes are requested from it, reading the entire file into a secondary buffer, and closing the file.When subsequent requests for data from the file are received, simply copy data from the secondary buffer, rather than re - opening the file.

Parameters
bufferBuffer which your procedure must place the number of bytes specified by size.
offsetThe seek position.
sizeThe size of data in bytes.
client_dataUser-supplied data that was passed.
Returns
The number of bytes actually read or written.