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

Free Support Forum - aspose.com

How to make the picture clear?

SVG images become blurred after HtmlFragment is added to PDF. Is it to increase dPI? How to make the picture clear?

String strSpanQues = "";
strSpanQues += "<img src='http://apitest....net/t/3/18.svg' />";

HtmlFragment    text6 = new HtmlFragment(strSpanQues);

pdf.png (22.2 KB)


We have tested the scenario using the following code example with latest version of Aspose.PDF for Java 22.2 and faced exception. Could you please share the Aspose.PDF and Java version that you are using? We will investigate this issue further and provide you more information on it.

Document pdfDocument = new Document();
Page pdfPage = pdfDocument.getPages().add();
HtmlFragment htmlFragment = new HtmlFragment("<img src='http://apitest.canpoint.net/t/3/18.svg' />");
FloatingBox box1 = new FloatingBox(500, 500);
pdfDocument.save(MyDir + "22.2.pdf");

Aspose.pdf : 21.10

java version “1.8.0_121”
Java™ SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot™ 64-Bit Server VM (build 25.121-b13, mixed mode)


We have managed to reproduce the same issue at our side. For the sake of correction, we have logged this problem in our issue tracking system as PDFJAVA-41404. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

Thank you very much.