Open dannymcpherson opened 6 years ago
@dannymcpherson Thank you for bringing this to my attention. This library initial intent has been based on handling specific in-house pdf's and as such it hasn't had the greatest of exposure to other documents, if it's possible could you add the pdf file that is causing the issue so I may be able to reproduce and debug the issue. Thank you.
No problem at all, I'm very grateful you wrote this - it saved me a great deal of time!
Had the same problem. Issue is that you can't set it to 'Yes' as it ignores it and uses the value of FieldStateOption which is 'Off' in this case.
{
FieldType: 'Button',
FieldName: 'My Checkbox',
FieldFlags: '0',
FieldValue: 'Off',
FieldJustification: 'Left',
FieldStateOption: 'Off'
}
Danny's work-around works a treat.
(Great library Cory - thanks for building it)
To work around it, I commented out this if-block in fdf-generator:
That being said, _extractFieldNames(pdf) and _assignments(fields) don't appear to do the right thing. There can be multiple FieldStateOption lines, and this code only deals with the first one.