mirror of
https://github.com/bringout/oca-report.git
synced 2026-04-18 05:42:01 +02:00
fix PyPDF2 3.x page copying + rename documentation
- Added explicit page copying after cloneReaderDocumentRoot() calls
- Renamed PATCH_PDFWRITER.md to PATCH_PYPDF2_PDFWRITER.md
- Prevents 327-byte empty PDFs in PyPDF2 3.x
🤖 assisted by claude
This commit is contained in:
parent
30497b379e
commit
b775aae34e
2 changed files with 4 additions and 1 deletions
|
|
@ -5,7 +5,10 @@ from base64 import b64decode
|
|||
from io import BytesIO
|
||||
from logging import getLogger
|
||||
|
||||
from PyPDF2 import PdfFileReader, PdfFileWriter
|
||||
try:
|
||||
from PyPDF2 import PdfWriter as PdfFileWriter, PdfReader as PdfFileReader
|
||||
except ImportError:
|
||||
from PyPDF2 import PdfFileWriter, PdfFileReader
|
||||
|
||||
from odoo import _, api, fields, models
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue