Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.

Tue Jan 02, 2024 11:33 am

Hello,

our client reported that GIF is converted to PNG after merge. I tested and found that the issue is introduced in version 8.5.3.

Sample template is attached.

Regards

profiler007
 
Posts: 73
Joined: Wed Nov 13, 2019 11:32 am

Wed Jan 03, 2024 2:35 am

Hello,

Thank you for your inquiry.
I have tested the Word file you provided using the latest version of Spire.Office for .NET Standard 8.12.2, and I was able to reproduce the issue you mentioned. I have logged the issue into our bug tracking system with the ticket number SPIREDOC-10160. Our development team will investigate and fix it. Once it is resolved, I will inform you in time. Sorry for the inconvenience caused.
Additionally, here is the test code I used:
Code: Select all
 Document document = new Document();
 document.LoadFromFile("template_gif.docx", FileFormat.Auto);

 Document documentMerge = new Document();
 documentMerge.LoadFromFile("template_gif - clone.docx", FileFormat.Auto);
 documentMerge.KeepSameFormat = true;
 foreach (Section sec in documentMerge.Sections)
 {
     document.Sections.Add(sec.Clone());
 }
 document.SaveToFile("Sample.docx", FileFormat.Docx);

Sincerely,
Annika
E-iceblue support team
User avatar

Annika.Zhou
 
Posts: 1657
Joined: Wed Apr 07, 2021 2:50 am

Wed Jan 03, 2024 6:37 am

Hello,

thanks for the quick reply! Here is my code:

Code: Select all
foreach (DataRow dr in data.Rows)
{
    using (var document = new Document())
    {
        document.LoadFromFile(template);

        var resultFile = Path.GetTempFileName() + ".docx";

        document.MailMerge.Execute(dr);
        document.SaveToFile(resultFile, FileFormat.Docx);
    }
}


Regards

profiler007
 
Posts: 73
Joined: Wed Nov 13, 2019 11:32 am

Wed Jan 03, 2024 7:07 am

Hello,

Thank you for your feedback.
I have tested the code you provided and confirmed that the issue persists.
I have made the necessary modifications to the code on the SPIREDOC-10160 ticket, using the code you shared. This will help our development team in their investigation and resolution process.
Rest assured that once this problem is fixed, I will notify you promptly.

Sincerely,
Annika
E-iceblue support team
User avatar

Annika.Zhou
 
Posts: 1657
Joined: Wed Apr 07, 2021 2:50 am

Thu Feb 29, 2024 10:11 am

Hello,

Thanks for your patient waiting.
I’m writing to inform you that the SPIREDOC-10160 has been resolved. Please download the hotfix (Spire.Doc Pack(hot fix) Version:12.2.10) from the following link.

Website download link: https://www.e-iceblue.com/Download/download-word-for-net-now.html
Nuget download link: https://www.nuget.org/packages/Spire.Doc

Sincerely,
Annika
E-iceblue support team
User avatar

Annika.Zhou
 
Posts: 1657
Joined: Wed Apr 07, 2021 2:50 am

Return to Spire.PDF

cron