hummusRecipe
hummusRecipe copied to clipboard
Delete Page
Hello! Thanks for amazing library! It's possible delete pages?
https://github.com/galkahana/HummusJS/issues/340
Hello, HummusJS does not provide this feature out of box. At this moment, you can create a new pdf and just append the page you need.
I am Trying to extract just single page From new.pdf which is 7 pages. But geting 5 pages Append is not working for me What is Wrong in my code ...?
const sourcePDF = path.join(__dirname, `/output/new.pdf`);
console.log('sourcePDF => ' + sourcePDF);
const longPDF = path.join(__dirname, `/comprressed/two.pdf`);
const fOutput = path.join(__dirname, `/output/two.pdf`);
console.log('fOutput => ' + fOutput);
const pdfDoc = new HummusRecipe(sourcePDF, fOutput);
pdfDoc
.appendPage(longPDF, 1)
.endPDF();
res.send(longPDF.metadata);
https://github.com/chunyenHuang/hummusRecipe#append-pdf