Update wicked_pdf initializer to the latest version
We haven't been updating this file for a long time so, and this version uses the `configure` method instead of the `config` hash. We're also adding a few comments already included in previous versions of wicked pdf that we hadn't copied to our initializer.
This commit is contained in:
@@ -8,15 +8,23 @@
|
||||
#
|
||||
# https://github.com/mileszs/wicked_pdf/blob/master/README.md
|
||||
|
||||
WickedPdf.config = {
|
||||
WickedPdf.configure do |config|
|
||||
# Path to the wkhtmltopdf executable: This usually isn't needed if using
|
||||
# one of the wkhtmltopdf-binary family of gems.
|
||||
# exe_path: '/usr/local/bin/wkhtmltopdf',
|
||||
# config.exe_path = '/usr/local/bin/wkhtmltopdf',
|
||||
# or
|
||||
# exe_path: Gem.bin_path('wkhtmltopdf-binary', 'wkhtmltopdf')
|
||||
# config.exe_path = Gem.bin_path('wkhtmltopdf-binary', 'wkhtmltopdf')
|
||||
|
||||
# Needed for wkhtmltopdf 0.12.6+ to use many wicked_pdf asset helpers
|
||||
config.enable_local_file_access = true
|
||||
|
||||
# Layout file to be used for all PDFs
|
||||
# (but can be overridden in `render :pdf` calls)
|
||||
# layout: 'pdf.html',
|
||||
enable_local_file_access: true
|
||||
}
|
||||
# config.layout = 'pdf.html',
|
||||
|
||||
# Using wkhtmltopdf without an X server can be achieved by enabling the
|
||||
# 'use_xvfb' flag. This will wrap all wkhtmltopdf commands around the
|
||||
# 'xvfb-run' command, in order to simulate an X server.
|
||||
#
|
||||
# config.use_xvfb = true,
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user