Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

loadPDF.py 530 B

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
  1. from ironpdf import *
  2. import csv
  3. from langchain_community.document_loaders import PyPDFLoader
  4. def loadPDF():
  5. renderer = ChromePdfRenderer()
  6. tag = input("Enter stock symbol: ")
  7. tag_found = False
  8. with open('Conference-Calls-1-14-2024.csv', 'r') as file:
  9. reader = csv.reader(file)
  10. for row in reader:
  11. if row[0] == tag:
  12. url = row[3]
  13. pdf = renderer.RenderUrlAsPdf(url)
  14. name = tag + '.pdf'
  15. pdf.SaveAs(name)
  16. return name
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...