Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

Check Boxes... #37

Open
Lancewise opened this issue May 5, 2016 · 2 comments
Open

Check Boxes... #37

Lancewise opened this issue May 5, 2016 · 2 comments

Comments

@Lancewise
Copy link

Was wondering how would one program in a check for a checkbox?
I have tried:

[_pdfViewController.document.forms setValue:@"Yes" forFormWithName:@"Married"];
[_pdfViewController.document.forms setValue:@"YES" forFormWithName:@"Married"];
[_pdfViewController.document.forms setValue:@"1" forFormWithName:@"Married"];
[_pdfViewController.document.forms setValue:@"Y" forFormWithName:@"Married"];

But none of them added a check to the box. I have checked and double checked the form name thinking I may have typed it in wrong but it is correct.

Thanks

@jaouahbi
Copy link

Open the .pdf in Adobe Acrobat. Tools->Edit and then select the checkbox, go to the page Options and set you "true" value in the Export Value. For example YES, Yes ... etc

@codicil
Copy link

codicil commented Jul 20, 2017

document.forms.setValue("Yes", forFormWithName: "CB1")

Note: CB1 is checkbox in my pdffile
as @jaouahbi said you need to open pdf in acrobat and check checkbox properties under option tab for export value mine is "Yes" and it works

One question thout
@Lancewise, where did you put these command in the viewcontroller

in my case I am working in swift and I had to put in the app delegate which I don't want to but in the respective viewcontroller file, any suggestion

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

No branches or pull requests

3 participants