Spire.Doc is a professional Word .NET library specifically designed for developers to create, read, write, convert and print Word document files. Get free and professional technical support for Spire.Doc for .NET, Java, Android, C++, Python.

Fri Jun 05, 2015 6:51 am

Hello,

Thanks for sharing information.
In your original document, the image in header we can see doesn't exist in content control, which is only a image, so actually the content control doesn't have image, so there will be two images after replacing the image.
Concerning the other issue, the image is inserted into document as its original size, if you want it to be same as the previous image size, you need to get the previous image size, then scale the new inserted image like as below.
Code: Select all
picture.HeightScale = 58;
picture.WidthScale = 58;


Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy
 
Posts: 802
Joined: Mon Jan 19, 2015 6:14 am

Mon Jun 08, 2015 7:47 am

Thanks for the code.

For the image problem. Exact, you're right. I remember why now.

If we add an image in a ContentControl, there's no way to have multiple ContentControls on the right of the image.

So in my case, the solution will be to modify image number 1 in document resources.

nolme
 
Posts: 79
Joined: Fri Apr 24, 2015 3:56 pm

Mon Jun 08, 2015 8:25 am

Hello,

Please feel free to contact us if there is any questions or needs.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy
 
Posts: 802
Joined: Mon Jan 19, 2015 6:14 am

Return to Spire.Doc