PDFsharp - moved to http://forum.pdfsharp.net/ Forum Index PDFsharp - moved to http://forum.pdfsharp.net/
Please visit the new PDFsharp forum at http://forum.pdfsharp.net/
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Radio Button Elements PdfArray opt always equals null - Why?

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    PDFsharp - moved to http://forum.pdfsharp.net/ Forum Index -> Support - moved to http://forum.pdfsharp.net/
View previous topic :: View next topic  
Author Message
sorcerer7



Joined: 06 Feb 2009
Posts: 6
Location: Plano Texas

PostPosted: Tue Feb 10, 2009 1:51 am    Post subject: Radio Button Elements PdfArray opt always equals null - Why? Reply with quote

On line 67 of PdfRadioButtonField.cs 'opt' always equals null for Radio Button options on my AcroForms.

The Element[] array contains the following elements:
/FT
/Kids
/TU
/Ff
/T

But does not contain /Opt

As a result, trying to set the SelectedIndex always fails.

Do you have any ideas why this might be?

Is there anything you would need me to send to help?

We are using PDFSharp 1.2.

My relevant code looks like:

Code:
 
      fqName = "male or female";
      field = fields[fqName];
      radField = field as PdfRadioButtonField;
      radField.SelectedIndex = 0;


Before and After executing this code, radField.SelectedIndex equals -1 though it should have been set to 0.

Thanks in advanced for any help
Back to top
View user's profile Send private message
sorcerer7



Joined: 06 Feb 2009
Posts: 6
Location: Plano Texas

PostPosted: Thu Feb 19, 2009 7:33 am    Post subject: Distiller PDFs have this issue while other producers do not Reply with quote

I have found that depending on the tool used to create the AcroForm, the condition mentioned in the original post may or may not be true.

So far, I have found that AcroForm pdfs generated with Adobe LiveCycle and Nitro PDF seem to not have this issue. Although, there are other issues setting and retrieving the values from RadioButtons on these pdfs.

So far, some (if not all) AcroForm pdfs that have a producer of Acrobat Distiller Do have this issue. All PDFs that I have created with Distiller exhibit this erroneous behavior. The pdfs I was working with when I posted the original message were all created with Distiller.

Does anyone have any understanding of this and or an explanation as to why the difference?
Back to top
View user's profile Send private message
sorcerer7



Joined: 06 Feb 2009
Posts: 6
Location: Plano Texas

PostPosted: Thu Feb 19, 2009 7:41 am    Post subject: Bug in SelectedIndex Reply with quote

Also know, part of the issue in the original note is compounded by a bug which I have documented in the BUGS forum with the subject 'PdfRadioButtonField.cs bug in IndexInOptStrings(v)'.

This BUG report also includes a fixed bit of code though there is no guarantee that the fix is complete as I am still having issues reliably setting the values of radio buttons on my AcroForms.

If the AcroForm has a radio button selected, the fixed code will now always return the correct index.
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    PDFsharp - moved to http://forum.pdfsharp.net/ Forum Index -> Support - moved to http://forum.pdfsharp.net/ All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © phpBB Group. Hosted by phpBB.BizHat.com


Start Your Own YouTube Clone

Free Web Hosting | Free Forum Hosting | FlashWebHost.com | Image Hosting | Photo Gallery | FreeMarriage.com

Powered by PhpBBweb.com, setup your forum now!
For Support, visit Forums.BizHat.com