Open
Description
I was having numerous problems while running on Windows. This is how I solved it -
-
Download the
wkhtmltox-0.12.5-1.mxe-cross-win64.7z
file from the wkhtmltopdf releases page. -
Extract and get the full path to the exe file which is located in the
bin
folder. -
In the beginning of my program, I added the following in the
IMGKit.configure
block.
Path with backslashes escaped -
IMGKit.configure do |config|
config.wkhtmltoimage = "D:\\wkhtmltox\\bin\\wkhtmltoimage.exe"
end
Or, path with backslashes replaced by forward slashes.
IMGKit.configure do |config|
config.wkhtmltoimage = "D:/wkhtmltox/bin/wkhtmltoimage.exe"
end
Note: The path can contain spaces. Ruby parses it correctly regardless.
Metadata
Assignees
Labels
No labels