2
1
I want to read and annotate internet articles like books on my iPad so I would like to convert HTML to PDF. Is there a way of doing this that
- preserves every font as is
- can make PDF out of selection
- handle javascript source code highlighting libraries well
- doesn't add anything (ads from shareware or logos etc) to every page
I will be happy with any solution applicable to iPad or OSX. I have tried some converters I have found online but none fit the criteria above.
See this article: http://blueprintforge.com/blog/2012/01/24/measuring-optimising-database-performance-in-django/ it highlights the example codes, with a nice, green background, but even wkhtmltopdf don't fully render the page either, so it doesn't convert the colors :( and all I got is a black and white pdf with pictures
– kissgyorgy – 2013-06-27T01:19:39.9331@Walkman You may want to go to the previous release of wkhtmltopdf. IIRC, there were some issues with the latest on up there, especially related to the graphics. – John Szakmeister – 2013-06-27T01:27:09.847
@Walkman I get pretty good results as long as I specify the CSS style sheet. I saved the link you posted as "foo.html" and its assiciated files in "foo_files", then ran
– terdon – 2013-06-27T01:37:57.373wkhtmltopdf --user-style-sheet foo_files/screen.css foo.html foo.pdf
and got this pdf which has colors and syntax highlighting.@jszakmeister THIS IS (almost) PERFECT thank you! I downloaded the version 0.10.0_rc2 and this renders the page nicely, even with colors, without any other option.
– kissgyorgy – 2013-06-27T01:43:34.287Now I only have to figure it out how to convert only part of the page? for example the main article without any clutter – kissgyorgy – 2013-06-27T01:44:04.587
@Walkman I don't know how you could stop it from converting to pdf. You could, however, use something like PDF tool kit to extract only the pages you want from the PDF.
– terdon – 2013-06-27T02:25:50.853PDF toolkit can only cut whole pages, not lines, but thanks for the tip. This will be another question I guess. – kissgyorgy – 2013-06-27T02:38:05.753