Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How To Install and Run wkhtmltopdf on Mac OsX 10.7.3 for use in a PHP Application

I've written a PHP/MySQL application that utilizes wkhtmltopdf to generate reports from data entered into the database. The client asked that I also install it to run as a standalone on a Mac that he has. Currently have the PHP/MySQL portion running without difficulty using XAMMP, but am having incredible difficulty getting wkhtmltopdf even installed on the system.

I have zero experience with Macs, and despite five hours of Googling and trying different approaches, I cannot even copy the most recent wkhtmltopdf .i386 into the /usr folder. Oddly, the laptop doesn't have a /usr/local/bin folder.

Unless I've missed it, I can't find simple instructions on how to get this thing working and would greatly appreciate any help that could be offered.

like image 865
brizandt Avatar asked Apr 29 '12 19:04

brizandt


People also ask

What is the latest version of Wkhtmltopdf?

The current stable series is 0.12. 6, which was released on June 11, 2020 – see changes since 0.12. 5.


1 Answers

Homebrew only has wkhtmltopdf-0,9,9 and it fails with QT patched options by default. So if you need HEAD version with fully suppoorted options just

  • Grab yourself a copy of fresh wkhtmltopdf
  • Open it and drag to Applications
  • Then cd /usr/local/bin && ln -s /Applications/wkhtmltopdf.app/Contents/MacOS/wkhtmltopdf wkhtmltopdf
like image 50
prikha Avatar answered Sep 18 '22 14:09

prikha