既存PDFに何かしらのテキストを書き込む機会は多い。前回よりPythonで既存PDFに書き込みを行う方法を紹介している。前回は簡単な図形を描画してPDFに保存する方法を紹介したが、今回は実際に申請書に必要事項を書き込む方法を紹介する。特に日本語 ...
os.path.join (folder, filename) ensures the path is correct for the system. On Windows, it uses backslashes (reports\summary.txt); on Linux and macOS it uses forward slashes (reports/summary.txt).