Which product are you using?
We are using PDF.js Express Plus
PDF.js Express Version
8.7.4
Detailed description of issue
We are getting an error when calling POST. We are using S3 for pdf storage (which is our filePath), and when we attempt to merge large PDFs we encounter status 502 { message: ‘Internal server error’ }. We suspect it’s due to the size of the PDF as smaller files work just fine, the PDF which doesn’t work is ~20MB.
Expected behaviour
The expected behaviour is to be able to merge the annotations with the PDF (so we can then download it).
Does your issue happen with every document, or just one?
Only larger PDFs as the one mentioned.
Code snippet
try {
const data = new FormData();
data.append('xfdf', xfdf);
data.append('license', 'API_KEY_HERE');
data.append('file', filePath);
console.log('filepath', filePath);
const res = await axios.post('https://api.pdfjs.express/xfdf/merge', data, {
headers: data.getHeaders()
});
return API.utility.response(response, 201, {
status: 'Success',
'status code': 201,
message: 'PDF file is ready to download.',
data: res.data,
}); ...