1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
# ===================
# --- Création PDF ---
# ===================
from reportlab.pdfgen import canvas
from reportlab.platypus import Paragraph, Table, TableStyle, Frame, Image, ParagraphAndImage
from reportlab.lib.styles import ParagraphStyle
from reportlab.lib.styles import getSampleStyleSheet
from reportlab.lib.units import mm
# Format de la feuille
from reportlab.lib.pagesizes import landscape
from reportlab.lib.pagesizes import A4
# Police Verdana
from reportlab.pdfbase.pdfmetrics import registerFont
from reportlab.pdfbase.ttfonts import TTFont
registerFont(TTFont('Verdana', 'VERDANA.TTF'))
registerFont(TTFont('Verdana-Bold', 'VERDANAB.TTF'))
registerFont(TTFont('Verdana-Italic', 'VERDANAI.TTF'))
registerFont(TTFont('Verdana-BoldItalic', 'VERDANAZ.TTF'))
registerFont(TTFont('THSarabun', 'THSarabun.ttf'))
registerFont(TTFont('THSarabun-Bold', 'THSarabun.ttf'))
registerFont(TTFont('THSarabun-italic', 'THSarabun.ttf'))
registerFont(TTFont('THSarabun-BoldItalic', 'THSarabun.ttf'))
registerFont(TTFont('arabtype', 'arabtype.ttf'))
#
from reportlab.lib import colors |
Partager