Xpdf merger bot working for large files

I am using https://api.pdfjs.express/xfdf/merge. and pdf filw of 30 MB atleast with anotations. but no response is coming. not showing any error. request timeout.

I am using

const data1 = new FormData();
data1.append(‘xfdf’, xfdfString);
data1.append(‘file’, blob);
data1.append(‘headers’, JSON.stringify({
“Access-Control-Allow-Origin”: ‘*’

		// Process the file
		const response = await fetch('https://api.pdfjs.express/xfdf/merge', {
		  method: 'post',
		  body: data1
		}).then(resp => resp.json());


This is expected since the rest API does not support blobs over 5MB. If you want to use larger files with the REST api, you must upload the file to a file server somewhere, and pass the URL to that file instead.


Means save blob to on my local path ar any complete path

can you send me code to save xfdf

i have chnage blob to file url in file parameters of api and its working.


1 Like