PDFium Delphi Component Docs

ImportXFDF yöntemi

Component: TPdf  ·  Unit: PDFium
XFDF (ISO 19444-1) belgesini okur ve alanları ile açıklamalarını yüklenen PDF'ye uygular

Syntax

function ImportXFDF(const FileName: string): Integer; overload;
function ImportXFDF(Stream: TStream): Integer; overload;

Description

ImportXFDF parses the XFDF XML document and applies its <fields> and <annots> sections to the currently loaded PDF.

For each <field> element, the qualified (dotted) name is matched against the widget annotations in the document and the value is written into the field's /V entry. For checkbox and radio-button fields, the supplied export value is used to select the matching on-state appearance, so the field is rendered as checked.

Açıkça boş bir <value> eşleşen alanı temizler; atlanmış bir değer alanı değiştirmeden bırakır. Derin biçimde yuvalanmış noktalı alan adları tüm hiyerarşilerini korur

For each annotation element, a new annotation is created on the page indicated by the page attribute (0-based). After creation, the importer fills in Contents, Author (title), Name (NM), Subject, ModificationDate, CreationDate, Icon, and the annotation flags from the corresponding XFDF attributes.

Returns the total number of fields and annotations processed.

Açıklama içe aktarımı RGB ve iç renkleri uygular, açıkça boş metin alanlarını korur, ondalık koordinatları işlem yerel ayarından bağımsız olarak ayrıştırır ve coords özniteliğinden her işaretleme dörtgenini geri yükler

Tarayıcı, ad alanı ön ekli öğeleri ve öznitelikleri, karışık metin ve CDATA düğümlerini, XML varlık başvurularını ve boşluk anlamı taşıyan alan veya açıklama içeriğini kabul eder; geçersiz sayısal Unicode skaler başvuruları XFDF girdisini reddeder

Atlanmış bir açıklama contents öğesi yeni açıklamanın içeriğini yok bırakır; açıkça boş bir öğe ise boş bir değer yazar

The rect attribute is mandatory for every annotation: if it is missing, the annotation is skipped rather than created with a zero-size rectangle.

Parsing is performed by a hand-written XML scanner rather than a full XML DOM, so ImportXFDF introduces no XML DOM dependency.

Remarks

Example

// Import field values and annotations from an .xfdf file
Imported := Pdf1.ImportXFDF('C:\Data\form.xfdf');
Pdf1.SaveAs('C:\Data\form_filled.pdf');

See Also

ExportXFDF, CreateAnnotation, Annotation, FormFieldInfo