Skip to content

[Feature]: Customize PDF page size in "playwright pdf" command #31057

Open
@liskin

Description

@liskin

🚀 Feature Request

Can we add a command-line option to playwright pdf to specify PDF page size? It seems to default to US Letter and there's no way to change it.

Example

playwright pdf --browser chromium --channel chrome --wait-for-timeout 2000 --paper-format A4 x.html x.pdf

Alternatively, simply being able to enable preferCSSPageSize might be sufficient for my usecase.

Motivation

Well… US Letter-sized PDF are a bit useless in Europe aren't they? :-)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions