DocumentBasePageColor Property

Gets or sets the page color of the document. This property is a simpler version of BackgroundShape.

Namespace:  Aspose.Words
Assembly:  Aspose.Words (in Aspose.Words.dll) Version: 21.10.0

ExpandedSyntax

public Color PageColor { get; set; }

Property Value

Type: Color

ExpandedRemarks

This property provides a simple way to specify a solid page color for the document. Setting this property creates and sets an appropriate BackgroundShape.

If the page color is not set (e.g. there is no background shape in the document) returns Empty.

ExpandedExamples

Shows how to set the background color for all pages of a document.
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
builder.Writeln("Hello world!");

doc.PageColor = System.Drawing.Color.LightGray;

doc.Save(ArtifactsDir + "DocumentBase.SetPageColor.docx");

ExpandedSee Also