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

Issue AcroFormCheckbox is not displayed in the print version #3274

Closed
geltapatio opened this issue Sep 28, 2021 · 2 comments
Closed

Issue AcroFormCheckbox is not displayed in the print version #3274

geltapatio opened this issue Sep 28, 2021 · 2 comments

Comments

@geltapatio
Copy link

geltapatio commented Sep 28, 2021

If you use an AcroFormCheckbox, it will be displayed correctly in Acrobat Reader, but when you want to print the document, the checkbox will not be displayed if it is unchecked.

you can see the bug here jsfiddle

pdf = new jspdf.jsPDF();
var checkBox = new jspdf.AcroFormCheckBox();
checkBox.fieldName='chbox_test';
checkBox.maxFontSize = 9;
checkBox.readOnly = false;
checkBox.height = 3;
checkBox.width =3;
checkBox.x = 24;
checkBox.y = 20;
pdf.addField(checkBox);
pdf.text('Fotos',30, checkBox.y + 3);
pdf.save('Test.pdf');

AcroFormCheckbox_print_version

@Uzlopak
Copy link
Collaborator

Uzlopak commented Sep 28, 2021

I think it is not a bug. You have to add a border to the Checkbox, so that you can see that it is an empty checkbox. So create first a rectangle and then create above it the checkbox.

@geltapatio
Copy link
Author

geltapatio commented Sep 29, 2021

I followed your instructions and it worked. Therefore i will close this issue.
Thanks for your help and time
I changed this code according to your suggestion jsfiddle

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