pythonpython-pptx

How do I make the lines thinner in Python?


In the process of obtaining PPTX using Python, I faced the problem of having to thin the thickness of the lines. How can I solve this?

I tried to use python-pptx library to implement it. I'd be happy if you could take a look and let me know your feedback.


Solution

  • That sounds very interesting. I previously solved this problem with the following solution. In python-pptx, all shapes have line and stroke properties. You will need to access this property to proceed with setup. I will share a simple sample code.

    line_style = shape1.line
    line_style.width = Pt(0.25)
    

    You can test this code.😉