Merging XFDF using the Express REST API length exceeded error

So the issue actually isn’t with the server like I thought. PDF.js Express can not import annotations baked into a document, and instead just renders these annotations as flattened bitmaps. There seems to be a regression here where this is not working all the time, which is why the merged annotations do not show up.

In order to load annotations, you need to use the importAnnotations API and provide the XFDF (which can be retrieved either from your database, or our /extract endpoint).

Right now your flow is a bit strange because you are merging annotations into a document and then directly reopening it (meaning it would flatten the merged annots).

We will look into this annotation rendering regression ASAP, but for now we recommend that the /merge endpoint only be used when delivering the document to the user (via download etc).

Let me know if there are any more questions.

Thanks,
Logan