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

Allow user to add annotation's flag. #171

Closed chunyenHuang closed 7 years ago

chunyenHuang commented 7 years ago
  1. Add writeIntegerValue to dictionaryContext.
  2. Allow users to set annotation's flag.
galkahana commented 7 years ago

Cheers. How about completing this to a full number support? Javascript doesnt make type difference between integer and floats, and id rather have no errors here.

chunyenHuang commented 7 years ago

Sure thing, I will commit it soon. Do you think to expose both integer and float or just switch it automatically in something called writeNumberValue?

galkahana commented 7 years ago

writeNumberValue is probably best

galkahana commented 7 years ago

you can borrow from the matching objectscontextmethod - https://github.com/galkahana/HummusJS/blob/master/src/ObjectsContextDriver.cpp#L168