Aug-12-2022, 11:26 AM
(This post was last modified: Aug-12-2022, 11:27 AM by Gribouillis.)
I would try to draw in parallel a PIL image and the tkinter canvas like in this very old forum post. The pil image can be saved as pdf in modern versions of pil. You could define your own functions such as
def my_create_rectangle(...): my_canvas.create_rectangle(...) my_image.rectangle(...) ... def generate_drawing(): ... my_create_rectangle(...) def generate_pdf(...) my_image.save(...) # save as pdf