We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Technical text from content controls are not deleted

  1. There is Word document with empty content controls (EmptyControls.docx)
    Empty content controls have technical text “Click here to enter text”
    2. After conversion technical text remains, but it has to be deleted (see result.pdf)
Hi Ulrik,

Thanks for your inquiry. Please note that Aspose.Words mimics the same behavior as MS Word does. If you convert your document to Pdf using MS Word, you will get the same output. Please use following code example to remove "Click here to enter text" from output document. Hope this helps you.

Document doc = new Document(MyDir + "EmptyControls.docx");

foreach (StructuredDocumentTag std in doc.GetChildNodes(NodeType.StructuredDocumentTag, true))

{

std.Range.Replace("Click here to enter text.", "", false, false);

}

doc.Save(MyDir + "Out.pdf");