HPDFRenderHeadlessPagePNG
function HPDFRenderHeadlessPagePNG(const Access: THPDFHeadlessRenderAccess;
Destination: TStream; const Options: THPDFHeadlessRenderOptions):
THPDFHeadlessRenderResult;
Declared in HPDFHeadlessCairoDevice; renders one borrowed loaded page to an RGB PNG on a white image surface
Access must provide valid page/resources and object, stream, font, and permission callbacks; the document and its optional cancellation token remain caller-owned and must stay alive and unchanged for the call
Destination is a required caller-owned writable stream; the function writes at its current position and neither closes nor clears it
Rendering, budget validation, and PNG encoding finish in private storage before destination writes begin, so those failures preserve existing destination bytes
A final destination I/O failure can leave bytes accepted by the stream; use the file overload when atomic file publication is required
Options control scale, appearances, and resource limits; returned counters describe the successful render
Version 2.1149.7 accepts larger valid calculator shading functions within the configured token and memory budgets, including a complete generated periodic color function above 214000 lexical tokens. Budget failures still occur before destination publication, and previously working short functions retain their output
See Native Linux Cairo renderer for dependencies, supported content, conservative font admission, and failure boundaries
Repeated triangle-mesh Forms can reuse normally decoded bytes and skip certified invisible work within the existing resource limits
An unrepresentable final Form count raises a render error before PNG output publication; temporary replay counters use wider private bookkeeping without changing the public result record
Supported annotations without a normal appearance use temporary annotation appearances without modifying the source graph