You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I need to apply below function in document on specific page.
Function purpose is to set up specific style and margins settings. I mark this page with paragraph (see screenshot).
How I can identify this page in function to apply in only on the page with marker?
I would really appreciate your help!
def set_up_doc(doc, fund_name, section_index=0):
# Apply styles to the specified section
section = doc.sections[section_index]
# Set paragraph spacing
paragraph_format = doc.styles['Normal'].paragraph_format
paragraph_format.space_after = Pt(0.1)
# Set font name and size
style = doc.styles['Normal']
font = style.font
font.name = 'Arial'
font.size = Pt(9)
# Set up margin width for the section
section.top_margin = Cm(2.12)
section.bottom_margin = Cm(2.01)
section.left_margin = Cm(0.88)
section.right_margin = Cm(1.02)
return doc
The text was updated successfully, but these errors were encountered:
mgrzeszczuk
changed the title
format page in in docx on page where specific paragraph is placed
format page in docx on page where specific paragraph is placed
Nov 25, 2024
I need to apply below function in document on specific page.
Function purpose is to set up specific style and margins settings. I mark this page with paragraph (see screenshot).
How I can identify this page in function to apply in only on the page with marker?
I would really appreciate your help!
The text was updated successfully, but these errors were encountered: