GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - shine-jayakumar/Extract-Data-From-PDF-In-Python: Batch-convert pdf to text, extract data from pdf in python

BranchesTags
Open more actions menu

Latest commit

 

History

7 Commits
7 Commits

Folders and files

NameName
Last commit message
Last commit date
LICENSE
LICENSE
 
 
README.md
README.md
 
 
parse_payslips.py
parse_payslips.py
 
 
requirements.txt
requirements.txt
 
 

Repository files navigation

Extract Data From PDF In Python

MIT License

In this project, we are going to batch-convert pdf files to text and extract data without using PyPDF2/4.

We're going to achieve that by:

  • Using PDFtoText converter from XPdf to convert pdf files to text files
  • Using regular expressions to extract data
  • Performing data cleaning using pandas
  • Exporting to Excel file

Why Not Use PyPDF2/4

Short Answer: I got this error:

TypeError: object of type 'IndirectObject' has no len()

Long Answer: If PyPDF4 had worked I would never have had a chance to explore other ways. I looked on StackOverflow however couldn't find a solution for this error. Obviously, there had to be someone with the same problem but there's no solution.

I was not willing to manually copy and paste the information from 52 of my payslips. Isn't that what programs are used for?

Table of Contents

  • Packages
  • Converting PDF To Text
  • Script Link

Packages

  • Pandas

    Check out the requirements.txt

Converting PDF To Text

Converting PDF to text using Xpdf's pdftotext is really simple.

Using this command-line tool we can batch-convert PDFs to text files.

pdftotext source.pdf dest.txt

Script Link

Script Link: parse_payslips.py

About

Batch-convert pdf to text, extract data from pdf in python

Topics

batch-conversionbatch-converterdata-cleaningdata-extractionindirectobjectpandaspdf-converterpdf-data-extractionpdf-parserpdf-readerpdf-to-excelpdf-to-textpdf-toolspdftotextpypdfpypdf2python-automationpython-pdfregular-expressionsxpdf

Resources

Readme
MIT license
Activity

Stars

33 stars

Watchers

1 watching

Forks

13 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.