Check box isn't checked after pdf generation

I’m using ASPOSE 21.1.0. I’m converting DOCX to PDF. When i convert to PDF, the checkboxes are no longer checked. Please advise.

var forPdf = new Aspose.Words.Document(stream);
forPdf.AcceptAllRevisions();
forPdf.GetChildNodes(Aspose.Words.NodeType.Comment, true).Clear();
forPdf.UpdateTableLayout();

using (var pdfstream = new MemoryStream())
{
forPdf.Save(pdfstream, Aspose.Words.SaveFormat.Pdf);
documentContent = pdfstream.ToArray();
}

@rniemeier

Could you please ZIP and attach your input Word document here for testing? We will investigate the issue and provide you more information on it.

3084H.01I.ORG.zip (53.3 KB)

Here you go

@rniemeier

We have not found the checkboxes in your Word document. Could you please share the page number or screenshots of checkboxes of your input Word document?

The checkbox is on page 2.

image.png (1.1 KB)

@rniemeier

Thanks for sharing the detail. We have tested the scenario using the latest version of Aspose.Words for .NET 21.1 and have not found the shared issue. So, please make sure that you are using the latest version of Aspose.Words and using the same Word document.

We have attached the output PDF with this post for your kind reference. 21.1.pdf (137.4 KB)

I have version 21.1, I got it from Nuget. Is it possible you have the wrong version uploaded to Nuget? Also, i read about wingdings 2. Do i need to have wingdings 2 somewhere to get this to work?

@rniemeier

Please note that Aspose.Words requires TrueType fonts when rendering document to fixed-page formats (JPEG, PNG, PDF or XPS). You need to install fonts that are used in your document on the machine where you are converting documents to PDF. Please refer to the following articles:

Using TrueType Fonts
Manipulating and Substitution TrueType Fonts

We suggest you please implement IWarningCallback interface as shown below to get the missing fonts notifications. You need to install the fonts used in your document to get the desired output.

Document doc = new Document(MyDir + "3084H.01I.ORG.docx");
doc.AcceptAllRevisions();
doc.GetChildNodes(Aspose.Words.NodeType.Comment, true).Clear();
doc.UpdateTableLayout();
doc.WarningCallback = new HandleDocumentWarnings();
doc.Save(MyDir + "21.1.pdf");

public class HandleDocumentWarnings : IWarningCallback
{
    /// <summary>
    /// Our callback only needs to implement the "Warning" method. This method is called whenever there is a
    /// potential issue during document procssing. The callback can be set to listen for warnings generated during document
    /// load and/or document save.
    /// </summary>
    public void Warning(WarningInfo info)
    {
        // We are only interested in fonts being substituted.
        if (info.WarningType == WarningType.FontSubstitution)
        {
            Console.WriteLine(info.WarningType + " :: " + info.Description.ToString());
        }
    }
}