> For the complete documentation index, see [llms.txt](https://docs.apryse.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.apryse.com/web/get-started/faq/annotation-xfdf-import.md).

# Why does my XFDF not get imported into WebViewer?

World's #1 PDF SDK Library for Web, Mobile, Server, Desktop

There are several possible reasons WebViewer may fail to import an XFDF. As a first step, please open the **developer console** and check any **warnings** or **error messages** as it will give you additional information on the error.

* \*\*Invalid or Malformed XFDF \*\*If the XFDF string is not well-formed XML or does not follow the [XFDF specification,](/web/annotation/xfdf.md) WebViewer may fail to import it.
* \*\*Custom Annotation Types Not Registered \*\*If your XFDF includes custom annotation types (elements not in the PDF specification), WebViewer needs to have the corresponding custom annotation class registered. Otherwise, the annotation may not load or render properly.
* \*\*Missing Appearance Streams \*\*By default, WebViewer exports appearance streams as references. If you import XFDF into a different document, these references may not exist, causing annotations to not display. Use the `generateInlineAppearances: true` option when exporting to include full appearance data. [Learn more about exporting inline appearances.](/web/annotation/export-inline-appearances.md)
* \*\*Custom Data Not Serialized \*\*If you have custom properties (e.g., for custom annotations), ensure you override the `serialize` and `deserialize` methods to include this data in the XFDF. Otherwise, important properties may be lost on import. [Learn more about annotation serialization.](/web/annotation/customize/customize-serialization.md)
* \*\*Annotations Placed on Nonexistent Pages \*\*If the XFDF references pages that do not exist in the loaded PDF, the annotations will not appear.
* \*\*Unsupported or Incorrect Annotation Types \*\*Using annotation types not supported by WebViewer or with incorrect attributes may prevent them from importing.
* \*\*Incorrect Import Method \*\*Using low-level PDF APIs (like `fdfUpdate`) does not trigger redraws in WebViewer. Use the appropriate WebViewer `importAnnotations` API. [Import & Export Annotations Guide](/web/annotation/import-export.md)
* \*\*Widget/Field Annotations Not Imported Correctly \*\*Widget and form field annotations may require additional form field data or specific import workflows. Ensure you are using the appropriate APIs and the latest WebViewer version.
* \*\*Custom Appearances \*\*Custom appearances (beyond standard annotation appearances) may not be exported inline and thus may not import as expected. [See Custom Appearances Guide](/web/annotation/custom-appearances.md#custom-appearances-with-xfdf)
* \*\*XFDF Imported Before the Document Is Ready \*\*If annotations are loaded from a server when the document opens, using importAnnotations() can sometimes lead to timing issues if the XFDF is imported before the document is fully ready. For annotations that should be loaded automatically with the document, we recommend using `setDocumentXFDFRetriever`. [See XFDF Import Guide](/web/annotation/import-export.md#import-xfdf)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.apryse.com/web/get-started/faq/annotation-xfdf-import.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
