Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running on Windows #117

Open
abhijitnandy opened this issue Feb 5, 2020 · 0 comments
Open

Running on Windows #117

abhijitnandy opened this issue Feb 5, 2020 · 0 comments

Comments

@abhijitnandy
Copy link

I was having numerous problems while running on Windows. This is how I solved it -

  1. Download the wkhtmltox-0.12.5-1.mxe-cross-win64.7z file from the wkhtmltopdf releases page.

  2. Extract and get the full path to the exe file which is located in the bin folder.

  3. 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant