ILPDFKit icon indicating copy to clipboard operation
ILPDFKit copied to clipboard

Check Boxes...

Open Lancewise opened this issue 9 years ago • 2 comments

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

Lancewise avatar May 05 '16 13:05 Lancewise

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

jaouahbi avatar May 11 '16 14:05 jaouahbi

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

codicil avatar Jul 20 '17 19:07 codicil