Click here to Skip to main content
13,002,676 members (62,793 online)
Rate this:
Please Sign up or sign in to vote.
See more:
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__ 5-Feb-13 7:43am
Thank you,

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

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

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100