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.

Tue Apr 03, 2018 7:46 pm

Having a little trouble adding the same image to every single page of my document. Image gets added only to the first page.
My document has a single paragraph, but that paragraph can span multiple pages, depending on the size of the data.

The image is like a header, meaning it should appear on every page, but it's supposed to go in the body of every page.

Is there a way to accomplish this? Would appreciate any help.

eli347
 
Posts: 2
Joined: Tue Apr 03, 2018 7:41 pm

Wed Apr 04, 2018 6:09 am

Hello,

Thanks for your inquiry. If you must add the image to the body for each pages, I am sorry to say it's not achievable. Because MS Word document is flow document and does not contain any information about its layout into lines and pages. So we can't know which position of the paragraph that should be inserted a image.
Maybe you could try setting Image Background or inserting Image Header.
Set image background for word document in C#
Insert Image Header and Footer for Word


Best regards,
Simon
E-iceblue support team
User avatar

Simon.yang
 
Posts: 620
Joined: Wed Jan 11, 2017 2:03 am

Wed Apr 04, 2018 3:42 pm

Simon,

Appreciate your response. I think the background solution is good, but I see that it doesn't really work as I would expect. The background image does not resize relative to the page. Meaning, when I change the zoom on the page, the picture loses orientation and size as well.

Is there any way around it, or am I missing something?

eli347
 
Posts: 2
Joined: Tue Apr 03, 2018 7:41 pm

Thu Apr 05, 2018 3:48 am

Hello,

Thanks for your feedback. Yes, when setting the image as background image, it doesn't resize relative to the page while changing the zoom. It's the same as MS Word does. For your case, you could try to add image watermark instead. Please refer to the below documentation and have a try.
Add text watermark and image watermark to word document in C#

Best regards,
Simon
E-iceblue support team
User avatar

Simon.yang
 
Posts: 620
Joined: Wed Jan 11, 2017 2:03 am

Mon Apr 09, 2018 9:40 am

Hello,

Greeting from E-iceblue.
How is the issue going? Is the solution of watermark helpful to you?
Your feedback will be greatly appreciated.

Best regards,
Simon
E-iceblue support team
User avatar

Simon.yang
 
Posts: 620
Joined: Wed Jan 11, 2017 2:03 am

Return to Spire.Doc