Skip to content

Generate HTML PDF on Node? #3392

@MattiasMartens

Description

@MattiasMartens

Hi, this is a general question—what is the simplest way to use jsPDF to generate a PDF from HTML in a Node context?

Plaintext works fine I see; but HTML yields the error document is not defined.

Is there a way to mock document that is sufficient for purpose? Or does the simplest way to do this still require spinning up a headless browser?

Thanks.

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