Marthee commited on
Commit
e7706fb
·
verified ·
1 Parent(s): b65aa40

Update Find_Hyperlinking_text.py

Browse files
Files changed (1) hide show
  1. Find_Hyperlinking_text.py +9 -9
Find_Hyperlinking_text.py CHANGED
@@ -83,16 +83,16 @@ def save_df_to_pdf(df):
83
  # Move to the next row
84
  pdf.ln(max_height)
85
  # Save PDF to memory instead of a file
86
- pdf_output = BytesIO()
87
  pdf.output(pdf_output)
88
 
89
- # Move the cursor to the beginning of the BytesIO stream to read its content
90
- pdf_output.seek(0)
91
 
92
- # Open the PDF using fitz (PyMuPDF) directly from the BytesIO object
93
- outputpdfFitz = fitz.open(pdf_output)
94
 
95
- return outputpdfFitz
96
 
97
 
98
 
@@ -387,7 +387,7 @@ def annotate_text_from_pdf(pdfshareablelinks, LISTheading_to_search):
387
  print(df)
388
  print(dictionaryNBS)
389
 
390
- outputpdf=save_df_to_pdf(df)
391
- outputpdfFitz =fitz.open('pdf',outputpdf)
392
  # return pdf_bytes.getvalue(), pageNumberFound, zoom_str
393
- return pdf_document , outputpdfFitz
 
83
  # Move to the next row
84
  pdf.ln(max_height)
85
  # Save PDF to memory instead of a file
86
+ # pdf_output = BytesIO()
87
  pdf.output(pdf_output)
88
 
89
+ # # Move the cursor to the beginning of the BytesIO stream to read its content
90
+ # pdf_output.seek(0)
91
 
92
+ # # Open the PDF using fitz (PyMuPDF) directly from the BytesIO object
93
+ # outputpdfFitz = fitz.open(pdf_output)
94
 
95
+ # return outputpdfFitz
96
 
97
 
98
 
 
387
  print(df)
388
  print(dictionaryNBS)
389
 
390
+ # outputpdf=save_df_to_pdf(df)
391
+ # outputpdfFitz =fitz.open('pdf',outputpdf)
392
  # return pdf_bytes.getvalue(), pageNumberFound, zoom_str
393
+ return pdf_document