Compare commits
No commits in common. "d0e5c1e48d582f88ad24baad6c836b7efe9fa5e7" and "20928a85700b0ba44d38147c8a007ac8cd923135" have entirely different histories.
d0e5c1e48d
...
20928a8570
1 changed files with 2 additions and 12 deletions
14
plakativ.py
14
plakativ.py
|
@ -387,10 +387,6 @@ class Plakativ:
|
|||
gdl = self.doc[self.pagenr].get_displaylist
|
||||
else:
|
||||
gdl = self.doc[self.pagenr].getDisplayList
|
||||
# this may fail with "RuntimeError: image is too wide"
|
||||
# from pdf_load_image_imp() in pdf-image.c from mupdf for sizes larger
|
||||
# than 1<<16 pixels:
|
||||
# https://bugs.ghostscript.com/show_bug.cgi?id=703839
|
||||
rect = gdl().rect
|
||||
inpage_width = pt_to_mm(rect.width)
|
||||
inpage_height = pt_to_mm(rect.height)
|
||||
|
@ -1038,10 +1034,7 @@ class Application(tkinter.Frame):
|
|||
top_frame = tkinter.Frame(frame_right)
|
||||
top_frame.pack(fill=tkinter.X)
|
||||
|
||||
button_text = "Open PDF"
|
||||
if have_img2pdf:
|
||||
button_text = "Open PDF, JPG, PNG, TIF"
|
||||
tkinter.Button(top_frame, text=button_text, command=self.on_open_button).pack(
|
||||
tkinter.Button(top_frame, text="Open PDF", command=self.on_open_button).pack(
|
||||
side=tkinter.LEFT, expand=tkinter.TRUE, fill=tkinter.X
|
||||
)
|
||||
tkinter.Button(top_frame, text="Help", state=tkinter.DISABLED).pack(
|
||||
|
@ -1195,13 +1188,10 @@ class Application(tkinter.Frame):
|
|||
self.canvas.delete(tkinter.ALL)
|
||||
|
||||
if not hasattr(self, "plakativ"):
|
||||
button_text = "Open PDF"
|
||||
if have_img2pdf:
|
||||
button_text = "Open PDF, JPG, PNG, TIF"
|
||||
self.canvas.create_text(
|
||||
self.canvas_size[0] / 2,
|
||||
self.canvas_size[1] / 2,
|
||||
text='Click on the "%s" button in the upper right.' % button_text,
|
||||
text='Click on the "Open PDF" button in the upper right.',
|
||||
fill="white",
|
||||
)
|
||||
return
|
||||
|
|
Loading…
Reference in a new issue