fix AttributeError with insertTextbox #10

Open
thp wants to merge 1 commit from thp/plakativ:insert_textbox into main
Showing only changes of commit 509933e49d - Show all commits

View file

@ -740,7 +740,7 @@ class Plakativ:
) )
) )
shape.finish(color=(1, 0, 0)) shape.finish(color=(1, 0, 0))
shape.insertTextbox( shape.insert_textbox(
fitz.Rect( fitz.Rect(
x0 + 5, x0 + 5,
y0 + 5, y0 + 5,
@ -851,7 +851,7 @@ 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 portrait: if portrait:
shape.insertTextbox( shape.insert_textbox(
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 +863,7 @@ class Plakativ:
color=(0.5, 0.5, 0.5), color=(0.5, 0.5, 0.5),
) )
else: else:
shape.insertTextbox( shape.insert_textbox(
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,