Get export value of chk box

Skip Navigation LinksHome  /  Support  /  Forums  /  DynamicPDF CoreSuite for .NET (v6)  /  Get export value of chk box

DynamicPDF CoreSuite for .NET (v6) Forum

 Jun 16 2011 12:30 PM

I'm using .net 3.5 & DynamicPDF Merger Pro Developer v6.0.2.

This question involves interactions with an existing pdf and changing element values on that pdf. It does not involve creating a new pdf from scratch. I could not find an example in the applications that are included that answered this question.

I need to mark checkboxes as checked on a pdf. I know the field names for these check boxes. To do this, I just have to set the field's value to the export value of the checkbox.

How do I get the export value of a checkbox?

Furthermore, how can I tell what kind of object a field element is and make the appropriate cast to that object type (ex: get a CheckBox class object, PdfButtonField object, etc, etc)?



 Jun 16 2011 12:48 PM
Posted by a ceTe Software moderator
Hello,

It is not possible to get the export values set for the already existing check box using our DynamicPDF Merger for .NET product. You can get the export values using the Acrobat Professional.

You can have a check by comparing the FormField object with PdfTextField, PdfButtonField etc and get the type of the field and set the respective value to it. You can refer the FormFieldReader sample example downloaded with the product download which has a sample code for it.

Thanks,
ceTe Software Support Team.
 Apr 29 2019 2:28 PM
Posted by a ceTe Software moderator
Hello,
 
This is now possible with our product and you can now retrieve the export values from an existing check box, radio button and choice fields (combo box and list) in latest DynamicPDF Merger v10. Below is a code sample.
 
            PdfDocument pdf = new PdfDocument(@"Input PDF file path");
            PdfChoiceField choicefield = (PdfChoiceField)pdf.Form.Fields["combo box form field name"];
            string[] exprtValues= choicefield.GetItemsExportValues();
            string[] cmbItems = choicefield.GetItems();
 
            string cmbExportValue=pdf.Form.Fields["check box form field name"].ExportValue;
 
You can download latest fully functional evaluation edition of DynamicPDF Merger product from our website here.
 
Thanks,
ceTe Software Support Team

All times are US Eastern Standard time. The time now is 8:20 PM.