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. Image for the cookie policy date

Simple HTML to PDF example

I have reviewed the sample provided and I still cannot get it working for my basic MVC application.  I have a simple HTML snippet that I pull from a DB, I want to take that HTML string, convert it to a PDF and return it directly to the browser (using content-disposition to force download and set the file name).  This is just a simple MVC GET request.  Is a nice simple example to be had?

thanks,
Bryan

3 Replies

KC Karthikeyan Chandrasekar Syncfusion Team March 5, 2013 09:20 AM UTC

Hi Bryan,

Thank you for your interest in Syncfusion Products.

 

I have attached a sample which converts Html string to Pdf in MVC.

Html String to Pdf_MVC.zip

 

Refer the sample, and let me know if it helps you.

Please let us know if you have any other concern.

 

 

Thanks,

Karthikeyan.C



BL Bryan Lewis March 6, 2013 04:25 PM UTC

Thanks.  I have not tested it yet, but this makes things much clearer.  Previously I was not seeing the relationship between the doc, page and result variables, specifically how the result got into the doc.  Now I see how the page is added to the doc and the result is rendered into it.

Thanks again,
Bryan



KC Karthikeyan Chandrasekar Syncfusion Team March 8, 2013 06:31 AM UTC

Hi Bryan,
Thank you for your update.
 
Please let us know if you have any concern.
 
Thanks,
Karthikeyan.C

Loader.
Live Chat Icon For mobile
Up arrow icon