Skip to content

Running on Windows #117

Open
Open
@abhijitnandy

Description

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.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions