smalot / smalot/pdfparser

Incorrect Whitespace Handling in Some PDFs

Open
#82 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
2.7k
Forks
579
Avg merge
2m
Merged PRs (30d)
1

Description

Please have a look at the PDF at http://dhss.alaska.gov/Commissioner/Documents/PDF/AlaskaExcludedProviderList.pdf
The parsed data (Ignore the first page and look at the tables in the subsequent tables) has missing whitespace. I am looking to convert the table to a CSV and the whitespace issue seems to make this impossible. Specifically look at the missing separator

  • between the status and last name columns
  • between the first name and provider type
  • between the exclusion authority and exclusion reason

I do not know if it is related, but there are a number of unexpected odd line-breaks, such as the one at about line 20 of the 2nd page.
Thanks

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Download the Alaska Excluded Provider List PDF from the issue and reproduce the extraction problem using the tables after the first page. Inspect how the parser handles separators between status and last name, first name and provider type, and exclusion authority and reason, along with the unexpected line breaks; done means those fields retain usable whitespace for CSV conversion.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.