wkhtmltopdf_binary_gem
wkhtmltopdf_binary_gem copied to clipboard
Add binary for Ubuntu 22.04
Thanks for updating this.
Any predictions to merge into the master? (rubygems too)
So I've tried to use this in heroku-22 stack and got some issues, so I had to switch to use the same version of binary as ubuntu 20 uses which also didn't help. After that I've switched to https://github.com/rposborne/wkhtmltopdf-heroku
Any updates on merging this? We've upgraded our server to 22.04 already but this gem hasn't been updated in two years. What is a reasonable timeline to expect new Ubuntu versions in a gem meant to manage a certain binary across OS versions?
So I've tried to use this in heroku-22 stack and got some issues, so I had to switch to use the same version of binary as ubuntu 20 uses which also didn't help. After that I've switched to https://github.com/rposborne/wkhtmltopdf-heroku
Is there any difference?
I didn't dig into Heroku version gem, but it helped.
Thanks. Since our project was using wkhtmltopdf_binary_gem, I would like to keep it. Is there anyway to use before maintainer's approval?
Thanks. Since our project was using wkhtmltopdf_binary_gem, I would like to keep it. Is there anyway to use before maintainer's approval?
I'd say no. you can fork and switch back as soon as it will be merged.
I'd say no. you can fork and switch back as soon as it will be merged.
Plan to fork and generate ubuntu22 binary file by myself. Could you tell me how to generate this file? Thanks
@anatoliliotych How did you get the binary file to include in this PR?
I downloaded the official packages from https://wkhtmltopdf.org/downloads.html for Ubuntu 22.04 (both jammy and focal), and neither one matches the md5 checksum as the uncompressed binary in this PR.
Maybe it was an earlier version of the official? Or extracted from an installed system somewhere?
Should we update this PR to use one of the official versions?
I just used official ubuntu repo with installed package. It was long ago :)
@anatoliliotych Would you mind terribly replacing the binary with the most recent one? I'd be happy to merge and release with that.
I'm going to do this a little bit later today. :)
So just to leave some instructions for the future:
- Download proper version of package https://wkhtmltopdf.org/downloads.html
- Unpack package and get binary from archive
usr/loca/bin/wkhtmltopdf
- Rename binary to match OS version.
mv wkhtmltopdf wkhtmltopdf_ubuntu_22.04_amd64
- Pack binary, for example
tar -cvzf wkhtmltopdf_ubuntu_22.04_amd64.gz wkhtmltopdf_ubuntu_22.04_amd64
- Profit :)
@unixmonkey please, review my previous comment and PR. I forgot to add tests, going to fix in a moment.
@unixmonkey could you trigger workflow?
@anatoliliotych Thanks! Have you verified that this works on your Ubuntu 22 system yet?
@anatoliliotych Thanks! Have you verified that this works on your Ubuntu 22 system yet?
@unixmonkey test is failing with Syntax error: Unterminated quoted string
and this is what I've met with previous binaries.
@anatoliliotych I tried this on heroku with stack heroku-22
and it failed out. I tried extracting the binary and myself and noticed that the md5 hash of yours and mine are different(I didn't look into the actual binary). The steps I took to reproduce were similar to yours, but I used the gzip
command to pack the binary as it suggests in the README.
So doing:
- Download proper version of package https://wkhtmltopdf.org/downloads.html
- Unpack package and get binary from archive usr/loca/bin/wkhtmltopdf
- Rename binary to match OS version.
mv wkhtmltopdf wkhtmltopdf_ubuntu_22.04_amd64
- Pack binary, for example
gzip --best wkhtmltopdf_ubuntu_22.04_amd64
Doing that final command like that gave me something that now works on Heroku
@anatoliliotych I tried this on heroku with stack
heroku-22
and it failed out. I tried extracting the binary and myself and noticed that the md5 hash of yours and mine are different(I didn't look into the actual binary). The steps I took to reproduce were similar to yours, but I used thegzip
command to pack the binary as it suggests in the README.So doing:
- Download proper version of package https://wkhtmltopdf.org/downloads.html
- Unpack package and get binary from archive usr/loca/bin/wkhtmltopdf
- Rename binary to match OS version.
mv wkhtmltopdf wkhtmltopdf_ubuntu_22.04_amd64
- Pack binary, for example
gzip --best wkhtmltopdf_ubuntu_22.04_amd64
Doing that final command like that gave me something that now works on Heroku
Super strange how packing can break it :) Let me replace it.
Any plans to go ahead with this PR?
I used a different PR, but support for Ubuntu 22.04 is now released in version 0.12.6.6 of this gem. Thank you all for your help, and please let me know if you have any issues!