@menajemmendel כתב בבירור | תוכנה חינמית לעשות סימני חיתוך ושוליים לגלישה:
מישהו יודע איך אפשר לעשות את זה בפייתון?
Spoiler
קיבלתי מגולם - לא בדקתי
from docx import Document
from docx.shared import Inches, Pt
יצירת מסמך וורד חדש
doc = Document()
הגדרות עמוד: שוליים רחבים לסימני חיתוך
section = doc.sections[0]
section.page_height = Inches(11.69) # A4
section.page_width = Inches(8.27)
section.top_margin = Inches(1)
section.bottom_margin = Inches(1)
section.left_margin = Inches(1)
section.right_margin = Inches(1)
כותרת עליונה עם "סימני חיתוך"
header = section.header
table = header.add_table(rows=1, cols=1)
cell = table.cell(0, 0)
paragraph = cell.paragraphs[0]
run = paragraph.add_run()
run.text = "[+] [+]" # מדמה סימנים בפינות
run.font.size = Pt(8)
paragraph.alignment = 1 # מרכז
כותרת תחתונה עם "סימני חיתוך"
footer = section.footer
table_f = footer.add_table(rows=1, cols=1)
cell_f = table_f.cell(0, 0)
paragraph_f = cell_f.paragraphs[0]
run_f = paragraph_f.add_run()
run_f.text = "[+] [+]"
run_f.font.size = Pt(8)
paragraph_f.alignment = 1
הוספת טקסט לדוגמה
doc.add_paragraph("דוגמה למסמך עם סימני חיתוך שיופיעו בכל עמוד.")
שמירת המסמך
doc.save("תבנית_וורד_עם_סימני_חיתוך.docx")