2👍
May by you can create your own style and use it everywhere? As example:
styles = getSampleStyleSheet()
styles.add(ParagraphStyle(name='Justify', alignment=TA_JUSTIFY, fontName='Times', fontSize=10))
styles.add(ParagraphStyle(name='Justify-Bold', alignment=TA_JUSTIFY, fontName='Times-Bold'))
bold_style = styles['Justify-Bold']
normal_style = styles['Justify']
or:
doc_title = copy.copy(styles["Heading1"])
doc_title.alignment = TA_CENTER
doc_title.fontName = 'Times-Bold'
doc_title.fontSize = 16
0👍
- Register your font:
pdfmetrics.registerFont(TTFont('DejaVuSerif', 'DejaVuSerif.ttf'))
- In your TableStyle add:
('FONT', (0, 0), (6, 0), 'DejaVuSerif'),
- [Answered ]-Searching features implementation in django project
- [Answered ]-How to cascade an update in a one-to-many relationship?
- [Answered ]-Stripe – 'exp_month' parameter should be an integer (instead, is 02 ) in Django View
- [Answered ]-Nginx server edit to allow iframe from any site
- [Answered ]-How to deal with a large queryset in Django
Source:stackexchange.com