HummusJSSamples icon indicating copy to clipboard operation
HummusJSSamples copied to clipboard

pdf-form-lock removes all fields

Open rcoryjohnson opened this issue 5 years ago • 3 comments

@galkahana I am using your form filling sample, and now I need to lock/flatten the resulting PDF. @Hatzl directed me to your lock-form branch here, and I am trying to use pdf-form-lock.js

I had to modify pdf-form-lock.js to avoid crashes. I don't think my change in collectWidgetAnnotations will be sufficient, but it avoids crashes for my testing. Here are my changes: https://github.com/galkahana/HummusJSSamples/compare/lock-form...rcoryjohnson:patch-1#diff-4b182c8febde9600d798afac72f21a7e

The resulting PDF has all of the fields cleared. "fillable.pdf" is the filled version with the editable fields, and "locked.pdf" is the result pdf which has been passed to lockForm(...) and has all of the fields cleared rather than just locked as intended.

locked.pdf fillable.pdf

Any assistance will be very appreciated.

rcoryjohnson avatar Nov 04 '18 01:11 rcoryjohnson