Spaces:
Sleeping
Sleeping
Update Counting_Columns_2_1.py
Browse files- Counting_Columns_2_1.py +2 -2
Counting_Columns_2_1.py
CHANGED
|
@@ -186,7 +186,7 @@ def add_annotations_to_pdf(image, pdf_name, slctd_clm, columns_types_v):
|
|
| 186 |
#page.set_rotation(rotationOld)
|
| 187 |
return pdf_document
|
| 188 |
|
| 189 |
-
def mainfun(pdf_name,pdfpath):
|
| 190 |
pdf_document = fitz.open('pdf',pdf_name)
|
| 191 |
page = pdf_document[0]
|
| 192 |
rotation = page.rotation
|
|
@@ -226,7 +226,7 @@ def mainfun(pdf_name,pdfpath):
|
|
| 226 |
annotatedimg = cv2.cvtColor(img, cv2.COLOR_RGB2BGR)
|
| 227 |
|
| 228 |
legend = legend.fillna(' ')
|
| 229 |
-
gc,spreadsheet_service,spreadsheetId, spreadsheet_url , namepathArr=google_sheet_Legend.legendGoogleSheets(legend ,
|
| 230 |
list1=pd.DataFrame(columns=['content', 'id', 'subject','color'])
|
| 231 |
for page in doc2:
|
| 232 |
for annot in page.annots():
|
|
|
|
| 186 |
#page.set_rotation(rotationOld)
|
| 187 |
return pdf_document
|
| 188 |
|
| 189 |
+
def mainfun(pdf_name,pdfpath,planname):
|
| 190 |
pdf_document = fitz.open('pdf',pdf_name)
|
| 191 |
page = pdf_document[0]
|
| 192 |
rotation = page.rotation
|
|
|
|
| 226 |
annotatedimg = cv2.cvtColor(img, cv2.COLOR_RGB2BGR)
|
| 227 |
|
| 228 |
legend = legend.fillna(' ')
|
| 229 |
+
gc,spreadsheet_service,spreadsheetId, spreadsheet_url , namepathArr=google_sheet_Legend.legendGoogleSheets(legend , planname,pdfpath)
|
| 230 |
list1=pd.DataFrame(columns=['content', 'id', 'subject','color'])
|
| 231 |
for page in doc2:
|
| 232 |
for annot in page.annots():
|