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.

Wed May 29, 2024 2:56 pm

Hi, I open a Word file containing Smartart. I add watermark into it. And then I save the file as below:

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?

nthuy650
 
Posts: 1
Joined: Wed May 29, 2024 2:43 pm

Thu May 30, 2024 6:05 am

Hi,

Thank you for your inquiry.
I have simulated a test document and tested this issue using our latest version of Spire.Doc 12.5.5, but the SmartArt did not disappear in the output file. I've attached a screenshot of my test for your reference. If you haven't tested with 12.5.5, please download it and test again as it contains more fixes. If the problem persists, please provide your test file for further investigation. You can attach the file here or send it via email to '[email protected]'. Your assistance is greatly appreciated.

Sincerely,
Doris
E-iceblue support team
User avatar

Doris.Liu
 
Posts: 460
Joined: Mon Nov 07, 2022 8:10 am

Return to Spire.Doc

cron