Spaces:
Runtime error
Runtime error
Update InitialMarkups.py
Browse files- InitialMarkups.py +11 -8
InitialMarkups.py
CHANGED
|
@@ -2879,13 +2879,16 @@ def extract_section_under_header_tobebilledMultiplePDFSmarthe(multiplePDF_Paths)
|
|
| 2879 |
# docHighlights.save("highlighted_output.pdf", garbage=4, deflate=True)
|
| 2880 |
|
| 2881 |
dbxTeam = tsadropboxretrieval.ADR_Access_DropboxTeam('user')
|
| 2882 |
-
metadata = dbxTeam.sharing_get_shared_link_metadata(pdf_path)
|
| 2883 |
dbPath = '/TSA JOBS/ADR Test/FIND/'
|
| 2884 |
-
|
| 2885 |
-
|
| 2886 |
-
|
| 2887 |
-
|
| 2888 |
-
|
| 2889 |
-
|
| 2890 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2891 |
|
|
|
|
| 2879 |
# docHighlights.save("highlighted_output.pdf", garbage=4, deflate=True)
|
| 2880 |
|
| 2881 |
dbxTeam = tsadropboxretrieval.ADR_Access_DropboxTeam('user')
|
|
|
|
| 2882 |
dbPath = '/TSA JOBS/ADR Test/FIND/'
|
| 2883 |
+
jsonCombined=[]
|
| 2884 |
+
for singlepdf in arrayofPDFS:
|
| 2885 |
+
metadata = dbxTeam.sharing_get_shared_link_metadata(singlepdf)
|
| 2886 |
+
pdf_bytes = BytesIO()
|
| 2887 |
+
docHighlights.save(pdf_bytes)
|
| 2888 |
+
pdflink = tsadropboxretrieval.uploadanyFile(doc=docHighlights, path=dbPath, pdfname=filename)
|
| 2889 |
+
json_output1=changepdflinks(json_output,pdflink)
|
| 2890 |
+
jsonCombined.extend(json_output1)
|
| 2891 |
+
combined_json_str = json.dumps(jsonCombined, indent=1)
|
| 2892 |
+
print(combined_json_str)
|
| 2893 |
+
return pdf_bytes.getvalue(), docHighlights , combined_json_str, Alltexttobebilled , filenames
|
| 2894 |
|