LayoutOptions.ShowHiddenText property

Gets or sets indication of whether hidden text in the document is rendered. Default is false.

public bool ShowHiddenText { get; set; }


This property affects all hidden content, not just text.


Shows how to hide text in a rendered output document.

Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
// Insert hidden text, then specify whether we wish to omit it from a rendered document.
builder.Writeln("This text is not hidden.");
builder.Font.Hidden = true;
builder.Writeln("This text is hidden.");

doc.LayoutOptions.ShowHiddenText = showHiddenText;

doc.Save(ArtifactsDir + "Document.LayoutOptionsHiddenText.pdf");

See Also