From 006f03ff4490f67cb6afd401ca55c16ea61cbf1c Mon Sep 17 00:00:00 2001 From: Martin Vilcans Date: Thu, 23 Feb 2017 00:09:39 +0100 Subject: Get rid of confusing PDF frame width calculation --- screenplain/export/pdf.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/screenplain/export/pdf.py b/screenplain/export/pdf.py index 83f3474..bdb7011 100644 --- a/screenplain/export/pdf.py +++ b/screenplain/export/pdf.py @@ -31,15 +31,16 @@ from screenplain import types lines_per_page = 55 characters_per_line = 61 +character_width = 1.0 / 10 * inch # Courier pitch is 10 chars/inch frame_height = 12 * lines_per_page -frame_width = characters_per_line * 72 / 10.0 # Courier pitch is 10 chars/inch +frame_width = characters_per_line * character_width + page_width, page_height = pagesizes.letter left_margin = 1.5 * inch right_margin = page_width - left_margin - frame_width top_margin = 1 * inch bottom_margin = page_height - top_margin - frame_height -character_width = 1.0 / 10 * inch default_style = ParagraphStyle( 'default', -- cgit v1.2.3