Vanilla.PDF  2.0.0
Cross-platform toolkit for creating and modifying PDF documents
DocumentHandle Class Reference

Represents high-level file access handle. More...

Inheritance diagram for DocumentHandle:
IUnknownHandle
error_type CALLING_CONVENTION Document_Open (string_type filename, DocumentHandle **result)
 Opens a new document.
 
error_type CALLING_CONVENTION Document_OpenFile (FileHandle *holder, DocumentHandle **result)
 Opens a document using already existing file handle.
 
error_type CALLING_CONVENTION Document_Create (string_type filename, DocumentHandle **result)
 Creates a new document.
 
error_type CALLING_CONVENTION Document_CreateFile (FileHandle *holder, DocumentHandle **result)
 Creates a new document.
 
error_type CALLING_CONVENTION Document_Save (DocumentHandle *handle, string_type filename)
 Save file state into new destination.
 
error_type CALLING_CONVENTION Document_SaveFile (DocumentHandle *handle, FileHandle *file_handle)
 Save file state into new destination.
 
error_type CALLING_CONVENTION Document_SaveIncremental (DocumentHandle *handle, string_type filename)
 Save file state into new destination and create new section for all modifications done by user.
 
error_type CALLING_CONVENTION Document_SaveIncrementalFile (DocumentHandle *handle, FileHandle *file_handle)
 Save file state into new destination and create new section for all modifications done by user.
 
error_type CALLING_CONVENTION Document_GetCatalog (DocumentHandle *handle, CatalogHandle **result)
 Get document's catalog property.
 
error_type CALLING_CONVENTION Document_GetDocumentInfo (DocumentHandle *handle, DocumentInfoHandle **result)
 Get detailed document metadata.
 
error_type CALLING_CONVENTION Document_AppendDocument (DocumentHandle *handle, DocumentHandle *source)
 Append another document's contents at the end of the file.
 
error_type CALLING_CONVENTION Document_Sign (DocumentHandle *handle, FileHandle *destination, DocumentSignatureSettingsHandle *settings)
 Digitally signs the document using specified settings.
 
error_type CALLING_CONVENTION Document_AddEncryption (DocumentHandle *handle, DocumentEncryptionSettingsHandle *settings)
 Encrypt the document using the specified settings.
 
error_type CALLING_CONVENTION Document_RemoveEncryption (DocumentHandle *handle)
 Remove any existing encryption from the document.
 
error_type CALLING_CONVENTION Document_ToUnknown (DocumentHandle *handle, IUnknownHandle **result)
 Reinterpret current object as IUnknownHandle.
 
error_type CALLING_CONVENTION Document_FromUnknown (IUnknownHandle *handle, DocumentHandle **result)
 Convert IUnknownHandle to DocumentHandle.
 
error_type CALLING_CONVENTION Document_Release (DocumentHandle *handle)
 Decrement the internal reference counter.
 

Additional Inherited Members

- Public Member Functions inherited from IUnknownHandle
error_type CALLING_CONVENTION IUnknown_AddRef (IUnknownHandle *handle)
 Increment the internal reference counter.
 

Detailed Description

Represents high-level file access handle.

Examples
decrypt.c, extract.c, main.c, merge.c, sign.c, and sign_custom.c.

Friends And Related Symbol Documentation

◆ Document_Save()

error_type CALLING_CONVENTION Document_Save ( DocumentHandle * handle,
string_type filename )
related

Save file state into new destination.

Destination file will be overwritten if it exists.

◆ Document_SaveFile()

error_type CALLING_CONVENTION Document_SaveFile ( DocumentHandle * handle,
FileHandle * file_handle )
related

Save file state into new destination.

Destination file will be overwritten if it exists.

◆ Document_SaveIncremental()

error_type CALLING_CONVENTION Document_SaveIncremental ( DocumentHandle * handle,
string_type filename )
related

Save file state into new destination and create new section for all modifications done by user.

This method creates a new section with all modified objects. Whole file content preceeding new section will be preserved.

◆ Document_SaveIncrementalFile()

error_type CALLING_CONVENTION Document_SaveIncrementalFile ( DocumentHandle * handle,
FileHandle * file_handle )
related

Save file state into new destination and create new section for all modifications done by user.

This method creates a new section with all modified objects. Whole file content preceeding new section will be preserved.

◆ Document_AppendDocument()

error_type CALLING_CONVENTION Document_AppendDocument ( DocumentHandle * handle,
DocumentHandle * source )
related

Append another document's contents at the end of the file.

This appends all source document's pages beyond handle document's pages.

After pages are merged, all indirect referenced are resolved so they point to correct objects.

The last step fixes link annotations, which can be referenced by page number.

◆ Document_RemoveEncryption()

error_type CALLING_CONVENTION Document_RemoveEncryption ( DocumentHandle * handle)
related

Remove any existing encryption from the document.

The document MUST be unlocked either with password or encryption key.

See also
FileHandle::File_SetEncryptionPassword
FileHandle::File_SetEncryptionKey

◆ Document_Release()

error_type CALLING_CONVENTION Document_Release ( DocumentHandle * handle)
related

Decrement the internal reference counter.

When the internal counter reaches zero the object is deleted. Releasing already disposed object causes undefined behavior.

See also
IUnknown_Release

The documentation for this class was generated from the following file: