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


Thread ID:





82577 Jun 16,2009 07:47 PM UTC Jun 24,2009 03:32 PM UTC ASP.NET Web Forms (Classic) 4
Tags: PDF
Angel Torres
Asked On June 16, 2009 07:47 PM UTC

Hi to all!!!! I'm new using this product, I only have the evaluation. I'm working on a report for the company I work for. I'm in need to convert the report I made to PDF, so what I'm trying to do is convert the report to PDF (HTML to PDF). Im working with VS2005.NET using C#. I tried the product HTMLTOPDF with the dll ephtmltopdf. It works but when I need to create a large report it has problems so I'm trying this product. My question is what dll's I need to install on my Bin Folder to generate the PDF file from my html? Also I will like some code on C# to export what I have.


Angel Torres
Replied On June 17, 2009 02:20 PM UTC

I made the code and it works great. My question now is, how can I insert the number of pages in the footer of every page.

Angel Torres
Replied On June 17, 2009 02:55 PM UTC

Also how can I avoid PageBreaking on the pdf because I have a Big GridView Report with a Chart on the end of the report and it is cutting the Chart Information and some parts of the Report.

Angel Torres
Replied On June 17, 2009 06:58 PM UTC

I use this code and it worked with the version but when i changed the dlls to version it does not work. What can I do to make it work on the newest version.

using Syncfusion.Pdf;
using Syncfusion.Pdf.Shared;
using Syncfusion.HtmlConverter;

string myURL = Request.Url.ToString();
PDFDocument doc = new PDFDocument();
doc.Compression = CompressionLevel.Normal;

IPDFGraphicState properties = doc.CreateGraphicState();
properties.SplitImages = true;
properties.BreakBehavior = AutoBreakBehavior.MultiLineTextBreak;

using (HtmlConverter html = new HtmlConverter())
m_converter = html;
//string path;

using (System.Drawing.Image bmp = html.ConvertToImage(myURL, ImageType.Bitmap))
if (bmp != null)
doc.LastPage.Margins.All = 0;
SizeF dest = new SizeF();
if (bmp.Width > doc.LastPage.DrawingWidth)
dest = new SizeF(doc.LastPage.DrawingWidth, -1);
dest = bmp.Size;
doc.LastPage.Graphics.DrawImage(PointF.Empty, bmp, dest, properties);
doc.LastPage.Margins.Bottom = 65;

string path = "htmltopdf.pdf";
doc.Save(path, Response, HttpReadType.Save);
m_converter = null;


Karthik M [Syncfusion]
Replied On June 24, 2009 03:32 PM UTC

Hi Angel,

Thank you for your interest in Essential PDF.

Basically, starting from our Essential PDF v5.2.0.25, we had introduced our new version of Essential PDF which is the complete re-write of our older Pdf version with improved performance and easy to use APIs. Since the code-snippet which you have used corresponds to our older version of the legacy PDF, this will not work with our newer version.

Please do find the documentation link explaining the HtmlToPDF conversion from the below location.


Also, please do find our online sample from the below location.


Please try this and let us know if you have any questions.



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

or the page will be automatically redirected to 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