PDFium Component Docs

TPdfXObject class

Unit: PDFium
Lifetime wrapper for a PDFium FPDF_XOBJECT created by TPdf.CreateXObjectFromPage

Syntax

constructor Create(AHandle: FPDF_XOBJECT);
property Handle: FPDF_XOBJECT read FHandle;

Members

MemberDescription
CreateWrap an FPDF_XOBJECT handle returned by PDFium
DestroyCloses the wrapped handle before the owning destination document is closed
HandleRaw FPDF_XOBJECT value used by PDFium page-object APIs

Description

TPdfXObject represents a reusable Form XObject produced from a page in another document

The handle belongs to the destination document that created it and must be released before that destination document is closed

Use TPdf.InsertFormObjectFromXObject to place one copy of the wrapped page onto the current destination page

Example

XObject := DestinationPdf.CreateXObjectFromPage(SourcePdf, 1);
DestinationPdf.InsertFormObjectFromXObject(XObject);

See Also

TPdf.CreateXObjectFromPage, TPdf.InsertFormObjectFromXObject, TPdfMatrix