Code Monkey home page Code Monkey logo

heroku-buildpack-wkhtmltopdf's Introduction

heroku-buildpack-wkhtmltopdf

Status License

๐Ÿ“ Table of Contents

About

This buildpack downloads and extracts the wkhtmltopdf binaries and works on heroku-18, heroku-20 and heroku-22 stacks.

  • This buildpack downloads wkhtmltopdf v0.12.6.1-2 for heroku-22, v0.12.6-1 for heroku-20 stack and v0.12.5 for heroku-18 stack.
  • This buildpack can bypass stack detection if the url to the wkhtmltopdf binary is provided through Aptfile.

Changelog

  • v1.0 (initial release)

    • Support for Cedar-14, heroku-16, and heroku-18
    • Support for Aptfile
  • v2

    • Added support for Heroku-20
    • Removed support for Cedar-14 and heroku-16 as they reached end of life.
  • v3

    • Added support for Heroku-22
    • Added support for bypassing stack detection.

Features

  • Downloads wkhtmltopdf binaries from wkhtmltopdf.org
  • It doesnot add new environment variables or shell scripts.
  • Tested on heroku-22, heroku-20 and heroku-18stack images.
  • It allows you to specify a custom or the latest version of wkhtmltopdf package for your app on Heroku. Aptfile.

Getting Started

Just add the buildpack to your heroku app by executing:

heroku buildpacks:add https://github.com/RohanDebroy/heroku-buildpack-wkhtmltopdf.git

You can also force this buildpack to be the first Heroku process by using the --index option:

heroku buildpacks:add --index=1 https://github.com/RohanDebroy/heroku-buildpack-wkhtmltopdf.git

Aptfile(Optional)

To use a specific version of the wkhtmltopdf binary for your app on Heroku, you can include an Aptfile in the parent directory of your app. This file should contain the latest or custom download URL for the binary.

By including the Aptfile, you can bypass Heroku's stack detection and ensure that the correct version of wkhtmltopdf is downloaded during the build process.

Here are the steps to include an Aptfile in your app:

  • Create a file named "Aptfile" in the parent directory of your app.
  • Add the download URL for the version of wkhtmltopdf that you want to use to the Aptfile.
  • Commit the Aptfile to your app's Git repository.
  • Push the changes to Heroku.
  • Once you've completed these steps, Heroku will use the specified version of wkhtmltopdf during the build process for your app.

Warning: When using an Aptfile to specify the version of wkhtmltopdf for your app on Heroku, it's important to note that the Aptfile bypasses stack detection. This means that you need to make sure you are using the correct binary version for your Heroku stack.

Usage

The binaries wkhtmltopdf and wkhtmltoimage will be available on /app/bin, you can just execute /app/bin/wkhtmltopdf and /app/bin/wkhtmltoimage from your app.

Acknowledgements

License

MIT

heroku-buildpack-wkhtmltopdf's People

Contributors

rohandebroy avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.