pdf to text using python
by specter - Wednesday June 21, 2023 at 04:39 AM
#1
import os
import pdftotext


pdf_path = input("Enter the path of the pdf file : ")

assert os.path.exists(pdf_path), "this pdf file doesn't exist"

with open(pdf_path, 'rb') as f_r:
    pdf_pages = pdftotext.PDF(f_r)

for i, page in enumerate(pdf_pages):
    print('Page {}'.format(i))
    print(page)
    print('*'*100)
Reply
#2
Oh man!! Python is such an amazing programming language
Reply
#3
Thanks
Reply
#4
Thanks man!

This forum account is currently banned. Ban Length: Permanent (N/A Remaining)
Ban Reason: Suspected Scamming | Contact us via http://breachedmw4otc2lhx7nqe4wyxfhpvy32ooz26opvqkmmrbg73c7ooad.onion/contact if you feel this is incorrect.
Reply
#5
Thats very cool share

This forum account is currently banned. Ban Length: Permanent (N/A Remaining)
Ban Reason: Selling public data.
Reply
#6
there are many modules to do this, will definitely try this too
Reply
#7
Thanks man
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Useful links for developers Manfruity 36 2,356 Apr 24, 2026, 06:54 PM
Last Post: Weirdtatsum30777
  ⭐ Sektor7 - All courses (6 in total) ⭐ red_dot 599 38,579 Apr 23, 2026, 09:51 PM
Last Post: cwel321
  Discord Token Grabber | Private Stealer | Leaked For Free Piplup 351 57,829 Apr 21, 2026, 11:51 PM
Last Post: OldeChicago93
  WEBSITES FOR FREE INSTAGRAM FOLLOWERS ⭐ UHQ Moneygain 101 10,432 Feb 10, 2026, 03:02 PM
Last Post: onionX232
  How to buy crypto without KYC Manfruity 40 2,163 Feb 09, 2026, 10:55 PM
Last Post: Stevemox2

Forum Jump:


 Users browsing this forum: 1 Guest(s)