Docs Navigation

Using wkhtmltopdf

If your application is using locally installed binary version of wkhtmltopdf without additional configuration, or if you use wkhtmltopdf-heroku gem, no additional configuration is necessary.

If your application is using wkhtmltopdf or wkhtmltopdf-binary gem or binary version is installed on custom location, then you need to tell your PDF generator tool to use wkhtmltopdf that is installed locally on Semaphore builder machines. Path to executable wkhtmltopdf is stored in WKHTMLTOPDF_PATH environment variable.

# Example configuration

# wicked_pdf


if ENV['CI'] == 'true'
  WickedPdf.config = {
    :exe_path => ENV['WKHTMLTOPDF_PATH']

# PDFKit


if ENV['CI'] == 'true'
  PDFKit.configure do |config|
    config.wkhtmltopdf = ENV['WKHTMLTOPDF_PATH']

See our test apps for example source code:

Semaphore Docs are open source — Edit on GitHub


Occasional lightweight product and blog updates. Unsubscribe at any time.

2009-2017 © Rendered Text. All rights reserved. Terms of Service, Privacy policy, Security.