jjwilly16 / node-pdftk

A wrapper for PDF Toolkit with streams and promises.
MIT License
141 stars 34 forks source link

Read FDF as JSON, promisified #41

Open jpetso opened 4 years ago

jpetso commented 4 years ago

Hi, and thanks for this library!

I took @ocallarob's excellent changes from PR #30, rebased them on current master to resolve the conflict, squashed his three commits into one and made a few tweaks of my own:

Thanks to @ocallarob for the original changeset, hopefully this moves it in the right direction.

jpetso commented 4 years ago

On second thought, maybe readFdfAsJSON() is too broad, given that it sometimes also contains other information? How about readFormFieldValuesAsJSON() (to leave room for readFormFieldInfoAsJSON() for JSON-ified dump_data_fields_utf8)?

jpetso commented 4 years ago

Changed the function name to readFormFieldValuesAsJSON() as mentioned above. Also fixed eslint issues.