Preserve MS Word Form Fields (Checkbox) in DOCX as Fillable Form Fields in PDF or Convert them to Text using C#

We are looking to purchase ASPOSE… However, I need two feature to work in order to purchase. I need to save a docx with fillable form with checkboxes checked/unchecked by user as both docx and pdf.
I tested the following way and it didn’t work…
I uploaded a docx file (see first attachment) to Document Editor Online. The editor allows me to check the checkboxes (see 2nd attachment). However, when I download the pdf the checkboxes are not checked (see 3rd attachment).

Is it possible to do this? If so, how?

image.png (62.5 KB)
image.png (85.3 KB)
image.png (66.1 KB)

@cflowers,

Please ZIP and upload your input Word document and Aspose.Words generated PDF file showing the undesired behavior here for testing. We will then investigate the issue on our end and provide you more information.

PDF for Aspose.zip (92.4 KB)
docx for Aspose.zip (17.3 KB)

Upload the docx file. Click on some checkboxes. Download as PDF. The PDF does not have the checkboxes checked
Thanks for your help!

@cflowers,

You can build logic on the following C# Code of Aspose.Words for .NET API to meet your requirement. This code will check (enable) all the Checkbox form fields in Word document and Save them to PDF.

Document doc = new Document("E:\\Temp\\docx for Aspose\\Imiglucerase_Cerezyme_taliglucerase_Elelyso_velaglucerase_VPRIV_Med_Policy_eff_03-19-15.docx");

foreach (FormField formField in doc.Range.FormFields)
{
    if (formField.Type == Aspose.Words.Fields.FieldType.FieldFormCheckBox)
    {
        formField.Checked = true;
    }
}

//PdfSaveOptions opts = new PdfSaveOptions();
//opts.PreserveFormFields = true;

doc.Save("E:\\Temp\\docx for Aspose\\20.3.pdf");
// doc.Save("E:\\Temp\\docx for Aspose\\20.3-PreserveFormFields-true.pdf", opts);

Hope, this helps.