Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# PDF
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 26-Apr-13 9:37am
Edited 26-Apr-13 11:20am
v2
Comments
Sergey Alexandrovich Kryukov at 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 at 26-Apr-13 17:05pm
   
At best students. At worst all bidders for the same rent-a-coder project. :(
Sergey Alexandrovich Kryukov at 26-Apr-13 17:22pm
   
Bidders? Wow. I can imagine the morons who would be ready to pay them! :-)
—SA
TnTinMn at 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 at 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
ThePhantomUpvoter at 26-Apr-13 15:41pm
   
This is not a question or a description of a problem. We do not write code to order here either.
Jasmine2501 at 26-Apr-13 17:17pm
   
There are some answers for this here: http://stackoverflow.com/questions/564650/convert-html-to-pdf-in-net
 
And yes, this question is a little more complicated than I thought and there isn't a "quick answer" for it. GUYS - please don't give her crap, I asked her to post here because I don't have time for a phone call. I wanted this in the discussion area though.
Sergey Alexandrovich Kryukov at 26-Apr-13 17:24pm
   
I answered in sufficient detail. Would you need more? Then it just needs a brain, which cannot be created in a forum. :-)
—SA
Jasmine2501 at 26-Apr-13 18:18pm
   
Yeah I know, your answer is very good. I'm not the submitter of this question, she's a friend of mine. She doesn't understand how this site works, look at "solution 2" - I should have been more clear and asked her to post this in the discussion area.
Sergey Alexandrovich Kryukov at 26-Apr-13 18:21pm
   
Too bad deletion of posts does not work at this time, hopefully, temporarily. This post should be removed.
Thank you,
—SA

1 solution

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

Solution 1

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
  Permalink  

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

  Print Answers RSS
0 CPallini 385
1 BillWoodruff 334
2 Sergey Alexandrovich Kryukov 333
3 George Jonsson 285
4 OriginalGriff 267
0 OriginalGriff 5,095
1 CPallini 4,285
2 Sergey Alexandrovich Kryukov 3,767
3 George Jonsson 2,941
4 Gihan Liyanage 2,386


Advertise | Privacy | Mobile
Web01 | 2.8.140916.1 | Last Updated 26 Apr 2013
Copyright © CodeProject, 1999-2014
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