I\'m trying to solve such problem with jsPDF:
I have PDF file, which is stored on server. I\'m generating another pdf with jsPDF and trying to append to already exi
jsPDF can't do this, but pdf-lib
can. You can combine the two, or just use pdf-lib
on its own. To load an existing pdf in pdf-lib
, just do this:
async function loadPdf(){
const response = await fetch('existing.pdf');
const buffer = await response.arrayBuffer();
const existingPdfDocBytes = new Uint8Array(buffer);
const pdfDoc = PDFLib.PDFDocumentFactory.load(existingPdfDocBytes);
return pdfDoc;
}