Код: Выделить всё
from pypdf import PdfWriter
writer = PdfWriter(clone_from="test.pdf")
if writer.viewer_preferences is None:
writer.create_viewer_preferences()
writer.viewer_preferences.fit_window = True
with open("result.pdf", "wb") as fp:
writer.write(fp)
Я хотел, чтобы страница открывалась полностью в Window. Файл test.pdf состоит всего из одной страницы
Подробнее здесь: https://stackoverflow.com/questions/780 ... with-pypdf
Мобильная версия