-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pdf-form-lock removes all fields #22
Comments
try the following files.. [pdf-form-fill.js]
[pdf-form-lock.js]
Don't forget to download/add the arial.ttf file and maybe change the path in pdf-form-fill.js!!!! Implement it like this:
|
@Hatzl Thank you! This got me further along - most fields do show up now. I still have the issue with the result of reader.queryDictionaryObject(annotationObject,'AP') in collectWidgetAnnotations being undefined in some cases, and I think my simple workaround of just leaving out those widgets is causing some fields to disappear still. We are going to revisit this work in a couple of weeks and I will post my final results if we make any progress. |
Maybe you can delete all form elements from your PDF-File and recreate the whole form with https://www.pdfescape.com . That worked for me, maybe its an option for you, too. |
@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:
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.
The text was updated successfully, but these errors were encountered: