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!
![]() |
Need Help |
Post Reply ![]() |
Author | |
oleri ![]() Beginner ![]() Joined: 16 May 14 Status: Offline Points: 2 |
![]() ![]() ![]() ![]() ![]() 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 :-) |
|
![]() |
|
Ingo ![]() Moderator Group ![]() ![]() Joined: 29 Oct 05 Status: Offline Points: 3529 |
![]() ![]() ![]() ![]() ![]() |
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 |
|
![]() |
|
AndrewC ![]() Moderator Group ![]() ![]() Joined: 08 Dec 10 Location: Geelong, Aust Status: Offline Points: 841 |
![]() ![]() ![]() ![]() ![]() |
Oleri, 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. |
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. About — Contact — Blog — Support — Online Store