[解決!Python]ReportLab Toolkitを使ってテキストをPDFファイルに書き出すには:解決!Python Pythonでまとまった量のテキストや文字列からPDFファイルを作成するにはReportLab Toolkitが提供するPlatypusモジュールを使うと便利だ。その方法をまとめる。 from reportlab.platypus import SimpleDocTemplate, Paragraph, Spacer from reportlab.lib.styles import getSampleStyleSheet from reportlab.rl_config import defaultPageSize from reportlab.lib.units import inch from reportlab.pdfbase import pdfmetrics