Welcome Guest Search | Active Topics | Sign In | Register

PDFRadioButtonGroup not populating with Items but having children items Options
Mohit Goyal
Posted: Wednesday, May 24, 2017 9:27:37 AM
Rank: Newbie
Groups: Member

Joined: 5/24/2017
Posts: 5
Hi Team

I was evaluating your EO.PDF library for my use But got stuck in one problem.
Problem: I am having a PDF with some checkBox Fields, TextFields. ListBox Fields and Radio Button Fields.
whenever I am trying to upload this PDF, all radio button fields are listing in my Dot net code as PdfRadioButtonGroup Fields.
But all fields are with 0 Items and selectedIndex is 1(Default value in pdf of radiobutton is Yes). I am not sure why this is happening.

I am just creation radion Button form field with the same name for grouping. but fields are coming as children property of PDFRadioButtonGroup field not as Items.

Please team help asap in this. Looking forward to your quick response.

Thanks
Mohit Goyal
eo_support
Posted: Wednesday, May 24, 2017 11:20:54 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,080
Hi,

This seems to be an issue on our side. Can you post a small piece of test code so that we can use to duplicate the problem? You can also send the PDF file in question to us and we will be happy to investigate further. See here for more details on how to send test files to us:

https://www.essentialobjects.com/forum/test_project.aspx

Thanks!
Mohit Goyal
Posted: Thursday, May 25, 2017 2:02:26 AM
Rank: Newbie
Groups: Member

Joined: 5/24/2017
Posts: 5
Hi Team

You can go ahead with any pdf having 2 or multiple radio button item in a single group and then try to set item from the code.
For example, if PDF having radio button for Yes and No, then try to select Yes from code and save the pdf again.

Here is the VB sample code :

'Load the PDF file
Dim inputPDF = "D:\Input.pdf"
Dim outputPDFPath = "D:\Output.pdf"

Dim doc As New PdfDocument(sourcePath)
Dim rGroup As PdfRadioButtonGroup = doc.Fields("testRadio")

'Should get 2 items in this group as pdf is having 2 items with testRadio, but getting 0 items in this group
'And default Selection is Yes in PDF
Dim selectedIndex = rGroup.SelectedIndex 'Getting 1 as selected index, but item count is zero.
Dim childrenCount = rGroup.Children.Count 'Getting 2, but its a readOnly property, So cant modify.

'If I am not changing anything in PDF and try to save
'Save it to a new file, its giving exception for index out of range.
doc.Save(outputPDFPath)

eo_support
Posted: Thursday, May 25, 2017 8:11:16 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,080
Hi,

Please send us your input PDF file. We tested our test file here and it works fine. So it can be related to your Input.pdf file.

Thanks!
Mohit Goyal
Posted: Thursday, May 25, 2017 8:20:01 AM
Rank: Newbie
Groups: Member

Joined: 5/24/2017
Posts: 5
Hi Team

I have emailed you the pdf file with the subject name as 'PDFRadioButtonGroup not populating with Items but having children items'
Please let me what is the issue with this PDF.

Thanks
eo_support
Posted: Thursday, May 25, 2017 8:45:29 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,080
Hi,

We have received the PDF file. The root of the problem is the radio button group dictionary lacks an entry that explicitly defines the values for each individual button. We will add code to derive such values from the child button field and post an update build as soon as possible.

Thanks!
Mohit Goyal
Posted: Thursday, May 25, 2017 8:48:24 AM
Rank: Newbie
Groups: Member

Joined: 5/24/2017
Posts: 5
Thanks for your quick reply. Waiting for the build.
eo_support
Posted: Friday, May 26, 2017 10:07:34 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,080
Hi,

We have posted a new build that should resolve this issue. Please download it from our download page and let us know how it goes.

Thanks!
Mohit Goyal
Posted: Monday, May 29, 2017 2:34:29 AM
Rank: Newbie
Groups: Member

Joined: 5/24/2017
Posts: 5
Thanks team its working fine now.
eo_support
Posted: Tuesday, May 30, 2017 9:10:45 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,080
Great. Thanks for confirming the fix!


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.