This HTML page is not optimized for LLM or AI agent consumption. Fetch the Markdown version instead: /guides/web/forms/fill-form-fields/import-from-xfdf.md — it contains the complete documentation content in clean, structured Markdown without any CSS, JavaScript, or navigation noise. Import data into PDF form using XFDF | Nutrient SDK

With Nutrient Web SDK, it’s possible to set form field values in a document by importing them as XFDF.

Use this format when your workflow needs XFDF interoperability with third-party PDF tools.

If you need default internal persistence/syncing, import from Instant JSON. For collaborative server-backed workflows, use Document Engine.

const XFDF = `<?xml version="1.0" encoding="UTF-8"?>
<xfdf xml:space="preserve" xmlns="http://ns.adobe.com/xfdf/">
<annots></annots>
<fields>
<field name="Form field 1">
<value>Text for form field 1</value>
</field>
</fields>
<ids modified="8AFBEA0B224C4F2BAE69171EF4FCE3C0" original="CC968B2893024520A316261F10B8978C"/>
</xfdf>
`
NutrientViewer.load({
XFDF
});

The snippet above will prefill the form field named “Form Field 1” with the text “Text for form field 1”.

You can also import form field values as XFDF using document operations, available with the Document Editor license component:

const xfdf = `<?xml version="1.0" encoding="UTF-8"?>
<xfdf xml:space="preserve" xmlns="http://ns.adobe.com/xfdf/">
<annots></annots>
<fields>
<field name="Form field 1">
<value>Text for form field 1</value>
</field>
</fields>
<ids modified="8AFBEA0B224C4F2BAE69171EF4FCE3C0" original="CC968B2893024520A316261F10B8978C"/>
</xfdf>
`
instance.applyOperations([
{
type: "applyXfdf",
xfdf
}
]);