Skip to content
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

Read only fields filling #33

Open
cryo28 opened this issue May 20, 2012 · 1 comment
Open

Read only fields filling #33

cryo28 opened this issue May 20, 2012 · 1 comment

Comments

@cryo28
Copy link

cryo28 commented May 20, 2012

Our project prepopulates a few pdf forms taken from 3rd-parties by the means of ActivePdftk. In some of such forms there are a few "readonly" fields which we nevertheless need to be populated. However, this cannot be done with ActivePdfktk without patching it, because it silently ignores all attempts to set a value to readonly field

https://github.com/tcocca/active_pdftk/blob/master/lib/active_pdftk/field.rb#L224
https://github.com/tcocca/active_pdftk/blob/master/lib/active_pdftk/form.rb#L87

PDFTK is fine filling readonly fields on its own.

It would be great if ActivePdftk would allow to populate readonly fields.

I'd be happy to come up with a pull requests. I'd like to discuss whether read_only? check can be removed from the mentioned above lines of code or should the code contain some different methods instead of set and value= to assign values for read only fields?

@tcocca
Copy link
Owner

tcocca commented May 25, 2012

Hi,

I think if we are going to have ActivePdftk fill out form fields that are #read_only? there needs to be some type of explicit call that sets read_only fields. I don't want it to be the default action as I think it will confuse more people.

If you can come up with something for the api to explicitly set values for read_only I will definitely check it out.

~ Tom

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants