- Code: Select all
var doc = new Document();
doc.LoadFromFile(filePath);
doc.Watermark = new Spire.Doc.TextWatermark() { Text = "DRAFT", FontSize = 72 };
doc.SaveToFile(filePath);
doc.Close();
After that, I open the file (with watermark) and convert it to PDF as below:
- Code: Select all
var doc = new Document();
doc.LoadFromFile(filePath);
doc.SaveToFile("temp.pdf", FileFormat.PDF);
doc.Close();
=> However, the SmartArt is lost in the converted PDF file. I noticed that the Word file with the watermark is smaller in size than the original one. Is there any chance that the SmartArt is being ignored? The content in the two Word files (original and with watermark) is exactly the same.
I have tried the same process with the LiveDemo on e-iceblue and observed same result.
Interestingly, if I open and edit the file with watermark (like deleting one letter), the SmartArt is shown correctly in the PDF.
Can someone try and help me?