How to convert HTML Page to PDF in ASP.net, C#.net

This is a discussion on "How to convert HTML Page to PDF in ASP.net, C#.net" within the ASP.NET Forum section. This forum, and the thread "How to convert HTML Page to PDF in ASP.net, C#.net are both part of the Program Your Website category.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Program Your Website > ASP.NET Forum

Notices




Reply
 
LinkBack (1) Thread Tools
  1 links from elsewhere to this Post. Click to view. #1  
Old Aug 1st, 2005, 04:13
New Member
Join Date: Aug 2005
Location: Bangalore
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
How to convert HTML Page to PDF in ASP.net, C#.net

Hi,

I am developing web base application. and i want to convert HTML page to PDF in ASP.NET & C#.NET.

How can i do it? Plz Let me know if any one knows it.

Waiting for reply,

Regards,
Jagdish Sakhiya
Bangalore, India
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Aug 1st, 2005, 05:53
Most Reputable Member
Join Date: Jul 2003
Posts: 1,856
Thanks: 0
Thanked 0 Times in 0 Posts
There's a variety of methods. A Google search gave me

http://www.codeproject.com/showcase/TallComponents.asp

http://www.websupergoo.com/

What you use probably depends on the specifics of what you're going to do with the PDF, budget, shared or self hosted, etc.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old Jan 20th, 2007, 10:27
New Member
Join Date: Jan 2007
Location: Israel
Age: 30
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Re: How to convert HTML Page to PDF in ASP.net, C#.net

Hello , Group
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old May 11th, 2007, 07:30
New Member
Join Date: May 2007
Location: Romania
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Re: How to convert HTML Page to PDF in ASP.net, C#.net

Hi,

The best tool .NET library to convert from html to pdf is this:
www.html-to-pdf.net

Here is some sample code found on the site:

Quote:
PdfConverter pdfConverter = new PdfConverter();pdfConverter.PdfDocumentOptions.Pdf PageSize = PdfPageSize.A4;pdfConverter.PdfDocumentOptions.Pdf CompressionLevel = PdfCompressionLevel.Normal;pdfConverter.PdfDocumen tOptions.ShowHeader = true;pdfConverter.PdfDocumentOptions.ShowFooter = true;pdfConverter.PdfDocumentOptions.LeftMargin = 5;pdfConverter.PdfDocumentOptions.RightMargin = 5;pdfConverter.PdfDocumentOptions.TopMargin = 5;pdfConverter.PdfDocumentOptions.BottomMargin = 5;pdfConverter.PdfDocumentOptions.UseMetafileForma t = true;pdfConverter.PdfDocumentOptions.ShowHeader = false;//pdfConverter.PdfHeaderOptions.HeaderText = "Sample header: " + TxtURL.Text;//pdfConverter.PdfHeaderOptions.HeaderTextColor = Color.Blue;//pdfConverter.PdfHeaderOptions.HeaderDescriptionTex t = string.Empty;//pdfConverter.PdfHeaderOptions.DrawHeaderLine = false;pdfConverter.PdfFooterOptions.FooterText = "Sample footer: " + TxtURL.Text + ". You can change color, font and other options";pdfConverter.PdfFooterOptions.FooterTextC olor = Color.Blue;pdfConverter.PdfFooterOptions.DrawFoote rLine = false;pdfConverter.PdfFooterOptions.PageNumberText = "Page";pdfConverter.PdfFooterOptions.ShowPageNumbe r = true;pdfConverter.LicenseFilePath = System.IO.Path.Combine(Server.MapPath("~"), "Bin");byte[] downloadBytes = pdfConverter.GetPdfFromUrlBytes(url);System.Web.Ht tpResponse response = System.Web.HttpContext.Current.Response;response.C lear();response.AddHeader("Content-Type", "binary/octet-stream");response.AddHeader("Content-Disposition", "attachment; filename=" + downloadName + "; size=" + downloadBytes.Length.ToString());response.Flush(); response.BinaryWrite(downloadBytes);response.Flush ();response.End();
I hope this helps. Good luck.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5  
Old May 23rd, 2007, 08:35
New Member
Join Date: May 2007
Location: Bucharest
Age: 38
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Post Re: How to convert HTML Page to PDF in ASP.net, C#.net

You can also try the HTML to PDF converter library for .NET from http://www.winnovative-software.com. You can convert HTML to PDF with selectable texts and images and it completely preserves the aspect of the HTML page.
There are also some other interesting tools there like RTF to PDF converter, split/merge tools, PDF encrypt/decrypt, password removal tools, etc.
I'm sure you'll enjoy it.
Attached Files
File Type: zip WnvWebConverter-2.3.zip (6.79 MB, 928 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6  
Old Jun 4th, 2007, 10:20
New Member
Join Date: Jun 2007
Location: INDIA
Age: 26
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Re: How to convert HTML Page to PDF in ASP.net, C#.net

Hi All,

Is there any way that i can display my company logo in each and every page automatically and in header of the PDF Dcouement using
http://www.winnovative-software.com.

I am working with this tool from the last couple of days,and i am able to complete all the tasks except the issue mentioned in the above lines

Please help me to sort out this problem

Regards

Sri Harsha K
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #7  
Old Jun 9th, 2007, 08:02
New Member
Join Date: Jun 2007
Location: Russia
Age: 27
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Thumbs up Re: How to convert HTML Page to PDF in ASP.net, C#.net

Hi!

You can try our C# component PDF Metamorphosis .Net:
http://www.sautinsoft.com/products/p...osis/index.php

It converts HTML, RTF and other filles/strings to PDF.

Let me know if you will have any questions,
Max
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
convert, html, page, pdf, aspnet, cnet

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

LinkBacks (?)
LinkBack to this Thread: http://webforumz.com/asp-net-forum/2832-how-to-convert-html-page-to.htm
Posted By For Type Date
mabuzagu's bookmarks on del.icio.us This thread Refback Mar 20th, 2008 11:04

Similar Threads
Thread Thread Starter Forum Replies Last Post
Function to convert BBcode to HTML AdRock PHP Forum 4 Sep 2nd, 2007 12:41
How I convert Html code to pDF vijiljones Web Page Design 2 Oct 11th, 2006 13:57
How to convert HTML to doc ? weefrancis Classic ASP 2 Jun 1st, 2006 20:51
convert doc file to html in asp.net malarvizhi ASP.NET Forum 1 Nov 28th, 2005 16:04
Convert HTML DOC to PDF humair ASP.NET Forum 0 Apr 23rd, 2005 11:29


All times are GMT. The time now is 07:48.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42