forked from josch/plakativ
Compare commits
2 commits
insert_tex
...
main
Author | SHA1 | Date | |
---|---|---|---|
73e346f5dd | |||
a8cc4c438f |
3 changed files with 18 additions and 5 deletions
|
@ -2,6 +2,11 @@
|
||||||
CHANGES
|
CHANGES
|
||||||
=======
|
=======
|
||||||
|
|
||||||
|
0.5.3 (2025-02-16)
|
||||||
|
------------------
|
||||||
|
|
||||||
|
- support for pymupdf 1.23.7
|
||||||
|
|
||||||
0.5.2 (2024-01-12)
|
0.5.2 (2024-01-12)
|
||||||
------------------
|
------------------
|
||||||
|
|
||||||
|
|
16
plakativ.py
16
plakativ.py
|
@ -51,7 +51,7 @@ except ImportError:
|
||||||
tkinter.Menubutton = dummy
|
tkinter.Menubutton = dummy
|
||||||
tkinter.LabelFrame = dummy
|
tkinter.LabelFrame = dummy
|
||||||
|
|
||||||
VERSION = "0.5.2"
|
VERSION = "0.5.3"
|
||||||
|
|
||||||
PAGE_SIZES = OrderedDict(
|
PAGE_SIZES = OrderedDict(
|
||||||
[
|
[
|
||||||
|
@ -740,7 +740,11 @@ class Plakativ:
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
shape.finish(color=(1, 0, 0))
|
shape.finish(color=(1, 0, 0))
|
||||||
shape.insert_textbox(
|
if hasattr(shape, "insert_textbox"):
|
||||||
|
it = shape.insert_textbox
|
||||||
|
else:
|
||||||
|
it = shape.insertTextbox
|
||||||
|
it(
|
||||||
fitz.Rect(
|
fitz.Rect(
|
||||||
x0 + 5,
|
x0 + 5,
|
||||||
y0 + 5,
|
y0 + 5,
|
||||||
|
@ -850,8 +854,12 @@ class Plakativ:
|
||||||
)
|
)
|
||||||
shape.finish(width=0.2, color=(0.5, 0.5, 0.5), dashes="[5 6 1 6] 0")
|
shape.finish(width=0.2, color=(0.5, 0.5, 0.5), dashes="[5 6 1 6] 0")
|
||||||
if numbers:
|
if numbers:
|
||||||
|
if hasattr(shape, "insert_textbox"):
|
||||||
|
it = shape.insert_textbox
|
||||||
|
else:
|
||||||
|
it = shape.insertTextbox
|
||||||
if portrait:
|
if portrait:
|
||||||
shape.insert_textbox(
|
it(
|
||||||
fitz.Rect(
|
fitz.Rect(
|
||||||
mm_to_pt(self.layout["border_left"]) + 5,
|
mm_to_pt(self.layout["border_left"]) + 5,
|
||||||
mm_to_pt(self.layout["border_top"]) + 5,
|
mm_to_pt(self.layout["border_top"]) + 5,
|
||||||
|
@ -863,7 +871,7 @@ class Plakativ:
|
||||||
color=(0.5, 0.5, 0.5),
|
color=(0.5, 0.5, 0.5),
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
shape.insert_textbox(
|
it(
|
||||||
fitz.Rect(
|
fitz.Rect(
|
||||||
mm_to_pt(self.layout["border_bottom"]) + 5,
|
mm_to_pt(self.layout["border_bottom"]) + 5,
|
||||||
mm_to_pt(self.layout["border_left"]) + 5,
|
mm_to_pt(self.layout["border_left"]) + 5,
|
||||||
|
|
2
setup.py
2
setup.py
|
@ -1,6 +1,6 @@
|
||||||
from setuptools import setup
|
from setuptools import setup
|
||||||
|
|
||||||
VERSION = "0.5.2"
|
VERSION = "0.5.3"
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name="plakativ",
|
name="plakativ",
|
||||||
|
|
Loading…
Reference in a new issue