Checked check boxes in Word not checked in PDF

We are using the Aspose.Words/Aspose.Pdf combination to convert a Word document into a PDF document. The Word document contains Form Fields, text boxes and check boxes. The text boxes convert very well, the check boxes however are never checked, even when the user checked them.

The record for the checkbox in the xml file is always (checked or unchecked):

£

Can we do anything to see checked check boxes in Word as checked in PDF?

We are using Word 2007. We already had problems using the new 2007 .dotx format where images were not converted at all. By saving the template into a Word97-2003 .dot format the images appeared in the converted PDF file.

Thanks a lot for any help,

Edwin.

Save Edit

Hello Edwin.

Thank you for your inquiry.

Please attach your document containing both checked and unchecked fields so I could reproduce this issue. Maybe that’s something non-standard. If things went the way you are describing our regression tests would fail. Now they pass fine. Maybe you are applying any non-default options when converting. Please show also the code snippet.

Regarding images in DOCX (OOXML) there have been some fixes recently. There are two different ways images and shapes can be included in OOXML documents: VML and DrawingML. VML is already supported but DrawingML could hopefully come in March 2008. If you are interested in this issue please attach also the document reproducing it so I could say whether it will or won’t included in the very next release. Of course if you can work with Word 2003 format instead that’s everything okay for you.

Regards,

Thanks for your reply!

Word template in attachtment and here’s the code snippet:

// Converteer naar PDF
Aspose.Words.Document doc = new Aspose.Words.Document(volledigPad);
doc.SaveOptions.PdfExportFormFieldsAsText = true;
volledigPad = volledigPad.Replace(fil.Extension, String.Empty);
doc.Save(volledigPad + ".xml", SaveFormat.AsposePdf);
Aspose.Pdf.Pdf pdf = new Aspose.Pdf.Pdf();
pdf.Security = new Security();
pdf.Security.UserPassword = _ziekenhuis.Opname_Paswoord;
pdf.BindXML(volledigPad + ".xml", null);
pdf.IsImagesInXmlDeleteNeeded = true;
pdf.IsTruetypeFontMapCached = true;
pdf.TruetypeFontMapPath = System.IO.Path.GetTempPath();
pdf.Save(volledigPad + ".pdf");

I’m unable to reproduce this issue on the latest versions: Aspose.Words 4.4.3.0 and Aspose.Pdf 3.6.1.0. Please ensure you are using them or let me know if you have any difficulties with upgrade.

Aspose.Words 4.4.3.0:
https://releases.aspose.com/words/net

Aspose.Pdf 3.6.1.0:
https://releases.aspose.com/pdf/net

Regards,

The problem was not solved when using the latest versions of Aspose.Words and Aspose.Pdf.

The record for the checkbox in the xml file was still (checked or unchecked):

£

The problem was solved however by saving the word document in Word 97-2003 format (we use Word 2007) before creating the Aspose.Words.Document out of it.

Doing this the XML shows

T for a checked box

and

£ for an unchecked box

Hello!

I tried converting exactly the document that you attached, nothing changing before it. So check boxes should work. Can you add anything specific to what I already know?

If you have solved your problem just saving in different format then it’s nice. But of course I would like to spot this quest.

Regards,

The template I attached in my previous posts was a Word97-2003 template.

Problem was this template was opened in Word 2007, and saved, before an Aspose.Words.Document was made out of it. Doing this made it a Word 2007 formatted document (.docx).

So when using the template I attached with Office 2003 or prior versions, the checkboxes will convert well. When using Word 2007 however, saving the opened Word97-2003 template into a Word 2007 .docx document will result in checked checkboxes that are not well rendered.

Attached you find a Word 2007 document that does not convert well to PDF. Can you confirm this?

Hello Edwin!

Thank you for additional information. This is really reproduced only with DOCX format. I have logged the issue as #4390 in our defect database. We’ll investigate this and let you know when it is fixed or some update is available.

Regards,

Hi

We have released a new version of Aspose.Words that contains a fix for your issue.

Issue # 4390 - Selected (checked) check boxes become unselected

The new version of Aspose.Words is available for download from here.

Best regards.

Hello,
I am using Aspose.Pdf 4.0.0.0 and Aspose.Words 6.3.0.0 to convert a word doc (.doc) into a pdf file with pre-populated information. The word doc has some checkbox controls on it which are checked or unchecked in the pdf file that is generated from the word doc. On my localhost the checkboxes are converted properly. The resulting pdf file has a nice square with and x in it; unchecked items have a blank box perfectly formatted. When I deploy the web application to our test web server and attempt to generate the pdf file, items that should be checked are not checked and all the check box fields are collapsed and look similar to [] instead of a perfectly squared checkbox. I can’t seem to figure out why this is happening. Your assistance would be greatly appreciated. Thanks in advance.

Hi

Thanks for your request. The problem can occurs because Wingdings2 font is not installed on your test server. Please try to install Wingdings2 font (see attachment). This should fix the problem. Please let me know in case of any issues:

Best regards.

That fixed the problem; I just had to reboot our test server and everything worked fine! Thanks for the quick response.

deleted …
sorry