{"id":16695579,"url":"https://github.com/hreikin/pdf-toolbox","last_synced_at":"2025-07-09T05:03:55.179Z","repository":{"id":82389610,"uuid":"453158187","full_name":"hreikin/pdf-toolbox","owner":"hreikin","description":"Extract content from PDF's and convert or create new documents from the content in multiple output formats.","archived":false,"fork":false,"pushed_at":"2022-03-17T22:53:21.000Z","size":7940,"stargazers_count":0,"open_issues_count":9,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-28T19:52:55.102Z","etag":null,"topics":["adobe","document-conversion","document-converter","document-creation","document-creator","document-extraction","image-extraction","pandoc","pymupdf","pypandoc","python","python3","scrapy","text-extraction"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hreikin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-01-28T17:31:32.000Z","updated_at":"2022-03-05T13:36:35.000Z","dependencies_parsed_at":"2023-06-25T21:06:35.164Z","dependency_job_id":null,"html_url":"https://github.com/hreikin/pdf-toolbox","commit_stats":{"total_commits":196,"total_committers":1,"mean_commits":196.0,"dds":0.0,"last_synced_commit":"a83c5394a8b7d92da9fc375c37c0346061756b3b"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hreikin/pdf-toolbox","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hreikin%2Fpdf-toolbox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hreikin%2Fpdf-toolbox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hreikin%2Fpdf-toolbox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hreikin%2Fpdf-toolbox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hreikin","download_url":"https://codeload.github.com/hreikin/pdf-toolbox/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hreikin%2Fpdf-toolbox/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264396610,"owners_count":23601540,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["adobe","document-conversion","document-converter","document-creation","document-creator","document-extraction","image-extraction","pandoc","pymupdf","pypandoc","python","python3","scrapy","text-extraction"],"created_at":"2024-10-12T17:07:38.155Z","updated_at":"2025-07-09T05:03:55.155Z","avatar_url":"https://github.com/hreikin.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv id=\"top\"\u003e\u003c/div\u003e\n\u003c!--\n*** Thanks for checking out the Best-README-Template. If you have a suggestion\n*** that would make this better, please fork the repo and create a pull request\n*** or simply open an issue with the tag \"enhancement\".\n*** Don't forget to give the project a star!\n*** Thanks again! Now go create something AMAZING! :D\n--\u003e\n\n\n\n\u003c!-- PROJECT SHIELDS --\u003e\n\u003c!--\n*** I'm using markdown \"reference style\" links for readability.\n*** Reference links are enclosed in brackets [ ] instead of parentheses ( ).\n*** See the bottom of this document for the declaration of the reference variables\n*** for contributors-url, forks-url, etc. This is an optional, concise syntax you may use.\n*** https://www.markdownguide.org/basic-syntax/#reference-style-links\n--\u003e\n# PDF Toolbox\n\n[![Commits][commit-shield]][commit-url]\n[![Contributors][contributors-shield]][contributors-url]\n[![Issues][issues-shield]][issues-url]\n[![License][license-shield]][license-url]\n\u003c!-- [![Forks][forks-shield]][forks-url] --\u003e\n\u003c!-- [![Stargazers][stars-shield]][stars-url] --\u003e\n\u003c!-- [![LinkedIn][linkedin-shield]][linkedin-url] --\u003e\n\u003c!-- PROJECT LOGO --\u003e\n\u003c!-- \u003cdiv\u003e\n  \u003ca href=\"https://github.com/hreikin/pdf-toolbox\"\u003e\n    \u003cimg src=\"images/logo.png\" alt=\"Logo\" width=\"80\" height=\"80\"\u003e\n  \u003c/a\u003e\n  \u003ch3 align=\"center\"\u003ePDF Toolbox\u003c/h3\u003e\n  \u003cp\u003e\n  PDF Toolbox aims to be a PDF content extraction, conversion and creation \n  program. The goal is to extract content via various methods and store it in \n  a database for use in other document creation. \n  \u003cbr /\u003e\u003cbr /\u003e\n  This should hopefully allow easier conversion to other formats and also let \n  you create new documents using any text, tables pictures, etc you may \n  already have available in other file formats.\n  \u003cbr /\u003e\u003cbr /\u003e\n  PDF Toolbox is in development so things will break regularly until a solid base for \n  the program has been created.\n  \u003cbr /\u003e\u003cbr /\u003e\n  \u003ca href=\"https://github.com/hreikin/pdf-toolbox\"\u003e\u003cstrong\u003eExplore the docs »\u003c/strong\u003e\u003c/a\u003e\n  \u003cbr /\u003e\n  \u003cbr /\u003e\n  \u003ca href=\"https://github.com/hreikin/pdf-toolbox\"\u003eView Demo\u003c/a\u003e\n  \u003ca href=\"https://github.com/hreikin/pdf-toolbox/issues\"\u003eReport Bug\u003c/a\u003e\n  \u003cbr /\u003e\n  \u003ca href=\"https://github.com/hreikin/pdf-toolbox/issues\"\u003eRequest Feature\u003c/a\u003e\n  \u003c/p\u003e\n\u003c/div\u003e --\u003e\n\n\n\u003c!-- ABOUT THE PROJECT --\u003e\n## About The Project\n\u003c!-- Project Screenshot --\u003e\n\u003c!-- [![Product Name Screen Shot][product-screenshot]](https://example.com) --\u003e\n\nPDF Toolbox aims to be a PDF content extraction, conversion and creation \nprogram. The goal is to extract content via various methods and store it in \na database for use in other document creation. \n\u003cbr /\u003e\u003cbr /\u003e\nThis should hopefully allow easier conversion to other formats and also let \nyou create new documents using any text, tables pictures, etc you may \nalready have available in other file formats.\n\u003cbr /\u003e\u003cbr /\u003e\nAll development work currently happens on the `development` branch and changes \nare merged frequently into `main`. Once a solid base has been formed a 0.1 \nrelease will be created and merges from the `development` branch will only be \nfor security fixes, bug fixes and new versions.\n\u003cbr /\u003e\n\u003c!-- \u003ca href=\"https://github.com/hreikin/pdf-toolbox\"\u003e\u003cstrong\u003eExplore the docs »\u003c/strong\u003e\u003c/a\u003e\n\u003cbr /\u003e\n\u003cbr /\u003e\n\u003ca href=\"https://github.com/hreikin/pdf-toolbox\"\u003eView Demo\u003c/a\u003e --\u003e\n\u003cul\u003e\n  \u003cli\u003e\n    \u003ca href=\"https://github.com/hreikin/pdf-toolbox/issues\"\u003eReport Bug\u003c/a\u003e\n  \u003c/li\u003e\n  \u003cli\u003e\n    \u003ca href=\"https://github.com/hreikin/pdf-toolbox/issues\"\u003eRequest Feature\u003c/a\u003e\n  \u003c/li\u003e\n\u003c/ul\u003e\n\u003c!-- TABLE OF CONTENTS --\u003e\n\u003cdetails\u003e\n  \u003csummary\u003eTable of Contents\u003c/summary\u003e\n  \u003col\u003e\n    \u003cli\u003e\n      \u003ca href=\"#about-the-project\"\u003eAbout The Project\u003c/a\u003e\n      \u003cul\u003e\n        \u003cli\u003e\u003ca href=\"#built-with\"\u003eBuilt With\u003c/a\u003e\u003c/li\u003e\n      \u003c/ul\u003e\n    \u003c/li\u003e\n    \u003cli\u003e\n      \u003ca href=\"#getting-started\"\u003eGetting Started\u003c/a\u003e\n      \u003cul\u003e\n        \u003cli\u003e\u003ca href=\"#prerequisites\"\u003ePrerequisites\u003c/a\u003e\u003c/li\u003e\n        \u003cli\u003e\u003ca href=\"#installation\"\u003eInstallation\u003c/a\u003e\u003c/li\u003e\n        \u003cli\u003e\u003ca href=\"#known-issues\"\u003eKnown Issues\u003c/a\u003e\u003c/li\u003e\n        \u003cli\u003e\u003ca href=\"#comparison-scores\"\u003eComparison Scores\u003c/a\u003e\u003c/li\u003e\n      \u003c/ul\u003e\n    \u003c/li\u003e\n    \u003c!-- \u003cli\u003e\u003ca href=\"#usage\"\u003eUsage\u003c/a\u003e\u003c/li\u003e --\u003e\n    \u003cli\u003e\u003ca href=\"#roadmap\"\u003eRoadmap\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#contributing\"\u003eContributing\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#license\"\u003eLicense\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#contact\"\u003eContact\u003c/a\u003e\u003c/li\u003e\n    \u003c!-- \u003cli\u003e\u003ca href=\"#acknowledgments\"\u003eAcknowledgments\u003c/a\u003e\u003c/li\u003e --\u003e\n  \u003c/ol\u003e\n\u003c/details\u003e\n\n### Built With\n\n* [Python3](https://www.python.org/)\n* [PyMuPDF](https://github.com/pymupdf/PyMuPDF)\n* [PyTesseract](https://github.com/madmaze/pytesseract)\n* [Adobe PDF Extract API](https://developer.adobe.com/document-services/apis/pdf-extract/)\n\n\u003c!-- GETTING STARTED --\u003e\n## Getting Started\n\nTo get a local copy up and running follow these simple steps.\n\n### Prerequisites\n\n* **Adobe**\n  * Place `Adobe PDF Extract API` credentials in root of repository. Credentials are available from [Adobe](https://developer.adobe.com/document-services/apis/pdf-extract/) with a 1000 credit/six month free trial.\n* **Pillow/PIL**\n  * Install `Python Imaging Library` (or the `Pillow fork`) for your OS. Installation instructions available at the [Pillow](https://pillow.readthedocs.io/en/stable/installation.html) documentation.\n* **TesseractOCR**\n  * Install `Tesseract OCR` for your OS. Installation instructions available at the [Tesseract OCR](https://github.com/tesseract-ocr/tesseract) github repository.\n* **MuPDF**\n  * Install `MuPDF` for your OS. Installation instructions available at the [MuPDF](https://mupdf.com) website.\n\n### Installation\n\n1. Get a free API Key/Credentials at [Adobe](https://developer.adobe.com/document-services/apis/pdf-extract/).\n2. Clone the repo\n    ```sh\n    git clone https://github.com/hreikin/pdf-toolbox.git\n    ```\n3. Create and source a Python virtual environment.\n    ```sh\n    python3 -m venv .venv\n    source .venv/bin/activate\n    ```\n4. Install requirements with `pip`\n    ```sh\n    pip install -r requirements.txt\n    ```\n\n\n\n### Known Issues\nOn Linux (Windows/Mac untested) the file `.venv/lib64/python3.9/site-packages/ado\nbe/pdfservices/operation/internal/io/file_ref_impl.py` from `pdfservices-sdk` \ninside the `venv` you create needs a few changes otherwise it might fail with a \nfalse `cross-device link` error.\n\nAdd `import shutil` to the top of the file and on line 46 alter it to the \nfollowing to successfully save the JsonSchema/zip file it outputs. This does not \ndeal with deleting the temporary file as it only copies it however with it being \nin temp it should be deleted on a reboot anyway so for now this hacky workaround \nshould be ok:\n\n```python\nshutil.copy(self._file_path, abs_path)\n```\n\n### Comparison Scores\nThe file `confidence.py` creates three text files for comparison to create a \nrudimentary confidence check as one isn't provided by the API. The score is a \ncomparison between the API's extraction and other extraction techniques. Scores \nare calculated using the `SequenceMatcher` class and `get_close_matches` method \nfrom `difflib`. \n\nA score of **0.6** for any of the calculated scores is considered a close match. \nAll scores are stored in a dictionary and a text file is created with the \nresults.\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\u003c!-- USAGE EXAMPLES --\u003e\n\u003c!-- ## Usage\n\nUse this space to show useful examples of how a project can be used. Additional screenshots, code examples and demos work well in this space. You may also link to more resources.\n\n_For more examples, please refer to the [Documentation](https://example.com)_\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e --\u003e\n\n\n\n\u003c!-- ROADMAP --\u003e\n## Roadmap\n\nSee the [open issues](https://github.com/hreikin/pdf-toolbox/issues) for a full list of proposed features (and known issues).\n\n\u003c!-- **Related Issues** --\u003e\n\n- [ ] [Database](https://github.com/hreikin/pdf-toolbox/issues/2)\n- [ ] [Extraction](https://github.com/hreikin/pdf-toolbox/issues/3)\n- [x] [Comparison Score](https://github.com/hreikin/pdf-toolbox/issues/4)\n- [ ] [Conversion](https://github.com/hreikin/pdf-toolbox/issues/5)\n- [ ] [Creation](https://github.com/hreikin/pdf-toolbox/issues/6)\n- [ ] [Merge \u0026 Combine](https://github.com/hreikin/pdf-toolbox/issues/7)\n- [ ] [GUI](https://github.com/hreikin/pdf-toolbox/issues/11) \n\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\n\u003c!-- CONTRIBUTING --\u003e\n## Contributing\n\nContributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.\n\nIf you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag \"enhancement\".\nDon't forget to give the project a star! Thanks again!\n\n1. Fork the Project\n2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the Branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\n\u003c!-- LICENSE --\u003e\n## License\n\nDistributed under the MIT License. See `LICENSE.txt` for more information.\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\n\u003c!-- CONTACT --\u003e\n## Contact\n\nPersonal Website: [https://hreikin.co.uk](https://hreikin.co.uk)\n\nProject Link: [https://github.com/hreikin/pdf-toolbox](https://github.com/hreikin/pdf-toolbox)\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\n\u003c!-- ACKNOWLEDGMENTS --\u003e\n\u003c!-- ## Acknowledgments\n\n* []()\n* []()\n* []()\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e --\u003e\n\n\n\n\u003c!-- MARKDOWN LINKS \u0026 IMAGES --\u003e\n\u003c!-- https://www.markdownguide.org/basic-syntax/#reference-style-links --\u003e\n[contributors-shield]: https://img.shields.io/github/contributors/hreikin/pdf-toolbox.svg?style=for-the-badge\n[contributors-url]: https://github.com/hreikin/pdf-toolbox/graphs/contributors\n[forks-shield]: https://img.shields.io/github/forks/hreikin/pdf-toolbox.svg?style=for-the-badge\n[forks-url]: https://github.com/hreikin/pdf-toolbox/network/members\n[stars-shield]: https://img.shields.io/github/stars/hreikin/pdf-toolbox.svg?style=for-the-badge\n[stars-url]: https://github.com/hreikin/pdf-toolbox/stargazers\n[issues-shield]: https://img.shields.io/github/issues/hreikin/pdf-toolbox.svg?style=for-the-badge\n[issues-url]: https://github.com/hreikin/pdf-toolbox/issues\n[license-shield]: https://img.shields.io/github/license/hreikin/pdf-toolbox.svg?style=for-the-badge\n[license-url]: https://github.com/hreikin/pdf-toolbox/blob/main/LICENSE.txt\n[commit-shield]: https://img.shields.io/github/commit-activity/m/hreikin/pdf-toolbox?style=for-the-badge\n[commit-url]: https://github.com/hreikin/pdf-toolbox/graphs/commit-activity\n\u003c!-- [linkedin-shield]: https://img.shields.io/badge/-LinkedIn-black.svg?style=for-the-badge\u0026logo=linkedin\u0026colorB=555 --\u003e\n\u003c!-- [linkedin-url]: https://linkedin.com/in/linkedin_username --\u003e\n\u003c!-- [product-screenshot]: images/screenshot.png --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhreikin%2Fpdf-toolbox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhreikin%2Fpdf-toolbox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhreikin%2Fpdf-toolbox/lists"}