locked
How to Convert HTML to Image RRS feed

  • Question

  • User-1850668873 posted

     HI all,

    I was struggling for the process/code to convert html to image. Please suggest any tutorials for this. And also any code help greatly appreciated.

     

    thanks and regards,

    Vijaycanaan.

     

    Friday, December 5, 2008 10:36 AM

Answers

  • User1584657764 posted

     You can do this with the help of either an ActiveX control:

    http://www.guangmingsoft.net/htmlsnapshot/help.htm

    Or you may go for the alternative HTML to PDF which is much more tested and working feature..

    Some samples are:

    http://www.codeproject.com/KB/aspnet/HTML2PDF.aspx

    Try the PDF Metamorphosis .Net, it transforms HTML to PDF on fly.

    PDF Technologies

    thread http://forums.asp.net/t/956392.aspx too

    The HTML to PDF library for .NET  from http://www.dotnet-reporting.com or the HTML to PDF converter from http://www.winnovative-software.com. It's pure .NET library, it doesn't use a printer driver. There is also a free html to pdf converter application built on top of this library. The conversion can be done with only a few lines of code:

    PdfConverter pdfConverter = new PdfConverter();
    pdfConverter.PdfDocumentOptions.PdfPageSize = PdfPageSize.A4;
    pdfConverter.PdfDocumentOptions.PdfPageOrientation = PDFPageOrientation.Portrait;
    pdfConverter.PdfDocumentOptions.PdfCompressionLevel = PdfCompressionLevel.Normal;
    pdfConverter.PdfDocumentOptions.GenerateSelectablePdf = true;
    pdfConverter.PdfDocumentOptions.ShowFooter = false;
    pdfConverter.PdfDocumentOptions.ShowHeader = false;
    pdfConverter.LicenseFilePath = Server.MapPath(@"~/Bin");
    byte[] downloadBytes = pdfConverter.GetPdfFromUrlBytes(MyURL); 

     

    You may be able to follow from here.

    Some html to pdf give you an option to print out the format as jpg/gif.

    Hope you have a direction now!

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, December 5, 2008 11:10 AM
  • User-653327211 posted

    here is a great link to make snapshots of urls  and it even turns them into compressed thumbnails:

    http://www.eggheadcafe.com/tutorials/aspnet/b7cce396-e2b3-42d7-9571-cdc4eb38f3c1/build-a-selfcaching-asp.aspx

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, December 5, 2008 11:11 AM

All replies

  • User1584657764 posted

     You can do this with the help of either an ActiveX control:

    http://www.guangmingsoft.net/htmlsnapshot/help.htm

    Or you may go for the alternative HTML to PDF which is much more tested and working feature..

    Some samples are:

    http://www.codeproject.com/KB/aspnet/HTML2PDF.aspx

    Try the PDF Metamorphosis .Net, it transforms HTML to PDF on fly.

    PDF Technologies

    thread http://forums.asp.net/t/956392.aspx too

    The HTML to PDF library for .NET  from http://www.dotnet-reporting.com or the HTML to PDF converter from http://www.winnovative-software.com. It's pure .NET library, it doesn't use a printer driver. There is also a free html to pdf converter application built on top of this library. The conversion can be done with only a few lines of code:

    PdfConverter pdfConverter = new PdfConverter();
    pdfConverter.PdfDocumentOptions.PdfPageSize = PdfPageSize.A4;
    pdfConverter.PdfDocumentOptions.PdfPageOrientation = PDFPageOrientation.Portrait;
    pdfConverter.PdfDocumentOptions.PdfCompressionLevel = PdfCompressionLevel.Normal;
    pdfConverter.PdfDocumentOptions.GenerateSelectablePdf = true;
    pdfConverter.PdfDocumentOptions.ShowFooter = false;
    pdfConverter.PdfDocumentOptions.ShowHeader = false;
    pdfConverter.LicenseFilePath = Server.MapPath(@"~/Bin");
    byte[] downloadBytes = pdfConverter.GetPdfFromUrlBytes(MyURL); 

     

    You may be able to follow from here.

    Some html to pdf give you an option to print out the format as jpg/gif.

    Hope you have a direction now!

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, December 5, 2008 11:10 AM
  • User-653327211 posted

    here is a great link to make snapshots of urls  and it even turns them into compressed thumbnails:

    http://www.eggheadcafe.com/tutorials/aspnet/b7cce396-e2b3-42d7-9571-cdc4eb38f3c1/build-a-selfcaching-asp.aspx

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, December 5, 2008 11:11 AM