Marthee commited on
Commit
784fbb2
·
verified ·
1 Parent(s): abee04b

Update Find_Hyperlinking_text.py

Browse files
Files changed (1) hide show
  1. Find_Hyperlinking_text.py +5 -1
Find_Hyperlinking_text.py CHANGED
@@ -389,5 +389,9 @@ def annotate_text_from_pdf(pdfshareablelinks, LISTheading_to_search):
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 , df
 
389
 
390
  # outputpdf=save_df_to_pdf(df)
391
  # outputpdfFitz =fitz.open('pdf',outputpdf)
392
+ # Save the annotated PDF to bytes
393
+ pdf_bytes = BytesIO()
394
+ pdf_document.save(pdf_bytes)
395
+ pdf_document.close()
396
  # return pdf_bytes.getvalue(), pageNumberFound, zoom_str
397
+ return pdf_bytes.getvalue(), pdf_document , df