ziishaned / opus

Open source knowledge base application for Teams
Other
1.23k stars 158 forks source link

Runtime Exception on Export to PDF #104

Closed 1papaya closed 6 years ago

1papaya commented 7 years ago

Seems the Export to PDF function executes a hardcoded path to C:/wkhtmltopdf/bin/wkhtmltopdf.exe, which does not exist on my machine

screenshot-area-2017-10-17-163944

facundofarias commented 7 years ago

Hello @1papaya,

It seems to be that it works in Windows, but not Linux/OSX. The change I did to make it work was:

Add the dependency "h4cc/wkhtmltopdf-amd64": "0.12.3" in the composer.json file, and then in the file wiki/config/snappy.php, use the following setting:

    'pdf' => array(
        'enabled' => true,
        'binary' => base_path('vendor/h4cc/wkhtmltopdf-amd64/bin/wkhtmltopdf-amd64'),
        'timeout' => false,
        'options' => [],
        'env'     => [],
    ),

Hope it helps!