Skip to content

How to specify the working directory - cwd #137

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'})

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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