I am looking for a python library that I can use to draw simple shapes and characters and then save to a file (in a format convertible to pdf). I would prefer if I did not need an X-server running.
E.g. could look something like this
import drawing_lib
obj = drawing_lib.Object()
for i in range(5):
obj.draw_line(from=(i*10, 20), to=(i*10+10, 35))
obj.save_pdf('five_inclined_lines.pdf')
Any Ideas?
To insert shapes, click the "Drawing Tools" icon and select the "Expand Drawing Tools". Step 3. Next, you can choose to add shapes like lines, arrows, ovals, rectangles, and many more according to your needs. If you do not like these shapes, you also can get many others from the Cloud and Polygon option.
There are several such libraries.
Personally I would recommend reportlab for its highly versatile nature.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With