Closed ghost closed 5 years ago
I'm trying to extract one page from a PDF by doing:
const pdfWriter = hummus.createWriter(extractedPdfPath); pdfWriter.appendPDFPagesFromPDF(sourcePdfPath, { type: hummus.eRangeTypeSpecific, specificRanges: [[pageIndex, pageIndex]], }); pdfWriter.end();
It works pretty well except for the annotations which are not copied from the original to the new generated PDF.
Here is an example of PDF with annotations that does not work: A5.pdf
copies only graphics natively. here's how to also copy annotations: https://github.com/galkahana/HummusJSSamples/tree/master/appending-pages-with-comments
That is awesome, thanks!
I'm trying to extract one page from a PDF by doing:
It works pretty well except for the annotations which are not copied from the original to the new generated PDF.
Here is an example of PDF with annotations that does not work: A5.pdf