We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

SVG is missing in converted PDF.

Thread ID:





123715 Apr 13,2016 12:46 PM UTC Apr 27,2016 10:54 AM UTC ASP.NET MVC 5
Tags: PDF
Asked On April 13, 2016 12:46 PM UTC


I am using "http://mvc.syncfusion.com/demos/web/pdf/htmltopdf" tool to convert webpage into PDF. 
I tried to convert "http://www.w3schools.com/svg/svg_inhtml.asp" webpage into pdf. This page has SVG embedded in it. Page gets converted into PDF.  But SVG is missing in it when I view that PDF using Adobe Reader. SVG is missing even when I view that PDF in browser using "Open Document inside Browser" option enabled.  It seems this tool is not converting SVG into PDF or there might be an alternate method for achieving this feature that I am not aware of. Please let me know how can I fix this issue.

Thank you,


Abirami Selvan [Syncfusion]
Replied On April 14, 2016 10:03 AM UTC

Hi Rekha,
Thank you for contacting Syncfusion support.
When we try to convert the URL which you have provided , we can see the behavior SVG is not rendered correctly in output PDF document. We are internally using IE engine to convert the HTML to Image and then we are converting image to PDF. This issue occurs in IE engine itself. So we are suggesting you to use our new WebKit engine to convert SVG to PDF. We have created the sample for you reference.
Please refer to the sample in the following link:
You can get WebKit installer in the following link:
https://www.syncfusion.com/downloads/latest-version (WebKitHTMLConverter)
Please refer to the following link for more details :
Please try this and let us know if you need any further assistance.

Replied On April 22, 2016 05:35 AM UTC

Thank you Abirami. The example helped us. And it is meeting our requirements. 

Abirami Selvan [Syncfusion]
Replied On April 25, 2016 05:40 AM UTC

Hi Rekha,  
Thank you for your update.  Please let us know if you need any further assistance. 

Replied On April 26, 2016 01:36 PM UTC

Hi Abirmani,

I am able to generate the PDFs using any HTML Template, so that certainly works. However ALL generated PDFs are plauged with following problem as seen in screenshot : http://screencast.com/t/6EvGR5UlXn, where white blank space is rendered towards end of the generated PDF. I have attached a sample PDF, so you can get a better sense of the white space. Also I have attached sample code, so you can easily recreate the problem.
Can you please propose how the additional white space can be rendered ?

Best Regards,

Attachment: Sample_1cd013d5.zip

Abirami Selvan [Syncfusion]
Replied On April 27, 2016 10:54 AM UTC

Hi Rekha, 
The behavior of the HTML to PDF converter is it will fit the content to the width of the page by default. So this leads to the large space below the HTML content. To overcome this we suggest you to increase the width of the PDF document or you can change the Viewport size accordingly. We have attached the sample for your reference. 
Please find the sample code example : 
WebKitConverterSettings webKitSettings = new WebKitConverterSettings(); 
//set orientation 
webKitSettings.Orientation = PdfPageOrientation.Landscape; 
//set view port 
webKitSettings.WebKitViewPort = new Size(1200, 1200); 
webKitSettings.WebKitPath = @"../../QtBinaries"; 
Please refer to the following sample: 
Please try this and let us know if you need any further assistance. 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon