Skip to content

How to specify the working directory - cwd #137

@abdennour

Description

@abdennour
var stream = wkhtmltopdf(fs.createReadStream('file.html'));

but i need to navigate inside the directory where the file.html resides (/i.e: /data/files)so the relative paths inside the html file (./style.css ,... so on) is resolvable.

Note that it works with the following snippet:

execSync('wkhtmltopdf file.html file.pdf', {cwd: '/data/files'})

Metadata

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