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

Demo: Checkboxes #22

Open
JanGrohotolski opened this issue Apr 29, 2019 · 5 comments
Open

Demo: Checkboxes #22

JanGrohotolski opened this issue Apr 29, 2019 · 5 comments

Comments

@JanGrohotolski
Copy link

Hello,

I tried to use use your online demo with this pdf : https://formulare.bmf.gv.at/service/formulare/inter-Steuern/pdfs/2019/L16.pdf?open=download

and I couldnt fill the Checkboxes. Is it because of the demo or is it also in the original version?

@elboanas
Copy link

Same for radio button

@ZenLiuCN
Copy link

ZenLiuCN commented Nov 1, 2019

checkbox seems be declared as Name('0') and Name('Off'), and in source it's define checked as Name('Yes'); so it won't be effect; I just tested in PDF-1.6

@genshinw
Copy link

Is there any solution?

@berta799
Copy link

Hello,
I'm french and on my pdf the chechboxes checked are set on 'Oui' and not 'Yes' or 'On'.
This seems to depend on the language (and probably the version) set on your Acrobat Pro when you created the pdf form

Inside the pdfform.js file line 429, you can find:
if (ft_name == 'Btn') {
n.map.AS = n.map.V = n.map.DV = value ? new minipdf_lib.Name('Yes') : new minipdf_lib.Name('Off');
}

In my case, if I replace the 'Yes' inside the pdfform.js file by a 'Oui', that works.

After you can give the value you want to the field when you fill the form (eg: fields['yourfield'] = 'whatyouwanthere'), if the type is a 'Btn' (as a checkbox) the pdfform.js will put a 'Yes' (a 'Oui' in my case).

Hope it will help some of you.

JB

@genshinw
Copy link

Hello, I'm french and on my pdf the chechboxes checked are set on 'Oui' and not 'Yes' or 'On'. This seems to depend on the language (and probably the version) set on your Acrobat Pro when you created the pdf form

Inside the pdfform.js file line 429, you can find: if (ft_name == 'Btn') { n.map.AS = n.map.V = n.map.DV = value ? new minipdf_lib.Name('Yes') : new minipdf_lib.Name('Off'); }

In my case, if I replace the 'Yes' inside the pdfform.js file by a 'Oui', that works.

After you can give the value you want to the field when you fill the form (eg: fields['yourfield'] = 'whatyouwanthere'), if the type is a 'Btn' (as a checkbox) the pdfform.js will put a 'Yes' (a 'Oui' in my case).

Hope it will help some of you.

JB

Thanks, I finally fix it with fork the project, and modify the problem line with new minipdf_lib.Name(value), And then I can use the pdf muti checkbox with params { c1_1: ['1', '2', '3', 'Off', '5', '6', 'Off']}` to indicate the checkbox pos

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

5 participants