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.

Thu May 31, 2018 2:41 pm

I am trying to add a watermark to a ".docx" file and save the file. But after adding the watermark and exiting the file I notice that the watermark doesn't saves. I downloaded the latest version of spire.doc 6.5.10 and tried again, but I am still having the same issue. Are there any other fixes for this ?

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

Fri Jun 01, 2018 2:30 am

Dear athomp365,

Thanks for your inquiry.
After an initial testing, I didn't encounter the issue you mentioned. In order to help us investigate further, please share us your input/output document and the code you were using.

Thanks,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Fri Jun 01, 2018 12:56 pm

private void addWaterMark(object sender, RoutedEventArgs e)
{
//create a document object for file
//Stream stream = File.OpenWrite(fileName);
Document doc = new Document();
doc.LoadFromFile(fileName,FileFormat.Docx);

TextWatermark textwm = new TextWatermark
{
Text = "COMCAST",
FontSize = 65,
Layout = WatermarkLayout.Diagonal
};

//adding the watermark to the document
doc.Watermark = textwm;

//saving the file after adding watermark
doc.SaveToFile("demo.docx",FileFormat.Docx);


//open the document for verification
System.Diagnostics.Process.Start("demo.docx");
}




Here is the code I am using also included the document as well.

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

Mon Jun 04, 2018 2:28 am

Dear athomp365,

Thanks for your information.
After testing with the latest Spire.Doc Pack(hot fix) Version:6.5.10, the watermark could be added successfully. I attached the result file for checking. Besides, I also tested the case with free version, there indeed was the issue that the watermark didn't save, so sorry for this.
Please use the latest version and try again. Below are the dlls in it:
Spire.Licesne.dll V1.3.6.40
Spire.Doc.dll V6.5.10.4040
Spire.Pdf.dll V4.5.3.2040

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Fri Jun 08, 2018 9:14 am

Dear athomp365,

Greetings from E-iceblue.
How is your issue going now ?
Could you please give us some feedback at your convenience ?

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Return to Spire.Doc

cron