Storing annotation data

Depending on how you implement annotation synchronization, the storage of annotation data is managed differently.

When Using Web Server-Backed without Instant Sync

When using Web Server-Backed without Instant synchronization, annotation and form data is automatically stored as Instant JSON separate from the underlying PDF document. No additional work is required.

When Using Web Server-Backed with Instant Sync

When using Web Server-Backed with PSPDFKit Instant, annotation and form data is automatically stored on Document Engine as Instant JSON, separate from the underlying PDF document. No additional work is required.

When Building Your Own Solution

We recommend storing annotation and form data separately from the underlying PDF document. By storing the data separately, you’ll only need to sync the annotation and form data to your backend, as opposed to transferring the entire PDF. Your backend can store this data as a flat file or in a database.

Separating annotations and form data from the underlying document

Separating the annotation and form data from the underlying PDF document has the following advantages:

  • Reduced bandwidth: The PDF document is downloaded once, while smaller chunks of annotation data are synchronized to/from your server, as opposed to the entire PDF. See our Stop Wasting Bandwidth with PDFs — Transfer Changes with Instant JSON blog to learn more.

  • Reduced storage: A single version of a PDF document can be stored on your servers, with annotations and form data stored separately.

  • Improved performance: Instead of updating and synchronizing the entire PDF document, it’s faster to create, edit, and synchronize smaller data files.

PSPDFKit supports importing and exporting XFDF (XML Forms Data Format) and Instant JSON. You can read more about these formats, along with their benefits and drawbacks, in our annotation data formats guide. See how to import and export XFDF or Instant JSON.

˛˛