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

Update express server example #267

Closed petrgazarov closed 1 year ago

petrgazarov commented 6 years ago

Hi @galkahana, Awesome repo! Was playing around and noticed the express example is out of date.

galkahana commented 6 years ago

why do we want this update? in what way is it out of date?

petrgazarov commented 6 years ago

Hi @galkahana the main problem with the express example was that neither require('express') nor require('hummus') resolved because these dependencies aren't specified anywhere in the example (and were probably expected to be globally available).

Also encryption was added to the example, which was recently introduced via http://pdfhummus.com/post/165662332141/aes-encryptiondecryption-support

I just noticed that in my PR, I accidentally removed the id query param and changed the writer from PDFStreamForResponse to a local file on disk. I can revert both of these changes if you want.

galkahana commented 6 years ago

well im trying to keep it simple, so i'll keep it the way it is. its an intro sample, not full fledged show off.

pripatelUK commented 6 years ago

@galkahana I appreciate you trying to keep it simple, though I must say extra example snippets such as what @petrgazarov has provided can help show off additional features and assist new users in using this package.

May I suggest just renaming the sample as 'AES-Support' and having it along side PDFServer.js