Free Support Forum -

SVG images within HTML are missing letters after conversion to PDF


When we convert an html with svg images to pdf (using aspose.pdf to java), many images miss some of the letters.

Sample Java code:

HTMLDocument htmlDocument = new HTMLDocument(RESOURCE_DIR + "template_with_svg.html");
HtmlRenderer htmlRenderer = new HtmlRenderer();

try(OutputStream outputStream = new FileOutputStream("result_pdf_from_html_with_svg.pdf"))
 htmlRenderer.render(new PdfDevice(new PdfRenderingOptions(), outputStream), htmlDocument);

Sample html:

<html lang="en">
<title>SVG export test</title>
<meta charset="utf-8"/>


<p>Some text</p>


<img src="image1.svg" alt="" />


image1.svg with output in output1.pdf and problem places are provided in the following file, case1 dir: (500.3 KB)


Thanks for sharing further details.

I have worked with source file and sample code shared by you and have been able to observe the issue. I have logged ticket as HTMLJAVA-393 in our issue tracking system. We will further look into details of it and keep you posted with the status of its resolution. Please be patient and spare us some time.

We are sorry for the inconvenience.