INNER CODE UNIT · Python
setup_header_footer
sangrokjung/claude-forge · scripts/md-to-docx/convert.py:220
def setup_header_footer(doc: Document, branding: str = "Company", footer_text: str = "example.com"):
"""실제 Word 헤더/푸터 설정"""
for section in doc.sections:
# Header
header = section.header
header.is_linked_to_previous = False
hp = header.paragraphs[0]
hp.alignment = WD_ALIGN_PARAGRAPH.RIGHT
run = hp.add_run(branding)
set_korean_font(run, FONT_FAMILY)
run.font.size = Pt(8)
run.font.color.rgb = RGBColor(203, 213, 225) # Slate 300
# Footer
footer = section.footer
footer.is_linked_to_previous = False
fp = footer.paragraphs[0]