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 Aug 01, 2025 9:27 am

Using spire.doc 13.7.14 on windows vb.net application.

What I need to do is place specific text in certain position (up, down, left, right, up left, up right, down left, down right ) of a word document (at least on it's first page)

After testing what the package provides, I came to the conclusion that the left/right can be implemented using tables and up/down using watermarks.
The later, I create an empty page with the text on the position I want, convert it to image and then add it as watermark. Problem is when there is an image at the word document watermark won't show. From what I searched there is no way to "bring to front" the watermark (pity).

Since my solution works on most situations, I was thinking if there is a way to find if an image exists up/down and if it does try to use another way to set text wanted to.

I'm open to any suggestions

Thank you

nikolakn
 
Posts: 4
Joined: Fri Aug 01, 2025 9:15 am
Location: Greece

Fri Aug 01, 2025 10:39 am

Hello,

Thank you for your inquiry.
If you want to insert an image at a specified position, please refer to this tutorial: Insert Image at Specified Location in C#, VB.NET

We are looking forward to your testing feedback.
Sincerely,
Talia
E-iceblue support team
User avatar

talia.liu
 
Posts: 341
Joined: Mon Apr 14, 2025 3:33 am

Fri Aug 01, 2025 3:41 pm

So you propose to use image instead of watermark.

I guess that image object has property for "bring to front"?

nikolakn
 
Posts: 4
Joined: Fri Aug 01, 2025 9:15 am
Location: Greece

Mon Aug 04, 2025 1:50 am

Sorry for the delayed response due to the weekend on our end.

You are correct. The image object has properties for "bring to front". You can refer to the following code implementation:

Code: Select all
picture.TextWrappingStyle = TextWrappingStyle.InFrontOfText;


I recommend using the image insertion method because it is more flexible compared to the watermark approach. Of course, you can choose based on your needs.
Sincerely,
Talia
E-iceblue support team
User avatar

talia.liu
 
Posts: 341
Joined: Mon Apr 14, 2025 3:33 am

Tue Aug 12, 2025 12:26 pm

Sorry fort the delayed reply, When original document has footer, picture can only be inserted just above footer no matter the value I set for on VerticalPosition

an example
Dim picture As DocPicture = doc.Sections(0).Paragraphs(0).AppendPicture(p)
picture.HorizontalPosition = 50.0F
picture.VerticalPosition = 590.0F

I want to write the text at end of page at all times

nikolakn
 
Posts: 4
Joined: Fri Aug 01, 2025 9:15 am
Location: Greece

Wed Aug 13, 2025 3:17 am

Hello,

Thank you for your inquiry.
I simulated a simple document and conducted preliminary tests using the latest Spire.Doc Version:13.8.1, but did not reproduce the issue you mentioned. Could you please test again using the latest version? If the issue still exists, please provide us with your input document and output document. This information will help us investigate your issue more accurately and offer an effective solution. You may upload the files as attachments or send them directly to my email: [email protected] in advance.
Sincerely,
Talia
E-iceblue support team
User avatar

talia.liu
 
Posts: 341
Joined: Mon Apr 14, 2025 3:33 am

Return to Spire.Doc