screenplain icon indicating copy to clipboard operation
screenplain copied to clipboard

Add help text for paper size of PDF output

Open danielhjames opened this issue 2 years ago • 4 comments

Useful to know if you live in a country which uses A4 paper :-)

danielhjames avatar Feb 24 '23 15:02 danielhjames

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.

vilcans avatar Mar 01 '23 16:03 vilcans

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.

danielhjames avatar Mar 01 '23 16:03 danielhjames

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.

vilcans avatar Mar 01 '23 20:03 vilcans

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.

danielhjames avatar Mar 02 '23 10:03 danielhjames