Python Khmer — Pdf

from reportlab.pdfgen import canvas from reportlab.lib.pagesizes import A4 from reportlab.pdfbase import pdfmetrics from reportlab.pdfbase.ttfonts import TTFont pdfmetrics.registerFont(TTFont('KhmerFont', 'KhmerOSBattambang-Regular.ttf'))

y = 800 for key, value in content.items(): c.drawString(50, y, f"key: value") y -= 20 python khmer pdf

with open(data_yaml, 'r', encoding='utf-8') as f: content = yaml.safe_load(f) from reportlab

Scroll to Top