Problem with big pdfs PayloadTooLargeError: request entity too large

Which product are you using?
PDF.js Express Plus

PDF.js Express Version

Detailed description of issue
When i use a pdf document bigger (3 or 4 Mb) the first time that i save annotations in a database i retrieve the error PayloadTooLargeError: request entity too large and the annotation don’t save.

Does your issue happen with every document, or just one?
Every big document

In other topic you’re sugerence it’s about my server config, but i don’t know what’s the configuration that i need to change to use big pdfs with my saveAnnotations script that works perfect with small pdfs (less than 2Mb).
I test diferents servers for charge the document pdf but the problem it’s the same.
Any sugestion?

Hello, I’m Ron, an automated tech support bot :robot:

While you wait for one of our customer support representatives to get back to you, please check out some of these documentation pages:


Hey there,

Are you referring to the PDF.js Express REST API? Or are you using your own server?


I’m using my server, i mount a virtual machine with the node.js and PDF.js Express and put the pdf in a Apache web server.
I test to use a nginx server and put the pdf in external apache server too. And the problem always it’s the same, with a big pdf i retreive the PayloadTooLargeError message the first time.

Hey there,

Unfortunately this is something I cannot help with as it is outside the scope of PDF.js Express.