This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# config/initializers/pdfkit.rb | |
PDFKit.configure do |config| | |
if Rails.env.development? | |
config.wkhtmltopdf = '/usr/local/bin/wkhtmltopdf' | |
config.root_url = "http://bolstr.dev" # Use only if your external hostname is unavailable on the server. | |
elsif Rails.env.test? | |
config.root_url = "http://bolstr.dev" | |
if ENV['CI'] == "true" | |
config.wkhtmltopdf = '/home/ubuntu/bin/wkhtmltopdf' | |
else | |
config.wkhtmltopdf = '/usr/local/bin/wkhtmltopdf' | |
end | |
else | |
# this is where it's installed on the server | |
config.wkhtmltopdf = '/opt/wkhtmltopdf/bin/wkhtmltopdf' | |
end | |
# config.default_options = { | |
# page_size: 'Legal', | |
# print_media_type: true | |
# } | |
# config.root_url = "http://localhost" # Use only if your external hostname is unavailable on the server. | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment