hummusRecipe
hummusRecipe copied to clipboard
can i use buffer instead of path
**Hi everyone ** I have an image that received it from the server I don't want to save it to path Can I use buffer instead of path
let ImgBuffer = res.data
const pdfDoc = new HummusRecipe(input, output);
pdfDoc
.editPage(2)
.image(ImgBuffer), 350, 660, {
width: 200,
keepAspectRatio: true,
})
.endPage()
.endPDF(console.log);
I want to do the same but with the encrypt method:
let bufferPdf;
const pdfDoc = new HummusRecipe(filename);
pdfDoc
.encrypt({
userPassword: key,
ownerPassword: key,
userProtectionFlag: 4
})
.endPDF(buffer => {
bufferPdf = buffer;
});