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.

Mon Feb 06, 2023 2:42 pm

Hello,

I want to convert html to word document, the html contains SVG images. Itried to add these in the same way as regular (jpeg, png) images, but to no success. Am unable to view the svg image in word document.

Also can you share what are the image types supported especially adding the image to word document.

'Also I don't see the word version 2016 in Spire.Doc.FileFormat

ranjanirj
 
Posts: 3
Joined: Mon Feb 06, 2023 2:39 pm

Tue Feb 07, 2023 9:51 am

Hi,

Thanks for your inquiry.
First, sorry our Spire.Doc doesn’t support adding SVG image into a word document at present, we have added it as a new feature into our upgrade list with the ticket number SPIREDOC-3599. Once it is available in the future, we will let you know.
Second, we process images using system.Image and System.Bitmap, which encapsulate MS’s GDI + library (https://learn.microsoft.com/en-us/windows/win32/gdiplus/-gdiplus-gdi-start), Spire.Doc supports the formats that GDI+ supports, including BMP、GIF、EXIF、JPG、PNG and TIFF .
Third, we will add the higher version like Docx2016 in FileFormat enum with the ticket number SPIREDOC-8280. When it is achieved in the future, I will inform you.
If you have any other questions, just feel free to contact us.

Sincerely,
Triste
E-iceblue support team
User avatar

Triste.Dai
 
Posts: 1000
Joined: Tue Nov 15, 2022 3:59 am

Mon Apr 10, 2023 9:17 am

Hi,

Glad to inform you that we just released Spire.Doc 11.4.0 hotfix, which has added the higher version like Docx2016 in FileFormat enum, please download the latest version from the following links and have a test.
Website link: https://www.e-iceblue.com/Download/download-word-for-net-now.html
Nuget link: https://www.nuget.org/packages/Spire.Doc/11.4.0

Best regards,
Triste
E-iceblue support team
User avatar

Triste.Dai
 
Posts: 1000
Joined: Tue Nov 15, 2022 3:59 am

Mon Jun 19, 2023 9:07 am

Hi,

Thanks for your patience.
We are delighted to inform you that the latest version of our doc product now supports inserting SVG images. Please refer to the following code.
Code: Select all
Document document = new Document();
Section section = document.AddSection();
Paragraph paragraph = section.AddParagraph();
DocPicture picture = paragraph.AppendPicture(@"template.svg");
document.SaveToFile(@"Sample.docx", FileFormat.Docx);

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

Best regards,
Triste
E-iceblue support team
User avatar

Triste.Dai
 
Posts: 1000
Joined: Tue Nov 15, 2022 3:59 am

Fri Feb 16, 2024 12:46 pm

Hi
I am getting error as "Index outside of range" when adding valid svg file to doc.

Code is as below

void MailMerge_MergeField(object sender, Spire.Doc.Reporting.MergeFieldEventArgs args)
{

args.CurrentMergeField.OwnerParagraph.AppendPicture(@"D:\test\gallardo.svg");


}

Sample svg file is attached as zip.

hemantahire
 
Posts: 10
Joined: Tue Feb 28, 2023 9:58 am

Sun Feb 18, 2024 1:53 am

Hello hemantahire,

Thank you for your inquiry.
I tested the SVG file you provided and did reproduce the issue you mentioned. I have logged the issue into our bug tracking system with the ticket number SPIREDOC-10313. Our development team will investigate and fix it. Once it is resolved, I will inform you in time. Sorry for the inconvenience caused.

Sincerely,
Annika
E-iceblue support team
User avatar

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

Tue Feb 20, 2024 7:32 am

Hi Annika,
Thanks for your response.
In this thread one of the comment from your team has stated that spire.doc is supporting svg images.
Could you please confirm why its not working with my image. Or you are not supporting svg at all?

hemantahire
 
Posts: 10
Joined: Tue Feb 28, 2023 9:58 am

Tue Feb 20, 2024 8:07 am

Hello,

Thank you for your feedback.

Regarding the issue SPIREDOC-10313, our development team is currently investigating the root cause, and at present, we have not yet determined the exact reason. It is suspected that the error may be attributed to our product incorrectly parsing your SVG images. Furthermore, the functionality of adding SVG images to Word documents is supported; however, it is important to note that the structures of different document contents can vary, and we are progressively working towards ensuring compatibility and addressing these variations.

We appreciate your understanding and patience as we strive to resolve this issue. If you have any further inquiries or require additional assistance, please feel free to contact us.

Sincerely,
Annika
E-iceblue support team
User avatar

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

Tue Feb 20, 2024 9:39 am

Hi Annika,
Thanks for you prompt response!
Really appreciated. I will wait for updates from your end.

Thanks,
Hemant.

hemantahire
 
Posts: 10
Joined: Tue Feb 28, 2023 9:58 am

Mon Apr 22, 2024 11:11 am

Hi team,
Any updates on this?

Thanks,
Hemant.

hemantahire
 
Posts: 10
Joined: Tue Feb 28, 2023 9:58 am

Tue Apr 23, 2024 9:30 am

Hello,

Thank you for your follow-up.

Regarding the matter of SPIREDOC-10313, I regret to inform you that due to the complexity of the issue, a complete resolution has not yet been achieved. I have urged our development team to expedite the resolution process. Rest assured that I will promptly inform you of any significant updates as they arise.

Your understanding and support during this time are greatly appreciated. Should you have any further questions or concerns, please do not hesitate to reach out to me.

Thank you for your patience and cooperation.

Sincerely,
Annika
E-iceblue support team
User avatar

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

Wed Sep 23, 2026 7:38 am

Hello,

Glad to inform you that we released the Spire.Doc Pack(hot fix) Version:14.9.11, which contains the fix of the bug SPIREDOC-10313 you reported. Please download it from the following link.
Website link: https://www.e-iceblue.com/Download/download-word-for-net-now.html
Nuget link: https://www.nuget.org/packages/Spire.Doc/14.9.11
https://www.nuget.org/packages/Spire.Docfor.NETStandard/14.9.11

Sincerely,
William
E-iceblue support team
User avatar

William.Zhang
 
Posts: 757
Joined: Mon Dec 27, 2021 2:23 am

Return to Spire.Doc