pdffillerjs / pdffiller

Take an existing PDF Form and data and PDF Filler will create a new PDF with all given fields populated.
MIT License
286 stars 113 forks source link

generateFDFTemplate fails if PDF Form field has value of '-----' #91

Open ivan3065 opened 4 years ago

ivan3065 commented 4 years ago

Snip from "dump_data_fields_utf8":

---
FieldType: Text
FieldName: some.fieldname
FieldFlags: 4194305
FieldValue: ----- 
FieldValueDefault: 10000
FieldJustification: Right
---

changing line 66 from fields = stdout.toString().split("---").slice(1); to fields = stdout.toString().split(/^---$/m).slice(1); solves the issue.