Skip to content

Document command-line option for papersize and orientation #2703

@RichardNeill

Description

@RichardNeill

It would be nice if weasyprint supported command-line flags to specify the orientation and paper size.

I'm aware that this can be specified within the document, using e.g.

<style>
@page {
  size: A3 landscape;
}
</style>

Or that we can apply a stylesheet with -s.

So, why would this be this useful?

  1. simplicity.
  2. weasyprint is a great replacement to, and improvement on, the (now unsupported) wkhtmltopdf, and it would be nice if it could work compatibly, for ease of drop-in replacement. E.g.
cat input.html | wkhtmltopdf -O Landscape -s A3 - output.pdf

Thanks for your time, and an amazing product.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationProblems or improvements needed on the documentation or on the websitegood first issueIssues that can be quite easily solved by Python developers with a good CSS background

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions