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

Ability to directly modify byte Stream #221

Open surendra-y opened 6 years ago

surendra-y commented 6 years ago

I am generating a PDF file using the Puppeteer. After that I want to do some manipulation like adding page numbers per page and encrypting the file.

After generating the file I am getting a byte stream and I am directly flushing the same to the client using the Web service. I am not able to process the same byte stream that is generated from the Puppeteer for manipulation. Since only way to call "createWriterToModify" is to either provide the source file address or passing the stream generated by hummus.PDFRStreamForFile(). Which also only takes the file Path.

I can patch the issue by creating a temp PDF file and rereading it. But it is adding latency to the system.

Please help me

Thanks in Advance.