We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

SVG is Stretched when Document is Saved to DOCX or PDF using .NET

Recently we have been adding SVGs into our downloadable PDF and Word Documents. We are using 21.4 and the Word Doc is behaving as expected but the PDF when passing through SaveFormat distorts our SVG.


Please ZIP and attach your input Word document along with problematic and expected output PDF files here for testing. We will investigate the issue and provide you more information on it.

Attached is the word document that produces an unwarped SVG and the pdf that has the warped SVG. Below is the svg I am trying to input. Let me know if you need anything else. Thank you @tahir.manzoor
SVG.zip (14.8 KB)

Could you please take the screenshot of PDF, mark the problematic sections of it, and share it here for our reference? We will then log this issue accordingly in our issue tracking system.

Current PDF that is warped:
strechPDF.png (28.8 KB)

Expected presentation:
expectedpdf.png (26.8 KB)

I know with the recent updates the big change with the word document was the conversion of SVG from EMF to PNG. That works great for Word, not sure if it is the same for the PDF format. @tahir.manzoor


We have tested the scenario using the following code example and noticed that the SVG is stretched in both output DOCX and PDF. We have logged this issue as WORDSNET-22261 in our issue tracking system. You will be notified via this forum thread once this issue is resolved. We apologize for your inconvenience.

Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
builder.InsertHtml(File.ReadAllText(MyDir + "input.html"));
doc.Save(MyDir + "21.5.docx");
doc.Save(MyDir + "21.5.pdf");

Hello just checking in on this issue, Thank you.


We try our best to deal with every customer request in a timely fashion, we unfortunately cannot guarantee a delivery date to every customer issue. We work on issues on a first come, first served basis. We feel this is the fairest and most appropriate way to satisfy the needs of the majority of our customers.

We will inform you via this forum thread once there is an update available on this issue.

Hello, just checking back in. I see the status is closed does that mean it has been solved?


Yes, your issue has been resolved and its fix will be available in the next version of Aspose.Words i.e. 21.10. Hopefully, it will be released at the start of next month (October 2021).

1 Like

The issues you have found earlier (filed as WORDSNET-22261) have been fixed in this Aspose.Words for .NET 21.10 update also available on NuGet.

Do you have a forecast for when it will be available for Java?

@Murphynd The fix is already available in the Aspose.Words for Java 21.10 update.