Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I need a PDF converter for a C# console application, which takes HTML as input. Please suggest a converter you have used and if you know of any problems with it.
Posted
Updated 26-Apr-13 11:20am
v2
Comments
Sergey Alexandrovich Kryukov 26-Apr-13 15:38pm    
What's going on? I just answered. Are you the students of the same school getting identical assignments, or what?! And now my answer was removed... It's a shame.
—SA
TnTinMn 26-Apr-13 17:05pm    
At best students. At worst all bidders for the same rent-a-coder project. :(
Sergey Alexandrovich Kryukov 26-Apr-13 17:22pm    
Bidders? Wow. I can imagine the morons who would be ready to pay them! :-)
—SA
TnTinMn 26-Apr-13 17:40pm    
It's just something that I noticed once after looking over a few of the those sites, that various forums suddenly get a lot of questions on how to code the required tasks. Maybe its a coincidence, but whenever I see a lot of posts on a topic that seems beyond a school topic, I take a look and often someone had posted a job with that requirement.

I seen something similarly fishy here a while ago, where it started off that the poster wrote the program for a friend and it changed to client at the end of the post.
Sergey Alexandrovich Kryukov 26-Apr-13 18:03pm    
From time to time, this forum gets 2-5 identical questions from different people during short period of time 1-3 days...
—SA

1 solution

To get your input, you may or may not need to parse HTML (maybe, you generate HTML from data, then, instead of parsing, you would need to generate both HTML and PDF). Ideally, you HTML should be well-formed as XML, then you could parse it using one of .NET XML parsers. Not all Web pages are like that, unfortunately, so you may need HTML parser which does not require well-formed XML compliance. Try this one: http://www.majestic12.co.uk/projects/html_parser.php[^].

To work with PDF, use iText, or its .NET port, iTextSharp:
http://en.wikipedia.org/wiki/IText[^],
http://itextpdf.com/[^],
http://sourceforge.net/projects/itextsharp/[^].

In included the reference to Java iText site as well, because most documentation is there. If you understand C#, it would not be difficult to understand Java-bases API documentation.

—SA
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900