Initial commit of Roster

This commit is contained in:
Media
2025-06-28 01:12:46 -05:00
commit c23d3a7676
4367 changed files with 890519 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
import fitz # PyMuPDF
from pathlib import Path
def add_logo(input_path, output_path, logo_path, position=(80, 60), scale=0.55):
doc = fitz.open(input_path)
logo_image = str(Path(logo_path).resolve())
for page in doc:
# Load logo image dimensions
pix = fitz.Pixmap(logo_image)
width = pix.width * scale
height = pix.height * scale
x, y = position
rect = fitz.Rect(x, y, x + width, y + height)
page.insert_image(rect, filename=logo_image)
doc.save(output_path)
doc.close()