Skip to content

Problem with closing PDF file saved by PyPDF2 #963

@Kaemer1645

Description

@Kaemer1645

I'm create PDF file using PyPDF2. After that when I'm oppening this file with Adobe Acrobat and I would like to close it. The window appears with messege like "Would you like to save this file?"
I haven't got this problem with previous versions of PyPDF2.

Environment

$ python -m platform
Windows-10-10.0.19044-SP0

$ python -c "import PyPDF2;print(PyPDF2.__version__)"
2.1.0

Code

This is a minimal, complete example that shows the issue:

from PyPDF2 import PdfFileWriter
import os

c_dir = os.getcwd()
path = os.path.join(c_dir,'test_2.pdf')
pdf = PdfFileWriter()
pdf.addBlankPage(100, 100)
pdf.write(open(path, 'wb'))

PDF

test_2.pdf

Metadata

Metadata

Assignees

Labels

is-bugFrom a users perspective, this is a bug - a violation of the expected behavior with a compliant PDF

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions