Template mapping and detect issue fixed
This commit is contained in:
14
print_cells.py
Normal file
14
print_cells.py
Normal file
@@ -0,0 +1,14 @@
|
||||
import sys
|
||||
import os
|
||||
sys.path.append(os.path.join(os.getcwd(), 'docengine'))
|
||||
|
||||
from app.core.database import SessionLocal
|
||||
from app.models.template import DocumentFormat
|
||||
|
||||
db = SessionLocal()
|
||||
t = db.query(DocumentFormat).filter(DocumentFormat.is_active == True).first()
|
||||
if t:
|
||||
print(f"Template Name: {t.name}")
|
||||
print(f"Number of cells: {len(t.cells)}")
|
||||
for c in t.cells:
|
||||
print(f"Cell: x={c.x}, y={c.y}, w={c.width}, h={c.height}")
|
||||
Reference in New Issue
Block a user