I want to put two logo images in header of document.One logo should stay at the very left and the other at the very right of the word file. Below is my code, but this sets both the logos at the right side, one after other.
document = Document()
section = document.sections[0]
header = section.header
paragraph_1 = header.paragraphs[0]
paragraph_1.alignment = 1
logo_run_1 = paragraph_1.add_run()
logo_run_1.add_picture("uv_logo.png", width=Cm(5))
last_picture = header.paragraphs[-1]
last_picture.alignment = WD_ALIGN_PARAGRAPH.LEFT
paragraph_2 = header.paragraphs[0]
paragraph_1.alignment = 2 # Right aligned
logo_run_2 = paragraph_1.add_run()
logo_run_1.add_picture("fm_logo.png", width=Cm(5))
last_picture = logo_run_2._element
last_picture = header.paragraphs[-1]
last_picture.alignment = WD_ALIGN_PARAGRAPH.RIGHT