THotPDF.ImportSVGFormXObject

Imports bounded SVG 2 content into one reusable vector Form XObject and returns its document resource name

Declaration

function ImportSVGFormXObject(const Input: TBytes): AnsiString; overload;
function ImportSVGFormXObject(const Input: TBytes;
  out Statistics: THPDFSVGImportStatistics): AnsiString; overload;

Description

The overload with Statistics reports parsed nodes, CSS rules, gradients, gradient strokes, masks, embedded images, links, text runs, isolated opacity groups through GroupCount, and combined main, pattern, mask, and group operator bytes

Unicode text uses embedded font subsets, the configured fallback chains, actual glyph advances for anchoring, and one shared alphabetic baseline across fallback fonts

Embedded Base64 PNG and JPEG images, gradient stroke patterns, and Alpha or Luminosity soft masks are registered together with the reusable Form resources; transparent resources require PDF 1.4 and are rejected by PDF/A-1 strict output

Object and group opacity composite complete node content inside isolated vector transparency Forms, preserve independent fill/stroke alpha, and retain nested transforms, clipping, masks, and fragment-instance styles within the supported profile

Solid and gradient strokes retain inherited dash arrays, offsets, and miter limits; odd arrays repeat, all-zero arrays become solid, and percentages use the normalized viewport diagonal under bounded parsing and native dash rendering

The method returns an empty string when parsing, validation, security checks, or resource registration fails

Call the method after BeginDoc, then pass the returned name to THPDFPage.DrawSVGFormXObject as many times as required

See also: SVG Form XObject Import, THPDFPage.DrawSVGFormXObject