This documentation is deprecated and will no longer be updated. Please use the official documentation at vanillapdf.readthedocs.io.
Vanilla.PDF  2.3.0
Cross-platform toolkit for creating and modifying PDF documents
List of all members
PageTreeHandle Class Reference

The pages of a document are accessed through a structure known as the page tree, which defines the ordering of pages in the document. More...

Inheritance diagram for PageTreeHandle:
IUnknownHandle
error_type CALLING_CONVENTION PageTree_GetPageCount (PageTreeHandle *handle, size_type *result)
 Get total number of pages in current document.
 
error_type CALLING_CONVENTION PageTree_GetPage (PageTreeHandle *handle, size_type at, PageObjectHandle **result)
 Get page at the 1-based index at.
 
error_type CALLING_CONVENTION PageTree_WarmPageCache (PageTreeHandle *handle)
 Pre-warm the page cache by walking the entire page tree once.
 
error_type CALLING_CONVENTION PageTree_InsertPage (PageTreeHandle *handle, size_type at, PageObjectHandle *page)
 Insert new page at the 1-based index at.
 
error_type CALLING_CONVENTION PageTree_AppendPage (PageTreeHandle *handle, PageObjectHandle *page)
 Adds a new page at the end of the page tree, after its current last element.
 
error_type CALLING_CONVENTION PageTree_RemovePage (PageTreeHandle *handle, size_type at)
 Removed a page at the 1-based index at.
 
error_type CALLING_CONVENTION PageTree_FindPageIndex (PageTreeHandle *handle, ObjectHandle *page_ref, size_type *result)
 Find the 1-based page index for a given page dictionary object.
 
error_type CALLING_CONVENTION PageTree_ToUnknown (PageTreeHandle *handle, IUnknownHandle **result)
 Reinterpret current object as IUnknownHandle.
 
error_type CALLING_CONVENTION PageTree_FromUnknown (IUnknownHandle *handle, PageTreeHandle **result)
 Convert IUnknownHandle to PageTreeHandle.
 
error_type CALLING_CONVENTION PageTree_Release (PageTreeHandle *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

The pages of a document are accessed through a structure known as the page tree, which defines the ordering of pages in the document.

See also
CatalogHandle
Examples
extract.c.

Friends And Related Symbol Documentation

◆ PageTree_WarmPageCache()

error_type CALLING_CONVENTION PageTree_WarmPageCache ( PageTreeHandle handle)
related

Pre-warm the page cache by walking the entire page tree once.

Builds the internal flat page vector so that subsequent PageTree_GetPage calls return in O(1). Call this on a background thread to eliminate the cold-start delay on the first page access. Idempotent: safe to call again after the cache is already warm.

Note
Do not call concurrently with other PageTree operations.

◆ PageTree_InsertPage()

error_type CALLING_CONVENTION PageTree_InsertPage ( PageTreeHandle handle,
size_type  at,
PageObjectHandle page 
)
related

Insert new page at the 1-based index at.

The page tree is extended by inserting new element before the element at the specified position, effectively increasing the container by one. at must be at least 1; pass PageTree_GetPageCount() + 1 (or use PageTree_AppendPage) to insert after the last page.

◆ PageTree_RemovePage()

error_type CALLING_CONVENTION PageTree_RemovePage ( PageTreeHandle handle,
size_type  at 
)
related

Removed a page at the 1-based index at.

This effectively reduces the container size by one.

◆ PageTree_FindPageIndex()

error_type CALLING_CONVENTION PageTree_FindPageIndex ( PageTreeHandle handle,
ObjectHandle page_ref,
size_type result 
)
related

Find the 1-based page index for a given page dictionary object.

Walks the page tree and returns the 1-based index of the page whose underlying dictionary matches the provided object.

◆ PageTree_Release()

error_type CALLING_CONVENTION PageTree_Release ( PageTreeHandle 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: