ahmedbhs/wkhtmltopdf-amd64

wkhtmltopdf and wkhtmltoimage linux binaries - Convert HTML to PDF or IMAGE using Webkit (QtWebKit)

0.12.6 2022-02-25 17:40 UTC

This package is auto-updated.

Last update: 2025-04-25 23:58:26 UTC


README

This repository contains the latest stable compiled binaries of wkhtmltopdf from the wkhtmltopdf project.

The binaries are built for Ubuntu 18.04 buster and stretch amd64 architectures are included.

Or sometimes you just want a quick solution for your dev environment ;)

Installation

This package is published on Packagist and should be installed with Composer.

The version of the binary is equal to the git tag. Composer will install the latest version by default.

$ composer require-dev michael-schaefer-eu/wkhtmltox

Note: you should not use this package (or any other of that kind) in production environments!

Composer will install the package in your project path into the vendor/michael-schaefer-eu/wkhtmltox/ directory.

The binaries are located in the vendor/michael-schaefer-eu/wkhtmltox/bin/ directory.

Composer will symlink them to the vendor/bin/ directory.

Check the Version:

$ wkhtmltopdf -V
wkhtmltopdf 0.12.6 (with patched qt)

Usage

With the KNP-Snappy package, you can now use the binaries to create PDFs from HTML.

You can use the path constants from this project to easily locate the binary paths (with PSR 4 Autoloader):

<?php
use Knp\Snappy\Pdf;
use Wkhtmltox\Wkhtmltopdf;

$snappyPdf = new Pdf(Wkhtmltopdf::BUSTERAMD64);

OR If you symlinked the binaries to /usr/local/bin:

<?php
use Knp\Snappy\Pdf;

$snappyPdf = new Pdf('/usr/local/bin/wkhtmltopdf');