-
Notifications
You must be signed in to change notification settings - Fork 678
Closed
Labels
not a bugnot a bug / user error / unable to reproducenot a bug / user error / unable to reproduce
Description
Description of the bug
t1 = "text with rotate = 0.can't see me",Can't display...
import fitz
doc = fitz.open() # new or existing PDF
page = doc.new_page() # new page, or choose doc[n]
# write in this overall area
rect = fitz.Rect(100, 100, 300, 150)
# partition the area in 4 equal sub-rectangles
CELLS = fitz.make_table(rect, cols=4, rows=1)
t1 = "text with rotate = 0.can't see me" # these texts we will written
t2 = "text with rotate = 90."
t3 = "text with rotate = 180."
t4 = "text with rotate = 270."
text = [t1, t2, t3, t4]
red = fitz.pdfcolor["red"] # some colors
gold = fitz.pdfcolor["gold"]
blue = fitz.pdfcolor["blue"]
shape = page.new_shape() # create Shape
for i in range(len(CELLS[0])):
shape.draw_rect(CELLS[0][i]) # draw rectangle
shape.insert_textbox(
CELLS[0][i], text[i], fontname="hebo", color=blue, rotate=90 * i
)
shape.finish(width=0.3, color=red, fill=gold)
shape.commit() # write all stuff to the page
doc.save("D:/tst/xxx.pdf")How to reproduce the bug
PyMuPDF version
1.23.19
Operating system
Windows
Python version
3.11
Metadata
Metadata
Assignees
Labels
not a bugnot a bug / user error / unable to reproducenot a bug / user error / unable to reproduce
