LayoutOptions Class |
Namespace: Aspose.Words.Layout
The LayoutOptions type exposes the following members.
| Name | Description | |
|---|---|---|
| RevisionOptions |
Gets revision options.
| |
| ShowComments |
Gets or sets indication of whether comments are rendered.
Default is True.
| |
| ShowHiddenText |
Gets or sets indication of whether hidden text in the document is rendered.
Default is False.
| |
| ShowParagraphMarks |
Gets or sets indication of whether paragraph marks are rendered.
Default is False.
| |
| TextShaperFactory |
Gets or sets ITextShaperFactory implementation used for Advanced Typography rendering features.
|
| Name | Description | |
|---|---|---|
| Equals | (Inherited from Object.) | |
| GetHashCode | (Inherited from Object.) | |
| GetType | (Inherited from Object.) | |
| ToString | (Inherited from Object.) |
You do not create instances of this class directly. Use the LayoutOptions property to access layout options for this document.
Note that after changing any of the options present in this class, UpdatePageLayout method should be called in order for the changed options to be applied to the layout.
Document doc = new Document(); Assert.IsFalse(doc.LayoutOptions.ShowHiddenText); Assert.IsFalse(doc.LayoutOptions.ShowParagraphMarks); // The appearance of revisions can be controlled from the layout options property doc.StartTrackRevisions("John Doe", DateTime.Now); doc.LayoutOptions.RevisionOptions.InsertedTextColor = RevisionColor.BrightGreen; doc.LayoutOptions.RevisionOptions.ShowRevisionBars = false; DocumentBuilder builder = new DocumentBuilder(doc); builder.Writeln( "This is a revision. Normally the text is red with a bar to the left, but we made some changes to the revision options."); doc.StopTrackRevisions(); // Layout options can be used to show hidden text too builder.Writeln("This text is not hidden."); builder.Font.Hidden = true; builder.Writeln( "This text is hidden. It will only show up in the output if we allow it to via doc.LayoutOptions."); doc.LayoutOptions.ShowHiddenText = true; doc.Save(ArtifactsDir + "Document.LayoutOptions.pdf");