THPDFHeadlessRenderAccess
The record in HPDFHeadlessRenderAccess is returned by THPDFHeadlessDocument.GetRenderAccess(PageIndex) for serial read-only access to the current document graph
The owning document must stay loaded and unchanged throughout use; pointers, resource dictionaries and callback results are borrowed, and callers must not free or mutate them
| Field | Contract |
|---|---|
Context | Opaque document pointer passed unchanged to every callback |
PageDictionary, PageResources | Resolved page dictionary and inherited resource dictionary |
Resolve: THPDFHeadlessRenderResolve | Resolves a borrowed object through the existing xref, object-stream and security paths |
ReadStream: THPDFHeadlessRenderReadStream | Returns decoded bytes with the supplied maximum applied before decoding, capped by the document budget |
ReadImageBytes: THPDFHeadlessRenderReadImage | Authenticates and decrypts an image stream, decodes bounded prefix filters and returns either decoded samples or the final JPEG, JPEG 2000, CCITT or JBIG2 payload together with its terminal filter name and borrowed DecodeParms dictionary |
FontResolver: THPDFHeadlessRenderFontResolver | Creates an interface to the existing resource font decoder |
RequireExtractionPermission: THPDFHeadlessRenderPermission | Checks cancellation and authenticated extraction permission |
RequireOutputPath: THPDFHeadlessRenderOutputPath | Checks cancellation and rejects source aliases by canonical path and physical file identity without creating a file |
CancellationToken | Borrowed caller-owned document cancellation token |
MaxDecodedBytes, MaxDepth | Upper bounds inherited from document options |
CatalogDictionary: THPDFDictionaryObject lends the resolved catalog for optional-content configuration; a nil value means no catalog was supplied and optional-content structures have no visibility effect
ResolveOptional: THPDFHeadlessRenderResolve resolves optional group memberships and returns nil for missing, deleted or stale-generation references; valid live objects retain normal parsing, object-stream, security, cancellation and depth checks, and their errors propagate
Initialise manually assembled access records with Default(THPDFHeadlessRenderAccess) before assigning callbacks; a nil ResolveOptional uses the ordinary resolver, and a nil catalog keeps rendering without optional-content configuration
Output renderers must call RequireOutputPath(Context, FileName) before creating a file and apply their own staging, publication and destination budget policies
Lifetime: IHPDFHeadlessRenderLifetime retains a graph-lifetime lease; nil remains valid for static rendering, whilst explicit viewer states require a valid lease and reject expired access before invoking callbacks
A view is invalid after the owning document is closed, reloaded, modified or destroyed