hidden property

Font.hidden property

True if the font is formatted as hidden text.

@property
def hidden(self) -> bool:
    ...

@hidden.setter
def hidden(self, value: bool):
    ...

Examples

Shows how to create a run of hidden text.

doc = aw.Document()
builder = aw.DocumentBuilder(doc)
# With the Hidden flag set to true, any text that we create using this Font object will be invisible in the document.
# We will not see or highlight hidden text unless we enable the "Hidden text" option
# found in Microsoft Word via "File" -> "Options" -> "Display". The text will still be there,
# and we will be able to access this text programmatically.
# It is not advised to use this method to hide sensitive information.
builder.font.hidden = True
builder.font.size = 36
builder.writeln('This text will not be visible in the document.')
doc.save(file_name=ARTIFACTS_DIR + 'Font.Hidden.docx')

See Also