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

Free Support Forum - aspose.com

Font hidden property behaves differently for PDF vs Word

Hi Team,

I’m using Aspose.Words 14.5.
If I set font hidden property to true, the text is seen in Word output but the same text is hidden in PDF document. Why is such a difference.

Thanks,
Kumar

private static void testHidden(DocumentBuilder docBuilder) throws Exception
{
docBuilder.write(“This text is shown”);
docBuilder.writeln();

docBuilder.getFont().setHidden(true);

docBuilder.write(“This text is hidden”);
}

Hi Kumaraswamy,


Thanks for your inquiry. Please make sure that “Show/Hide paragraph marks and other hidden formatting symbols” option is turned off in Microsoft Word. Also, to turn off the display of hidden text in Microsoft Word, please follow these steps:

  1. Display the Word Options dialog box. (In Word 2007 click the Office button and then click Word Options. In Word 2010 and Word 2013 display the File tab of the ribbon and then click Options.)
  2. Click Display at the left side of the dialog box.
  3. Click the Hidden Text check box. Make sure it is empty.
  4. Click on OK.

I hope, this helps.

Best regards,

Perfect! Thanks Awais.