from html to pdf

Good evening

I would like to create a report from a part of an html code. I mean, If the web page shows an ejChart and ejGrid, I would like to export to pdf. Can it be possible?


3 Replies

KC Karthikeyan Chandrasekar Syncfusion Team February 22, 2018 09:41 AM UTC

Hi Luis, 
Thank you for your interest in Syncfusion Products. 

I would like to create a report from a part of an html code. 
You can convert a part of HTML to PDF by using our HTML to PDF converter. Please refer the below UG for more details. 
 If the web page shows an ejChart, I would like to export to pdf. 
If you want to export ejChart as PDF, please refer the below documentation. 
 If the web page shows an ejGrid, I would like to export to pdf. 
If you want to export ejGrid as PDF, please refer the below documentation. 
Please let us know if your requirement can be achieved with the provided information.  
Regards, 
Karthikeyan.C 



LC Luis Carlos February 22, 2018 09:57 AM UTC

I have been reading the documentation of this link and I realised it works perfectly if the HTML contains only text.

 However if the HTML contains watermarks, logo, charts and text as the below image, I am not sure if it could be converted to PDF.

Could you give me some samples with watermarks, logo, charts and text?



I will be awaiting for your reply, thanks in advance.

Regards, Luis Carlos.


PV Prakash Viswanathan Syncfusion Team February 23, 2018 01:37 PM UTC

Hi Luis, 
 
Our HTML converter preserves the output PDF document as how the input HTML file in displayed on web browsers. For converting partial webpage to PDF, our converter preserves all the HTML elements inside the given HTML element ID.  
 
We have created sample for converting particular chart to PDF in a web page. Please find the sample from below link, 
 
For converting full web page to PDF, then we need to provide the URL alone. Please refer below code snippet, 
//Convert URL to PDF 
PdfDocument document = htmlConverter.Convert(url); 
 
 
Please let us know if you need any further assistance on this. 
 
Regards, 
Prakash V 


Loader.
Up arrow icon