git.schokokeks.org
Repositories
Help
Report an Issue
invoice.git
Code
Commits
Branches
Tags
Suche
Strukturansicht:
43c965a
Branches
Tags
factur-x_localdata
master
invoice.git
src
rechnung
Invoice
metrics.py
Default-Schriftgröße kleiner machen.
Bernd Wurst
commited
43c965a
at 2009-02-13 14:38:11
metrics.py
Blame
History
Raw
def setup(): from reportlab.lib.pagesizes import A4 from reportlab.lib.units import cm from reportlab.pdfbase.ttfonts import TTFont from reportlab.pdfbase import pdfmetrics if 'Vera' not in pdfmetrics._fonts.keys(): pdfmetrics.registerFont(TTFont("Vera", "Vera.ttf")) pdfmetrics.registerFont(TTFont("Vera-Bold", "VeraBd.ttf")) pdfmetrics.registerFont(TTFont("Vera-Oblique", "VeraIt.ttf")) pdfmetrics.registerFont(TTFont("Vera-BoldOblique", "VeraBI.ttf")) return (cm, A4) (cm, A4) = setup() (page_width, page_height) = A4 font = 'Vera' # Set default font size default_font_size = 8 # set margins topmargin = 2*cm bottommargin = 2.5*cm leftmargin = 2*cm rightmargin = 2*cm topcontent = page_height-topmargin leftcontent = leftmargin rightcontent = page_width - rightmargin bottomcontent = bottommargin rightcolumn = 13*cm address_width = 8.5*cm address_height = 5.0*cm