GithubHelp home page GithubHelp logo

wkhtmltopdf-buildpack's People

Contributors

ashkulz avatar bmedenwald avatar borski avatar hernanvicente avatar holic avatar jeffcole avatar matssigge avatar michaelbaudino avatar rnubel avatar sorentwo avatar stevenharman avatar zacstewart avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

wkhtmltopdf-buildpack's Issues

Heroku 16 stack fails to render pdf after ~5 minutes post restart

Heroku released an update to its Heroku 16 stack on December 18. Since that update to our Heroku instances, pdf rendering will only temporarily work on a new branch deploy or instance restart. After ~5 mins pdf rendering silently fails (ie. no information presented in log file).

Final log entry is:
2019-02-01T17:37:56.044912+00:00 app[web.1]: WICKED

That is followed by a series of rack-timeout notifications until we reach the Heroku limit and the call fails.
2019-02-01T17:37:58.588912+00:00 app[web.1]: source=rack-timeout id=511db688-876f-4b5d-bb58-2a52f749509f wait=3ms timeout=28000ms service=3000ms state=active
2019-02-01T17:37:59.588844+00:00 app[web.1]: source=rack-timeout id=511db688-876f-4b5d-bb58-2a52f749509f wait=3ms timeout=28000ms service=4000ms state=active
...

Spoke with Heroku support and they redirected me to post here.

rails 4.2.11
ruby 2.2.7
wicked_pdf 1.1.0
puma 3.11.3

wkhtmltopdf executable not found

After installing this buildpack alongside the default python webpack i can't seem to find the executable of wkhtmltopdf. Neither from my repo nor from command line. Can someone help me out regarding this?

In command line I tried just heroku run wkhtmltopdf --app <myapp>. From my understand it should display all the wkhtmltopdf options, at least that's what happening when I do this on my local system.

When deploying that is my log (maybe it helps):
-----> wkhtmltopdf-buildpack app detected
-----> Downloading wkhtmltopdf tar
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed

0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 631 0 631 0 0 3600 0 --:--:-- --:--:-- --:--:-- 3605

100 13.8M 100 13.8M 0 0 25.9M 0 --:--:-- --:--:-- --:--:-- 25.9M
-----> Unpacking tar
-----> Setting permissions
-----> Moving binaries to the right place
-----> Cleaning up
-----> Installing fonts
wqy-microhei.ttc
wqy-zenhei.ttc

Images are not shown

@sorentwo my html page has images but this images are not shown in generated PDF. I had such problem when on my local machine was version of wkhtmltopdf installed via gem.

wkhtmltopdf - Command not found

Added this to a Heroku (heroku-16) Django app.
Files are installed in app/bin:
~/bin $ find -maxdepth 1 -type f -ls -exec file -b {} \; 15619982 38816 -rwx------ 1 u46936 dyno 39745960 Jan 20 2016 ./wkhtmltopdf ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.18, stripped 15619983 38740 -rwx------ 1 u46936 dyno 39666344 Jan 20 2016 ./wkhtmltoimage ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.18, stripped

When using Pdfkit.to_pdf the following error is returned:

OSError('No wkhtmltopdf executable found: "If this file exists please check that this process can read it. Otherwise please install wkhtmltopdf - https://github.com/JazzCore/python-pdfkit/wiki/Installing-wkhtmltopdf'

When running wkhtmltopdf -V:

bash: wkhtml: command not found

Should I set the path variable? If so, how?

Shared library error on heroku-18 stack

Just noting the buildpack doesn't work as-is on the new stack.

wkhtmltopdf: error while loading shared libraries: libXrender.so.1: cannot open shared object file: No such file or directory

xz: (stdin): File format not recognized

I'm seeing this error when attempting to deploy to heroku:

=====> Downloading Buildpack: https://github.com/dscout/wkhtmltopdf-buildpack.git
=====> Detected Framework: wkhtmltopdf-buildpack
-----> Transferring wkhtmltopdf compressed binary
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

100 13.5M  100 13.5M    0     0  16.9M      0 --:--:-- --:--:-- --:--:-- 28.3M
-----> Decompressing binary
xz: (stdin): File format not recognized
tar: Child returned status 1
tar: Exiting with failure status due to previous errors

 !     Push rejected, failed to compile Multipack app

Presumably caused by this line:

WKHTMLTOPDF_COMPRESSED_PATH="$1/bin/wkhtmltopdf.tar.xz"

use updated URL for wkhtmltopdf downloads

Hello,

wkhtmltopdf has moved the downloads provider from SourceForge to gna.org. As mentioned in the linked message, all earlier downloads have been removed from SourceForge and you are strongly advised to migrate to the new URLs. The following files in your repository will need to be updated:

  • bin/compile

It is recommended to either subscribe to the mailing list or Twitter feed to receive updates on new releases and further changes.

Thanks,
wkhtmltopdf maintainer

Consider adding tags

I just found this buildpack, and have a suggestion: add tags so it is possible to fix the wkhtmltopdf version. In the past wkhtmltopdf broke my PDFs after updates. If you'd add tags, these could be used in the .buildpacks-file, so nobody is accidentally updated.

Incidentally, 0.12.4 breaks my pdfs, so it would be great if there'd be a tag for 0.12.3

Why does this require the Ruby buildpack?

I see this line under the usage documentation:

$ echo 'https://github.com/heroku/heroku-buildpack-ruby.git' >> .buildpacks

However I don't understand why Ruby specifically is necessary since neither your code or the wkhtmltopdf debian package requires Ruby.

I am wondering if you more have that line there as an example of using it alongside a site that is already using a Ruby build pack.

Is it safe to assume that I could replace that line with whatever build pack I am already using? If so, I might kick a quick pull request your way with a README update. :)

Issue in downloading

Just tried your buildpack but something went wrong while downloading the package:

remote: =====> Downloading Buildpack: https://github.com/dscout/wkhtmltopdf-buildpack.git
remote: =====> Detected Framework: wkhtmltopdf-buildpack
remote: -----> Downloading wkhtmltopdf Debian package
remote:   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
remote:                                  Dload  Upload   Total   Spent    Left  Speed
remote:   0     0    0     0    0     0      0      0 --:--:--  0:02:06 --:--:--     0curl: (7) Failed to connect to download.gna.org port 80: Connection timed out
remote:  !     Push rejected, failed to compile Multipack app.
remote: 
remote:  !     Push failed
``

Command not found

Hello,

I'm trying to use this buildpack but cannot figure out how to execute wkhtmltopdf. If I try:

heroku run bash
wkhtmltopdf -V
bash: wkhtmltopdf: command not found

and if I check /bin , wkhtmltopdf is not there.

However the buildpack logs out when compiling the app:

 ...
-----> wkhtmltopdf-buildpack app detected
-----> Using wkhtmltopdf Debian package from cache
-----> Unpacking Debian package
-----> Setting permissions
-----> Moving binaries to the right place
-----> Cleaning up
-----> Installing fonts
wqy-microhei.ttc
wqy-zenhei.ttc
-----> Discovering process types
       Procfile declares types -> web
-----> Compressing...
       Done: 125.4M
-----> Launching...
       Released v108

Do you have any ideas of where I should start troubleshooting?

Thanks!

Error R14 (Memory quota exceeded)

Hello
I'm not sure if this is a problem in the free heroku dyno but I tried to use the wkhtmltopdf-buildpack and I didn't get success. This is my heroku logs:

    2015-07-31T02:06:52.005696+00:00 app[web.1]: Started GET "/orders/1.pdf" for 200.149.16.70 at 2015-07-31 02:06:52 +0000
    2015-07-31T02:06:52.162915+00:00 app[web.1]:   Rendered clients/_client.html.erb (85.3ms)
    2015-07-31T02:06:52.015043+00:00 app[web.1]: Processing by OrdersController#show as PDF
    2015-07-31T02:06:52.015049+00:00 app[web.1]:   Parameters: {"id"=>"1"}
    2015-07-31T02:06:52.071357+00:00 app[web.1]: ***************WICKED***************
    2015-07-31T02:06:52.309300+00:00 app[web.1]:   Rendered orders/_order_products.html.erb (145.6ms)
    2015-07-31T02:06:52.339531+00:00 app[web.1]:   Rendered orders/show.html.erb (267.2ms)
    2015-07-31T02:06:52.339015+00:00 app[web.1]:   Rendered orders/_order.html.erb (262.6ms)
    2015-07-31T02:07:12.162183+00:00 heroku[web.1]: Process running mem=662M(129.4%)
    2015-07-31T02:07:12.162183+00:00 heroku[web.1]: Error R14 (Memory quota exceeded)
    2015-07-31T02:07:22.005012+00:00 heroku[router]: at=error code=H12 desc="Request timeout" method=GET path="/orders/1.pdf" host=mvbteste.herokuapp.com request_id=50f6840e-1907-4730-ab0d-1a6f415eb3db fwd="200.*.*.*" dyno=web.1 connect=3ms service=30001ms status=503 bytes=0

I'm not sure about how to debug this issue, but could you help? Is adding dynos an option in this case? Thanks

Make it work for new release 0.12.5

A couple of days ago wkhtmltopdf 0.12.5 has been released. It turns out the buildpack doesn't work out-of-the-box when setting the version in config (the release url seems to have changed). Can you make the buildpack work for the new version?

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.