Skip to content

Conversation

@danielhjames
Copy link

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

Useful to know if you live in a country which uses A4 paper :-)
@vilcans
Copy link
Owner

vilcans commented Mar 1, 2023

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.

@danielhjames
Copy link
Author

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.

@vilcans
Copy link
Owner

vilcans commented Mar 1, 2023

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.

@danielhjames
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants