I'm adding some images to a document and some of them rotate itself. The picture should be placed as portrait and it rotates automatically to landscape.
Here it is the code I'm using:
document.add_picture(path_to_picture, width=Inches(3))
last_paragraph = document.paragraphs[-1]
last_paragraph.alignment = WD_ALIGN_PARAGRAPH.CENTER
It works on a for loop, so lots of images can be added.
I'm adding some images to a document and some of them rotate itself. The picture should be placed as portrait and it rotates automatically to landscape.
Here it is the code I'm using:
It works on a for loop, so lots of images can be added.