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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Simple HTML to PDF example

Thread ID:

Created:

Updated:

Platform:

Replies:

107424 Feb 28,2013 07:55 PM UTC Mar 8,2013 06:31 AM UTC ASP.NET MVC (Classic) 3
loading
Tags: PDF
Bryan Lewis
Asked On February 28, 2013 07:55 PM UTC

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

KarthikeyanC [Syncfusion]
Replied On 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


Bryan Lewis
Replied On 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


KarthikeyanC [Syncfusion]
Replied On 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

CONFIRMATION

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.

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

;