aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Vilcans <martin@librador.com>2017-02-23 00:09:39 +0100
committerMartin Vilcans <martin@librador.com>2017-02-23 00:09:39 +0100
commit006f03ff4490f67cb6afd401ca55c16ea61cbf1c (patch)
tree1aa4c377e60634a06dae23806766858e3fc4f586
parente76e044308a8d3b5fa93bc9a2657897c480bb782 (diff)
downloadscreenplain-006f03ff4490f67cb6afd401ca55c16ea61cbf1c.tar.gz
Get rid of confusing PDF frame width calculation
-rw-r--r--screenplain/export/pdf.py5
1 files 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',