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 May 25, 2018 5:27 pm

Is anyway that you can check to see if a word doc has a watermark? I couldn't find anything in the documentation.

athomp365
 
Posts: 6
Joined: Thu May 24, 2018 12:37 pm

Mon May 28, 2018 3:03 am

Hello athomp365,

Thanks for your post.
You could simply check that according to the type of the watermark. Below is the code for your kind reference.
Code: Select all
Document doc = new Document();
doc.LoadFromFile(@"input.docx");
WatermarkType type = doc.Watermark.Type;
if (type==WatermarkType.NoWatermark)
{
    MessageBox.Show("No watermark in this document");
}
else
{
    MessageBox.Show("There's a"+type.ToString());
}


Sincerely,
Jane
E-iceblue support team
User avatar

Jane.Bai
 
Posts: 1156
Joined: Tue Nov 29, 2016 1:47 am

Tue May 29, 2018 8:32 am

Hi athomp365,

How are you?
Has the issue got resolved?
Your feedback would be greatly appreciated.

Sincerely,
Jane
E-iceblue support team
User avatar

Jane.Bai
 
Posts: 1156
Joined: Tue Nov 29, 2016 1:47 am

Tue May 29, 2018 11:47 am

Hello Jane,
I am doing well, thank you so much for the reply I was able to locate the watermark.

athomp365
 
Posts: 6
Joined: Thu May 24, 2018 12:37 pm

Wed May 30, 2018 1:10 am

Dear athomp365,

Thank you so much for your feedback.
Just feel free to contact us if you need assistance.

Sincerely,
Jane
E-iceblue support team
User avatar

Jane.Bai
 
Posts: 1156
Joined: Tue Nov 29, 2016 1:47 am

Return to Spire.Doc