Last active
June 24, 2018 06:09
-
-
Save mondwan/dbff5ee7a1a18e56d439726248cf198b to your computer and use it in GitHub Desktop.
page size resolution
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from reportlab.lib.pagesizes import A5, landscape | |
# A5 = (210*mm,148*mm) | |
LANDSCAPE_A5 = landscape(A5) | |
PAGE_WIDTH = LANDSCAPE_A5[0] | |
PAGE_HEIGHT = LANDSCAPE_A5[1] | |
HORIZONTAL_MARGIN = PAGE_WIDTH / 32 | |
VERTICAL_MARGIN = PAGE_HEIGHT / 16 | |
# 196.875, 129.5 | |
BOX_WIDTH = PAGE_WIDTH - (HORIZONTAL_MARGIN * 2) | |
BOX_HEIGHT = PAGE_HEIGHT - (VERTICAL_MARGIN * 2) | |
VENDOR_BOX_WIDTH = BOX_WIDTH / 10 * 6 | |
VENDOR_BOX_HEIGHT = BOX_HEIGHT / 10 * 3 | |
INVOICE_NUMBER_BOX_WIDTH = BOX_WIDTH / 10 * 4 | |
INVOICE_NUMBER_BOX_HEIGHT = BOX_HEIGHT / 10 * 4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment