フォントは日本語対応できるものをちゃんと調べないと文字化けで駄目そう。 また、既存PDFの読み込みもファイルによってはフォント関係で駄目なのがあるみたいです。 (pdfrwで日本語フォントの入ったpdfが読み込めないのがいくつかありました)
In this article you will learn how add images to your PDF in the form of watermarks, stamps, and barcodes.
Pythonから帳票等でPDFファイルを出力する際に必要になりそうな書き方をまとめた記事です。
日本語にデフォルトで対応しており、HeiseiMin-W3とHeiseiKakuGo-W5がそのまま使えます。
PythonのPDF作成ライブラリのreportlabを使用して履歴書フォーマット(JIS規格)を作成しました。
PyMuPDF is a Python binding for MuPDF – “a lightweight PDF and XPS viewer”.
PyPDF2だと読み書きのときにエラーをはかれる。
Some pages internally change the standard PDF geometry (which uses the bottom-left page point as (0, 0)) to something else, and at the same time do not encapsulate this doing properly as they should.
The creator of the PDF has established a non-standard page geometry without keeping it “local” (as they should!). Most commonly, the PDF standard point (0,0) at bottom-left has been changed to the top-left point. So top and bottom are reversed – causing your insertion to be misplaced.