Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
See more: ASP.NET
I need to convert from HTML to PDF in called one HTML file from local server and load on a "div" control.This HTMl format contains some controls like Textbox,checkbox and object.when convert to PDF format i want to display these controls also in PDF.but i need to do without any(PDF conversion s/w).anybody knows this..share to me......
Posted 4-Feb-13 18:46pm

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

First of all, as there is no one-to-one correspondence between HTML and PDF, and the approaches in these formats are different, on input, you need not just some HTML, but also some mapping rules of your choice.
Ideally, HTML should be a well-formed XML, then you could use any of the XML parsers available in FCL. If you cannot assume well-formed XML, this is much worse: you would need some HTML parser which could cope with that. I would advise, for example, this one:[^].
To produce PDF, you can really use the .NET port of iText; this port is called iTextSharp:[^],[^],[^].
I provided links to iText, too, because nearly all documentation you need to work with iTextSharp is there, provided as Java documentation.
__TR__ at 5-Feb-13 7:43am
Sergey Alexandrovich Kryukov at 5-Feb-13 11:48am
Thank you,

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

  Print Answers RSS
0 Maciej Los 295
1 OriginalGriff 278
2 Nguyen.H.H.Dang 230
3 Peter Leow 195
4 arvind mepani 187

Advertise | Privacy | Mobile
Web04 | 2.8.140709.1 | Last Updated 5 Feb 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid