PDFium Delphi 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 document is closed

Use TPdf.InsertFormObjectFromXObject to place a copy of the wrapped page on the current destination page

Example

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

See Also

TPdf.CreateXObjectFromPage, TPdf.InsertFormObjectFromXObject, TPdfMatrix