Spaces:
Runtime error
Runtime error
Update InitialMarkups.py
Browse files- InitialMarkups.py +2 -4
InitialMarkups.py
CHANGED
|
@@ -1475,7 +1475,6 @@ def extract_section_under_header_tobebilledOnly(pdf_path):
|
|
| 1475 |
return pdf_bytes.getvalue(), docHighlights , json_output , Alltexttobebilled , alltextWithoutNotbilled
|
| 1476 |
|
| 1477 |
|
| 1478 |
-
|
| 1479 |
def extract_section_under_header_tobebilled2(pdf_path):
|
| 1480 |
top_margin = 70
|
| 1481 |
bottom_margin = 50
|
|
@@ -1575,7 +1574,7 @@ def extract_section_under_header_tobebilled2(pdf_path):
|
|
| 1575 |
for page_num in range(heading_to_searchPageNum,len(doc)):
|
| 1576 |
print(heading_to_search)
|
| 1577 |
if paths[0].strip().lower() != currentgroupname.strip().lower():
|
| 1578 |
-
Alltexttobebilled+=' '+ paths[0]
|
| 1579 |
currentgroupname=paths[0]
|
| 1580 |
print(paths[0])
|
| 1581 |
if page_num in toc_pages:
|
|
@@ -1910,8 +1909,7 @@ def extract_section_under_header_tobebilled2(pdf_path):
|
|
| 1910 |
|
| 1911 |
pdf_bytes = BytesIO()
|
| 1912 |
docHighlights.save(pdf_bytes)
|
| 1913 |
-
return pdf_bytes.getvalue(), docHighlights , json_output , Alltexttobebilled
|
| 1914 |
-
|
| 1915 |
|
|
|
|
| 1916 |
|
| 1917 |
|
|
|
|
| 1475 |
return pdf_bytes.getvalue(), docHighlights , json_output , Alltexttobebilled , alltextWithoutNotbilled
|
| 1476 |
|
| 1477 |
|
|
|
|
| 1478 |
def extract_section_under_header_tobebilled2(pdf_path):
|
| 1479 |
top_margin = 70
|
| 1480 |
bottom_margin = 50
|
|
|
|
| 1574 |
for page_num in range(heading_to_searchPageNum,len(doc)):
|
| 1575 |
print(heading_to_search)
|
| 1576 |
if paths[0].strip().lower() != currentgroupname.strip().lower():
|
| 1577 |
+
Alltexttobebilled+=' \n'+ paths[0] +'\n'
|
| 1578 |
currentgroupname=paths[0]
|
| 1579 |
print(paths[0])
|
| 1580 |
if page_num in toc_pages:
|
|
|
|
| 1909 |
|
| 1910 |
pdf_bytes = BytesIO()
|
| 1911 |
docHighlights.save(pdf_bytes)
|
|
|
|
|
|
|
| 1912 |
|
| 1913 |
+
return pdf_bytes.getvalue(), docHighlights , json_output , Alltexttobebilled
|
| 1914 |
|
| 1915 |
|