Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to find a way to download an URL and convert it into a PDF.

I have found lots of suggestions on how to turn PDFs into HTML or HTML into PDFs, but that's not the same as what I want to do.

Basically I am looking for the same result as if I had opened the page in {insert browser of choice} and selected "Print" and then PDF » Save as PDF…

But I want to be able to do it all from Terminal, automatically, so that I can feed it a handful of URLs at once and have it do it all for me.

I don't need or want recursion to additional pages.

[Note: I have tried wget --page-requisites --convert-links but it does not always actually fetch images which are loaded from a remote server. Also, assume for this execs that the URLs are not behind any sort of login requirement.]

share|improve this question
up vote 1 down vote accepted

Check out Wkhtmltopdf.

You can download the binary from that website. Note that you should change the file permissions to +x to make it executable.

For usage, check out or execute:

wkhtmltopdf-0.9.9-OS-X.i368 --help

share|improve this answer
Yes! The static version (wkhtmltopdf-0.9.9-OS-X.i368) works perfectly, and includes working links (which the 'Homebrew' version does not). Thank you! – TJ Luoma Oct 10 '11 at 16:24

Well, there is wkpdf (webkit to pdf), but it´s broken under Mac OS X 10.7 (Lion).

You might also want to try CutyCapt, but that requires Qt and I haven´t tried that.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.