How to Install wkhtmltopdf on Apple Silicon (M1 MacOS)

Install and run intel based applications on Apple Silicone
February 9, 2025 by
How to Install wkhtmltopdf on Apple Silicon (M1 MacOS)
Alixsander Haj Saw
| No comments yet

Introduction

wkhtmltopdf does not yet have official prebuilt binary for Apple Silicone, but intel based applications can still be installed and ran using Rosetta 2, which acts as an emulator, translating x86_64 instructions into ARM64 instructions, enabling running intel x86_64 bit applications on ARM64 architecture.

Click here for the video version of this article.

Installing Rosetta 2

Rosetta can be installed using the terminal by running the following command:

softwareupdate --install-rosetta --agree-to-license


Installing wkhtmltopdf

With Rosetta installed we should be able to install wkhtmltopdf 64-bit architecture. Go to the official wkhtmltopdf page and download the 64-bit MacOS installer, right click on the downloaded .pkg installer, click open and proceed with the default installation.


Restart your application which requires wkhtmltopdf and it should be able to convert html page to pdf files.


Running the Terminal using Rosetta (Recommended)

If you are planning to use the terminal to install 64-bit application then you can open the terminal using Rosetta by doing the following:

  1. Open Finder > Applications > Utilities.
  2. Right click on the Terminal and click Get info.
  3. Check the option for Open using Rosetta.

Check what archetecture the terminal is using by launching it and running the following command:

arch

If the result is x86_64 or i386 then you are using the Rosetta emulator correctly.



Sign in to leave a comment