Skip to content

Invalid CSS path on Windows #83

@PitchforkAssistant

Description

@PitchforkAssistant

const __dirname = new URL('.', import.meta.url).pathname

__dirname is prefixed with / on Windows systems, leading to paths like /C:/path/to/docusaurus-prince-pdf/.

That results in an invalid --style path when executing Prince on Windows, which it silently ignores.

: `prince --no-warn-css --style=${__dirname}print.css ${cookieArg} --input-list=${list} -o ${filename} ${args}`

The result is print.css not being applied. If the --style argument has to be an absolute path, removing the prefix on Windows systems would fix the issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions