I'm using wicked_pdf gem in a rails app and everything works fine. The problem is that I have installed wicked_pdf.exe because wicked_pdf gem doesn't work correctly. It returns this error: Bad wkhtmltopdf's path for wicked_pdf ( Or similar). This is my wicked_pdf config:
WickedPdf.config = {
# Path to the wkhtmltopdf executable: This usually isn't needed if using
# one of the wkhtmltopdf-binary family of gems.
exe_path: 'C:\Program Files\wkhtmltopdf\bin\wkhtmltopdf.exe',
# or
#exe_path: Gem.bin_path('wkhtmltopdf-binary', 'wkhtmltopdf')
# Layout file to be used for all PDFs
# (but can be overridden in `render :pdf` calls)
# layout: 'pdf.html',
}
How can i use the gem in proper way? I need to send my app to another pc and I don't want to install the exe in every pc. I don't want to use exe, i want to use only gem.
The github documentation says:
So it seems that you will have to also include this binary in your app. Bundling the install should solve this. You may need to create some OS mapping inside your app to set
WickedPdf.config
(ex /usr/bin/local/wkhtmltopdf vs C:\Program Files\wkhtmltopdf\bin\wkhtmltopdf.exe)