8 Commits

Author SHA1 Message Date
Adrian-George Bostan
99ef1b861d
Combo field appearance (#370)
* Fix combo field appearances not being shown

* Fix V object type for choice and button fields

* Refactor form fill for combo and checkbox fields

* Add fill test case for text, combo and checkbox fields

* Prevent panic when flattening forms using a nil appearance generator
2020-06-10 16:58:00 +00:00
Adrian-George Bostan
6cb58f6327
Add configurable font fallback options for form fields (#368)
* Add configurable fallback font support for form fill/flatten

* Add appearance font to AcroForm DR

* Refactor DA process method

* Remove unnecessary font default size variable

* Minor refactor in the appearance generation functions

* Improve processDA appearance style method

* Use original font container if present in DR

* Maintain original appearance font autosizing behavior
2020-06-09 15:16:54 +00:00
Adrian-George Bostan
d6e1cb5761 Account for rotation when generating flattened text field appearances 2020-05-29 17:49:00 +03:00
Adrian-George Bostan
033f410eac
Account for inverted annotation rects when calculation appearance bounds (#357) 2020-05-20 17:58:54 +00:00
Adrian-George Bostan
d84d0c4375
Form fill fixes (#328)
* Parse form fields with embedded widget annotations

* Try matching fields both by partial and full names on form fill

* Use default font if widget font is not found when generating appearance

* Add JSON extract and fill test case
2020-04-24 16:48:06 +00:00
Adrian-George Bostan
e2b3c6e6ba
Add predefined CMaps for Type 0 composite fonts (#246)
* Add packed predefined cmaps
* Add cmap cid range parsing
* Load base cmap for predefined cmaps
* Refactor pdfFont to Unicode methods
* Preserve CharcodeBytesToUnicode behavior
* Add support for CID-keyed Type 0 fonts
* Add method documentation for the cmap package
* Refactor and document charcode to Unicode conversion code
* Add more cmap parsing test cases
* Add more method documentation in the cmap package.
* Remove unused code from the bcmaps package
* Improve cmap test case
* Assume identity when encoder is missing on regenerating field appearance
* Add missing encoder log message
* Add inverse CMap mappings
* Add CMap encoder
* Address golint notices and small fix in the cmap package
* Keep smaller charcodes when generating cmap inverse mappings
* Update extractor test case
* Keep latest supplement charcodes/CIDs when computing inverse mappings
* Fix comment typo
2020-02-07 19:56:30 +00:00
Adrian-George Bostan
f1738ac062 Check for missing resource dict when generating field appearance (#135) 2019-07-31 20:06:50 +00:00
Adrian-George Bostan
c64812093d Remmove pdf folder and move packages up one level (#2) 2019-05-16 20:44:51 +00:00