Update Doors_Schedule.py
Browse files- Doors_Schedule.py +11 -0
Doors_Schedule.py
CHANGED
|
@@ -1148,6 +1148,17 @@ def mainRun(schedule, plan, searcharray):
|
|
| 1148 |
|
| 1149 |
pdfs = []
|
| 1150 |
for p in plan:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1151 |
all_new_data = []
|
| 1152 |
all_widths = []
|
| 1153 |
pdf_outputs = []
|
|
|
|
| 1148 |
|
| 1149 |
pdfs = []
|
| 1150 |
for p in plan:
|
| 1151 |
+
pdf_document = fitz.open("pdf", p)
|
| 1152 |
+
# Get the first page (0-indexed)
|
| 1153 |
+
page = pdf_document[0]
|
| 1154 |
+
rect = page.rect # Rectangle: contains x0, y0, x1, y1
|
| 1155 |
+
|
| 1156 |
+
width_pdf = rect.width # or: width = rect.x1 - rect.x0
|
| 1157 |
+
height_pdf = rect.height # or: height = rect.y1 - rect.y0
|
| 1158 |
+
|
| 1159 |
+
print(f"plan width: {width_pdf}")
|
| 1160 |
+
print(f"plan height: {height_pdf}")
|
| 1161 |
+
|
| 1162 |
all_new_data = []
|
| 1163 |
all_widths = []
|
| 1164 |
pdf_outputs = []
|