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 - Need Help
  FAQ FAQ  Forum Search   Register Register  Login Login

Need Help

 Post Reply Post Reply
Author
Message
oleri View Drop Down
Beginner
Beginner


Joined: 16 May 14
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote oleri Quote  Post ReplyReply Direct Link To This Post Topic: Need Help
    Posted: 16 May 14 at 7:55AM
Hi,

i need some help.

I have a PDF file with Formfields as checkbox / mutli.

I do the following:

  i := pdfl.FindFormFieldByTitle('1005');
  y := pdfl.GetFormFieldSubCount(i);

For y - i get 25 subfieldcount. How can i access this subfields?
The FormFieldType is 3. There also 25 subfields of type checkbox. I want to check one box of them.

With a other application i see that there one checkbox with name(1005) and a level below 25 others with name 1005#0, 1005#1, 1005#2 .... 1005#25.

i appreciate your help :-)
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3529
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 17 May 14 at 11:47AM
Hi Oleri,

here are three links with helpful answers for you:
http://www.quickpdf.org/forum/is-checkbox-form-field-checked-or-not_topic1774.html
http://www.quickpdf.org/forum/update-checkbox-field_topic1980.html
http://www.quickpdf.org/forum/checkbox-values_topic2559.html
here is sample code from Andrew:
http://www.quickpdf.org/forum/create-fill-checkboxes-and-radiobuttons-in-code_topic2337.html

Cheers and welcome here,
Ingo

Cheers,
Ingo

Back to Top
AndrewC View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 08 Dec 10
Location: Geelong, Aust
Status: Offline
Points: 841
Post Options Post Options   Thanks (0) Thanks(0)   Quote AndrewC Quote  Post ReplyReply Direct Link To This Post Posted: 18 May 14 at 9:31AM
Oleri,

Here is some sample code that may help also.

            QP.LoadFromFile("formfields.pdf", "");

            QP.RemoveXFAEntries(1);
            QP.RemoveUsageRights();
            QP.SetNeedAppearances(0);

            for (int i = 1; i <= QP.FormFieldCount(); i++)
            {
                string title = QP.GetFormFieldTitle(i);
                string s = QP.GetFormFieldValue(i);
                int type = QP.GetFormFieldType(i);

                if (type == 3 || type == 4 || type == 5) // checkbox, radio, choicebox
                {
                    int sc = QP.GetFormFieldSubCount(i);
                    for (int j = 1; j <= sc; j++)
                    {
                        string sfn = QP.GetFormFieldSubName(i, j);

                        if (type == 3) 
                        {
                            if (sfn != "Off")
                              QP.SetFormFieldValueByTitle(title, sfn);
                        }
                        else
                            QP.SetFormFieldValueByTitle(title, sfn);
                    }
                }
                else if (type != 7) // Parent
                    QP.SetFormFieldValue(i, "AA BB");

                QP.UpdateAppearanceStream(i);
            }

Andrew.

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