FriendsOfCake/CakePdf

Problemas ao usar wkhtmltopdf

StgoDev opened this issue · 3 comments

Unfortunately I'm not getting your plugin to run properly, what could you be doing wrong?

image

We've already released the exec and the shell as well.

Can you paste your pdfConfig? I think your String might be incorrect or something, because I had a similar problem and just tempering with the name fixed my issue. Here's a sample one for the TcPdf engine:

$this->viewBuilder()->setOption(
    'pdfConfig',
    [
        'engine' => 'CakePdf.Tcpdf',
        'filename' => 'fileName'
    ]
);

That means that wkhtmltopdf can't be found. You need to check that the path supplied in config matches exactly to the path that the executable has been placed in

ADmad commented

You need to figure out the proper path for the executable and set the binary config for the engine.

Closing as there's nothing to do in the plugin code.