Click here to Skip to main content
15,936,349 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi friends,
I have one panel with number of label values inside the aspx page...I need to save the panel datas in pdf format.....
Updated 22-Mar-17 21:47pm

abcpdf is a handy tool which I have used.....
Share this answer
You can look this:


or you can search the
wnvhtmltopdf.dll, v4.0.30319
on google and download it
use this code
/// <summary>
/// htm lto byte array
/// </summary>
/// <param name="url">file path</param>
/// <returns>byte array</returns>
public byte[] HtmlToPdfBytes(string htmlContent)
    if (string.IsNullOrWhiteSpace(htmlContent))
        return null;
        HtmlToPdfConverter htmlToPdfConverter = new HtmlToPdfConverter();
        htmlToPdfConverter.LicenseKey = "NLqpu6quu6u7qqq1q7uoqrWqqbWioqKi";
        htmlToPdfConverter.PdfDocumentOptions.PdfPageSize = PdfPageSize.A4;
        htmlToPdfConverter.PdfDocumentOptions.BottomMargin = 30;
        htmlToPdfConverter.PdfDocumentOptions.TopMargin = 30;
        htmlToPdfConverter.PdfDocumentOptions.LeftMargin = 30;
        htmlToPdfConverter.PdfDocumentOptions.RightMargin = 30;
        htmlToPdfConverter.DownloadAllResources = true;
        htmlToPdfConverter.NavigationTimeout = 6000;
        //htmlToPdfConverter.ImagePartSize = 4000;
        return htmlToPdfConverter.ConvertHtml(htmlContent, "");
    catch (Exception ex)
        logger.Error("html to byte  array  function have some error ,the error message is :", ex.Message);
        return null;

hope this helps you.
Share this answer
CHill60 23-Mar-17 5:51am    
I doubt the OP has waited 5 years for this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900