Unfortunately PDF.js Express does not support merging annotations directly into the PDF yet. The document and XFDF would have to be saved separately, and then when the user re-opens the document, you would have to import the XFDF using the importAnnotations API.
However, we will be releasing a REST API service very shortly that can merge the XFDF directly into the PDF. When it is released, we will post an announcement in the Announcements category.
How to save it. Separately. I am using webviewer and on submiting form. Blob is posted but not with the markups i have done on pdf with markup. Can u share me code to save blob using pdf js express
The data will be posted with content type multipart/form-data, and the file property will be posted as binary data, so you will have to handle that on your server.
PDF.js Express cannot save the XFDF into the PDF without using the API.
If you need this functionality client side, you can try out our sister product, PDFTron Webviewer. It has this functionality natively, pure client side.
Right now you need an active PDF.js Express license to use the API. We may change this in the future though to allow testing without an active license.
There are 2 services in play here. PDF.js Express Webviewer (which you have been trialing), and the PDF.js Express REST API.
To use PDF.js Express Webviewer in production, you must purchase a license which costs $4500 a year. This is non refundable.
After you purchase a PDF.js Express WebViewer license, you may sign up for the API. The API will charge you credit card every month based on usage. So if every month you use under 500 api calls, your credit card will never be charged.