notebookvb

This commit is contained in:
Vladimir Buzalka
2026-04-29 06:51:47 +02:00
parent a1b9c93506
commit a9c143ba24
141 changed files with 30711 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
from pikepdf import Pdf, Name
inputpdf=r"u:\Dropbox\!!!Days\Downloads Z230\Dokumentace\a.pdf"
# # Open the PDF file
# with Pdf.open(inputpdf) as pdf:
# # Ensure the PDF has a Catalog dictionary
# if '/Catalog' not in pdf.Root:
# pdf.Root['/Catalog'] = {}
#
# # Set the OpenAction to fit the page
# pdf.Root['/Catalog']['/OpenAction'] = [pdf.pages[0], Name.Fit]
#
# # Save the modified PDF
# pdf.save('output.pdf')
from pikepdf import Pdf, Dictionary, Name
pdf = Pdf.open(inputpdf)
pdf.Root.PageLayout = Name('/SinglePage')
pdf.Root.PageMode = Name('/UseNone')
pdf.save('output.pdf')