galkahana / HummusJS

Node.js module for high performance creation, modification and parsing of PDF files and streams
http://www.pdfhummus.com
Other
1.14k stars 169 forks source link

input buffer and output buffer #335

Open smettu007 opened 5 years ago

smettu007 commented 5 years ago

Hello

Is there a way to take input pdf buffer and output pdf buffer?

We are planning to dynamically filling pdf pieces, locking them and merge them together. But we want to have buffer as output so we can convert it to base6d string and send it t o an extenal api that handles the pdf accordingly.

Any suggestion would be great thanks

galkahana commented 5 years ago

most methods allow you to replace the default file usage, for either input or output, with a custom stream object. you can read about custom stream objects here - https://github.com/galkahana/HummusJS/wiki/Custom-streams. if there's nothing existing for buffers - just create one.

for example - create PDF allows to provide either a file path or such a stream object: https://github.com/galkahana/HummusJS/wiki/Basic-pdf-creation#create-pdfs

goatandsheep commented 4 years ago

Is this now hummus.PDFRStreamForBuffer and hummus.PDFWStreamForBuffer?