ImageSaveOptionsPaperColor Property

Gets or sets the background (paper) color for the generated images.

The default value is White.

Namespace:  Aspose.Words.Saving
Assembly:  Aspose.Words (in Aspose.Words.dll) Version: 20.3
Syntax
public Color PaperColor { get; set; }

Property Value

Type: Color
Remarks

When rendering pages of a document that specifies its own background color, then the document background color will override the color specified by this property.

Examples
Renders a page of a Word document into an image with transparent or colored background.
Document doc = new Document(MyDir + "Rendering.docx");

ImageSaveOptions imgOptions = new ImageSaveOptions(SaveFormat.Png);

imgOptions.PaperColor = Color.Transparent;
doc.Save(ArtifactsDir + "Rendering.SaveToImagePaperColor.Transparent.png", imgOptions);

imgOptions.PaperColor = Color.LightCoral;
doc.Save(ArtifactsDir + "Rendering.SaveToImagePaperColor.Coral.png", imgOptions);
See Also