Spire.Doc is a professional Word .NET library specifically designed for developers to create, read, write, convert and print Word document files from any .NET platform (C#, VB.NET, ASP.NET, .NET Core) and Java applications (J2SE and J2EE) with fast and high quality performance.

Thu Jan 20, 2011 8:57 am

I want to beautify my word document by setting the color and picture of the background. How to do it? Could you help me?

Posts: 14
Joined: Tue Nov 30, 2010 7:21 am

Thu Jan 20, 2011 9:15 am

Thank you for your inquiry!
When you set the color and picture of the background, you may first specify the background type, and set it. We will write the function for a demo soon. The following code is to set the color of the background:
document.Background.Type = BackgroundType.Color;
document.Background.Color = Color.Blue;
The following code is to set the picture of the background:
document.Background.Type = BackgroundType.Picture;
document.Background.Picture = Image.FromFile("Sample.jpg");
e-iceblue support
User avatar

iceblue support
Posts: 240
Joined: Tue Dec 21, 2010 2:56 am

Return to Spire.Doc