Open danielhjames opened 1 year ago
It's a good idea to support A4. Have you tested this so that the layout and margins are correct, and text never overflows in A4 format?
Regarding the pull request, I think changing the page size shouldn't require code changes. I'll make sure to make it configurable instead.
Hi @vilcans I did test it with my own screenplay of 59 pages, looks good to me in A4!
A command-line option to change paper size at runtime would be neat. I see there are a bunch of other settings in export/pdf.py
but the screenplay use case is not like a general PDF renderer, where any style is desirable.
I made a branch with support for specifying paper size, and the result is that there's a large top margin on screenplays in A4 format. Probably because the number of lines is hardcoded for the letter size. I'll look into it more.
Hi @vilcans in another project I have controlled the style of PDF outputs using the CSS Paged Media specification, similar to export/default.css
in screenplain:
https://www.w3.org/TR/css-page-3/
This allows very precise control, but I don't see any support for this Paged Media specification in ReportLab. Also, the screenplain use case is limited to a single format and a small number of paper sizes. Therefore hard coding the parameters for each supported paper size could be the simplest solution.
Useful to know if you live in a country which uses A4 paper :-)