Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!

Debenu Quick PDF Library - PDF SDK Community Forum Homepage
Forum Home Forum Home > For Users of the Library > I need help - I can help
  New Posts New Posts RSS Feed - How to set "checked" for checkboxes
  FAQ FAQ  Forum Search   Register Register  Login Login

How to set "checked" for checkboxes

 Post Reply Post Reply
Author
Message
Josef Gschwendtner View Drop Down
Beginner
Beginner


Joined: 23 Mar 16
Location: Germany
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote Josef Gschwendtner Quote  Post ReplyReply Direct Link To This Post Topic: How to set "checked" for checkboxes
    Posted: 20 Apr 16 at 2:50PM
Hi,

I have read that one sets the checkstate of a checkbox with the values "Yes" and "Off".
Now we have a PDF-Form where we have to set "checked" by value "Ja" (German for "Yes").

How do we find out what string is needed to check the checkbox for a certain PDF-Form?

Regards,
Josef
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3524
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 20 Apr 16 at 7:44PM
Hi Josef,

why you don't want read the relevant sample on page 34/35 of the developer guide?

Cheers,
Ingo

Back to Top
Josef Gschwendtner View Drop Down
Beginner
Beginner


Joined: 23 Mar 16
Location: Germany
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote Josef Gschwendtner Quote  Post ReplyReply Direct Link To This Post Posted: 11 May 16 at 4:07PM
Hi,

it seems, this is no information one gets from the developer guide.

We have password protected documents with checkboxes the “Yes-No”, “On-Off” values are replaced by values “100-Off” or others.

My question is:
How can we find out which value is for a certain checkbox appropriate to check/uncheck it by code.

Regards,
Josef

Back to Top
pinozzy View Drop Down
Beginner
Beginner
Avatar

Joined: 22 Mar 16
Status: Offline
Points: 10
Post Options Post Options   Thanks (0) Thanks(0)   Quote pinozzy Quote  Post ReplyReply Direct Link To This Post Posted: 11 May 16 at 4:32PM
hello,

Have you tried this approach?

for (int i = 1; i <= QP.FormFieldCount(); i++)
                    {
                        string title = QP.GetFormFieldTitle(i);
                        string hint = QP.GetFormFieldDescription(i);
                        string s = QP.GetFormFieldValue(i);
                        int type = QP.GetFormFieldType(i);
                   
                            if (type == 3 || type == 4) // Radio or CheckBox
                            {
                                int sc = QP.GetFormFieldSubCount(i);
                                for (int j = 1; j <= sc; j++)
                                {
                                    string sfn = QP.GetFormFieldSubName(i, j);
                                    textBox1.AppendText(sfn);
                                    if (j != sc)
                                        textBox1.AppendText("|");
                                }
                            }

From this post:
http://www.quickpdf.org/forum/setting-check-box-subfield-values_topic1842.html
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.01
Copyright ©2001-2014 Web Wiz Ltd.

Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. AboutContactBlogSupportOnline Store