3

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.

5 Answers 5

0

You don't have to use extra programs always if you have Google Chrome. In google chrome open the HTML file, then Go Settings-->Print and then printing page will be opened. On this page click "Change" button which is next to destination section and then select "Save as a PDF" --> OK Then "print" button will turn into "save" button. Now press the save button and save your HTML file as a PDF. [ For online web pages it's very very usefull for example if you fill form on the web page your form informations will be appeared on the pdf file.] Enjoy!

4

One possibility would be to use wkhtmltopdf:

Simple shell utility to convert html to pdf using the webkit rendering engine, and qt.

Given a directory that contains HTML files, you could run this from a terminal:

for i in *html; do wkhtmltopdf $i $i.pdf; done

Not sure what you mean about javascript. If you want to make pdfs with code highlighting of the actual source code (without rendering the HTML), see my answer here. I also don't know what you mean by "make PDF out of selection".

8
  • See this article: blueprintforge.com/blog/2012/01/24/… 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
    Commented Jun 27, 2013 at 1:19
  • 1
    @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. Commented Jun 27, 2013 at 1:27
  • @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 wkhtmltopdf --user-style-sheet foo_files/screen.css foo.html foo.pdf and got this pdf which has colors and syntax highlighting.
    – terdon
    Commented Jun 27, 2013 at 1:37
  • @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
    Commented Jun 27, 2013 at 1:43
  • Now I only have to figure it out how to convert only part of the page? for example the main article without any clutter
    – kissgyorgy
    Commented Jun 27, 2013 at 1:44
0

Try this service. Creates a PDF from a website as you see it in the browser. https://lomotoh.com/ Preserves fonts and layouts. As well as original links to the website. (I am affiliated with this site).

1
  • Are you perhaps affiliated with this service, seeing how you’re eager to advertise it?
    – Daniel B
    Commented Oct 15, 2016 at 21:57
0

The best and easy way for conversion is to use pdf conversion extension that very accurate and useful.

Word to PDF

1
-1

You can use evernote web clipper plugin for chrome, to save web pages as PDF and they will be instantly available in your evernote account. Or you can use Pocket which is a wonderful read it later service. Although it wont allow you to save pages as PDF but it converts web pages in easy to read article format, and you can read them using its iPhone, iPad, android or chrome app.

1
  • I can't seem to save the selected area as PDF (greyed out) did you mean this funcionality? The whole point is annotation on a tablet, which you can't do with either Pocket or Evernote.
    – kissgyorgy
    Commented Jun 27, 2013 at 3:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .