SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    Non-Member
    Join Date
    Mar 2012
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Generate HTML page to PDF

    can any one know how to convert html page to pdf?

  2. #2
    SitePoint Enthusiast bzforum's Avatar
    Join Date
    Mar 2012
    Location
    India
    Posts
    42
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Do you want to do it via Programming? If yes then which language VB.NET or C# ...
    If No ...
    Then try doing a simple google search for Online PDF Convertors they convert any file to PDF on the go...

  3. #3
    Mouse catcher silver trophy Stevie D's Avatar
    Join Date
    Mar 2006
    Location
    Yorkshire, UK
    Posts
    5,881
    Mentioned
    122 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by salinir View Post
    can any one know how to convert html page to pdf?
    The easiest way is probably with a tool like CutePDF. This is free to download, and installs a PDF printer driver on your computer. You can then go into any application (including internet browser), and when you go to print, there will be a printer called "CutePDF Writer". Choose that and it will prompt you to save the file in PDF format.

    Please note that this method will use the "print" stylesheet, not the "screen" stylesheet.

  4. #4
    SitePoint Member
    Join Date
    Mar 2010
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The simplest way to convert HTML to PDF from .NET is to use a component like ABCpdf or sililar. e.g.

    Doc doc = new Doc();
    doc.AddImageUrl("example.htm");
    doc.Save("example.pdf");
    doc.Clear();

    The example above is written in c# and shows how to convert a single HTML page. The product's documentation, freely available, contains example code written in c# and VB.NET. There you'll find an example of how to convert multiple pages.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •