Hi @awais.hafeez,
Please find the input, and respective PDF’s with the SaveOptions.UpdateSdtContent value set as true and false.
Please see that there is no change in the final PDF even with the SaveOptions.UpdateSdtContent value as true or false.
The checkbox are still being marked on the first page, while the input document doesn’t have checkbox marked.
Have you tried the latest version of Aspose.Words for .NET i.e. 19.9 on your end? In case the problem still remains, please ZIP and upload your input Word document, Aspose.Words generated PDF file showing the undesired behavior and piece of source code here for testing. We will then investigate the issue on our end and provide you more information.
Please check the file input.docx and the input.pdf on Page 1 itself. If you open the document in the Microsoft Word, it does not render the checkboxes but aspose does.
Hi @tahir.manzoor,
This doesn’t work if we enable the preserveformfield.
com.aspose.words.Document doc = new com.aspose.words.Document("C:\\Input.docx");
HandleDocumentWarnings callback = new HandleDocumentWarnings();
doc.setWarningCallback(callback);
PdfSaveOptions pdfSaveOptions = new PdfSaveOptions();
pdfSaveOptions.setPreserveFormFields(true);
pdfSaveOptions.setUpdateSdtContent(false);
doc.save("C:\\out_preserve2.pdf", pdfSaveOptions);
If I set PreserveFormField as true, it doesn’t matter , whatever I set in setUpdateSdtContent, the output is still same and checkboxes are not rendered correctly which would have been rendered, if setUpdateSdtContent set to false.
We tested the scenario and have managed to reproduce the same problem on our end. For the sake of any correction, we have logged this problem in our issue tracking system. The ID of this issue is WORDSNET-19399. We will further look into the details of this problem and will keep you updated on the status of correction. We apologize for your inconvenience.