How do we match "Export Value" that isn't a boolean value?

Posted by: fletchsod.developer on 15 October 2020, 1:17 am EST

    • Post Options:
    • Link

    Posted 15 October 2020, 1:17 am EST - Updated 29 September 2022, 11:12 pm EST

    Looking at the AcroForm field is the CheckBoxField object. We noticed the following objects, “DefaultValue”, “Value” & “Export” are of boolean datatype. This is not correct because Adobe PDF Professional doesn’t restrict it to boolean but string.

    See the attached file of what it looks like in Adobe PDF Professional when looking up the Checkbox properties.

  • Posted 15 October 2020, 9:08 pm EST

    Hi Scott,

    The default value is to set the checked state of the CheckBox field so it is boolean and the export property sets or sets a value indicating whether the field must not be exported by a GrapeCity.Documents.Pdf.Actions.ActionSubmitForm action, so it is boolean.

    So I guess the issue you are having is with the Value property. If there is something else then please let us know.

    Also please tell me what issue you are facing because of this property. If you are having an issue with your pdf created via Adobe PDF Professional then please share it with us and also share the code which is replicating the issue. It will help us to assist you in a better way.

    Regards,

    Prabhat Sharma.

  • Posted 21 October 2020, 3:32 am EST

    Hi,

    GrapeCity.Documents.Pdf.AcroForms.CheckBoxField derives from the base GrapeCity.Documents.Pdf.AcroForms.Field class that defines all those values as objects. CheckBoxField overrides those properties with ‘new bool’ to make life (in most cases) easier. But you can still access the base class’s members like so:

    var checkbox = new GrapeCity.Documents.Pdf.AcroForms.CheckBoxField();
    var value = ((GrapeCity.Documents.Pdf.AcroForms.Field)checkbox).Value;
    ((GrapeCity.Documents.Pdf.AcroForms.Field)checkbox).Value = "123";
    
    

    Hope this helps.

    Dmitry.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels