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.

Karan
  • 57,289

5 Answers5

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".

terdon
  • 54,564
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!

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).

David Herse
  • 101
  • 1
0

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

Word to PDF

-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.