zakird / wkhtmltopdf_binary_gem

Ruby gem containing easily installable access to wkhtmltopdf application
https://rubygems.org/gems/wkhtmltopdf-binary
Apache License 2.0
183 stars 347 forks source link

Checks if the extracted binary size is 0 and extracts if so #134

Closed danborden1 closed 8 months ago

danborden1 commented 2 years ago

We ran into an issue recently wherein the binary extraction failed silently and resulted in a file with 0 bytes. Because the check on bin/wkhtmltopdf:60 does not check for filesize, only that the file doesn't exist, the proper binary was never extracted. This Pull Request adds an additional check so that it will perform the extract if the file exists but the size is 0