smalot / smalot/pdfparser

Idea: use individual "configs" to manage parsing process

Open
#305 3 comments 6 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Disclaimer: This issue is just a starting point for some ideas i got after working with PDFParser in the last couple of days. So for now, please don't expect anything from it besides some discussion. If someone wants to create PR's based on this, you are welcome.


Issue: There are scenarios in which you need a certain "config" when parsing a PDF. E.g. the PDF requires certain settings or has features, which PDFParser can't handle but you wanna get the most out of it.

Here some use cases which might fit:

Related areas:

  • parsing process
    • certain thresholds, variable values
    • don't run certain functions (e.g. maybe they crash for a certain file cause features are not supported)
    • ...
  • data enrichment afterwards
    • format table content
    • handle attachments or pictures
    • ...

Implementation sketch: Use a config object which gets passed to the parser. Its values will be passed to certain functions along the parsing process to override default values or do activate/deactivate PDFParser features/methods.

Would that be helpful? What do you think?

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

Start by reviewing the PDFParser parsing process and PDFObject values such as font_space, along with the related issues and pull request discussion linked in the description. Clarify which thresholds, feature toggles, and post-processing behaviors belong in the proposed config object; done requires an agreed design before implementation.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.