Background color and picture

Technical support for Spire.Doc

Moderator: iceblue support

Background color and picture

Postby tom » 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?
tom
 
Posts: 14
Joined: Tue Nov 30, 2010 7:21 am

Re: Background color and picture

Postby iceblue support » 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: 244
Joined: Tue Dec 21, 2010 2:56 am


Return to Spire.Doc

Who is online

Users browsing this forum: No registered users and 0 guests