mirror of
https://github.com/internetee/registry.git
synced 2025-05-16 09:27:19 +02:00
try to use system version of wkhtmltopddf if installed before trying to use the linux build in project bin, which may crash
12 lines
297 B
Ruby
12 lines
297 B
Ruby
PDFKit.configure do |config|
|
|
installed = %x(which wkhtmltopdf).chomp
|
|
if installed == "" then
|
|
installed = "#{Rails.root}/vendor/bin/wkhtmltopdf"
|
|
end
|
|
config.wkhtmltopdf = installed
|
|
config.default_options = {
|
|
page_size: 'A4',
|
|
quiet: true
|
|
# :print_media_type => true
|
|
}
|
|
end
|