{"id":15033922,"url":"https://github.com/jonathanlink/pdflayouttextstripper","last_synced_at":"2026-10-19T12:03:48.593Z","repository":{"id":45725999,"uuid":"44072711","full_name":"JonathanLink/PDFLayoutTextStripper","owner":"JonathanLink","description":"Converts a pdf file into a text file while keeping the layout of the original pdf. Useful to extract the content from a table in a pdf file for instance. This is a subclass of PDFTextStripper class (from the Apache PDFBox library).","archived":false,"fork":false,"pushed_at":"2023-12-17T17:19:17.000Z","size":22135,"stargazers_count":1606,"open_issues_count":25,"forks_count":214,"subscribers_count":51,"default_branch":"master","last_synced_at":"2026-09-23T20:29:50.642Z","etag":null,"topics":["data-extraction","extract","java","layout","pdf","pdfbox","text"],"latest_commit_sha":null,"homepage":"https://jonathanlink.ch/PDFLayoutTextStripper.html","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JonathanLink.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2015-10-11T22:49:10.000Z","updated_at":"2026-09-21T07:29:44.000Z","dependencies_parsed_at":"2024-09-25T00:07:34.126Z","dependency_job_id":"282fef60-4473-4410-b956-02579a0d1ce9","html_url":"https://github.com/JonathanLink/PDFLayoutTextStripper","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/JonathanLink/PDFLayoutTextStripper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JonathanLink%2FPDFLayoutTextStripper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JonathanLink%2FPDFLayoutTextStripper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JonathanLink%2FPDFLayoutTextStripper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JonathanLink%2FPDFLayoutTextStripper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JonathanLink","download_url":"https://codeload.github.com/JonathanLink/PDFLayoutTextStripper/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JonathanLink%2FPDFLayoutTextStripper/sbom","scorecard":{"id":74149,"data":{"date":"2025-08-11","repo":{"name":"github.com/JonathanLink/PDFLayoutTextStripper","commit":"86ef5e1af56929576bf55d4a26527bd02d61b63e"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/19 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 16 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"14 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-q446-82vq-w674","Warn: Project is vulnerable to: GHSA-78wr-2p64-hpwj","Warn: Project is vulnerable to: GHSA-gwrp-pvrq-jmwv","Warn: Project is vulnerable to: GHSA-j288-q9x7-2f5v","Warn: Project is vulnerable to: GHSA-7r82-7xv7-xcpj","Warn: Project is vulnerable to: GHSA-rhgr-952r-6p8q","Warn: Project is vulnerable to: GHSA-2f88-5hg8-9x2x","Warn: Project is vulnerable to: GHSA-qg25-hgjv-cg9q","Warn: Project is vulnerable to: GHSA-xphj-m9cc-8fmq","Warn: Project is vulnerable to: GHSA-8vhq-qq4p-grq3","Warn: Project is vulnerable to: GHSA-g6ph-x5wf-g337","Warn: Project is vulnerable to: GHSA-jcwr-x25h-x5fh","Warn: Project is vulnerable to: GHSA-3p86-9955-h393","Warn: Project is vulnerable to: GHSA-vrpq-qp53-qv56"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-15T04:28:27.377Z","repository_id":45725999,"created_at":"2025-08-15T04:28:27.377Z","updated_at":"2025-08-15T04:28:27.377Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":344872684,"owners_count":38356447,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-10-03T21:59:58.778Z","status":"online","status_checked_at":"2026-10-19T02:00:06.414Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["data-extraction","extract","java","layout","pdf","pdfbox","text"],"created_at":"2024-09-24T20:23:13.203Z","updated_at":"2026-10-19T12:03:48.588Z","avatar_url":"https://github.com/JonathanLink.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PDFLayoutTextStripper\n\nConverts a PDF file into a text file while keeping the layout of the original PDF. Useful to extract the content from a table or a form in a PDF file. PDFLayoutTextStripper is a subclass of PDFTextStripper class (from the [Apache PDFBox](https://pdfbox.apache.org/) library).\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd colspan=\"2\" align=\"center\"\u003e\n      \u003cem\u003eThis repository is supported by our sponsor\u003c/em\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\" width=\"110\"\u003e\n      \u003ca href=\"https://www.e-iceblue.com/Introduce/pdf-for-java.html?aff_id=433\"\u003e\n        \u003cimg src=\"https://github.com/user-attachments/assets/249580fe-7472-4521-b361-2361fe6117cc\" alt=\"Spire.PDF for Java logo\" width=\"72\"\u003e\n      \u003c/a\u003e\n    \u003c/td\u003e\n    \u003ctd\u003e\n      \u003ch3\u003eSpire.PDF for Java\u003c/h3\u003e\n      Create, edit, convert, and process PDF documents programmatically in Java, with support for tables, forms, images, annotations, and more.\n      \u003cbr\u003e\u003cbr\u003e\n      \u003ca href=\"https://www.e-iceblue.com/Introduce/pdf-for-java.html?aff_id=433\"\u003e\u003cstrong\u003eExplore Spire.PDF for Java →\u003c/strong\u003e\u003c/a\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n## Use cases\nData extraction from a table in a PDF file\n![example](sample.png)\n-\nData extraction from a form in a PDF file\n![example](sample2.png)\n\n## How to install\n\n### Maven\n```\n\u003cdependency\u003e\n  \u003cgroupId\u003eio.github.jonathanlink\u003c/groupId\u003e\n  \u003cartifactId\u003ePDFLayoutTextStripper\u003c/artifactId\u003e\n  \u003cversion\u003e2.2.3\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n### Manual\n1) Install **apache pdfbox** manually ([to get the v2.0.6 click here](https://mvnrepository.com/artifact/org.apache.pdfbox/pdfbox/2.0.6) ) and its two dependencies\ncommons-logging.jar and fontbox\n\n\u003e**warning**: only pdfbox versions **from version 2.0.0 upwards** are compatible with this version of PDFLayoutTextStripper.java\n\n\n### How to use on Linux/Mac\n```\ncd PDFLayoutTextStripper\njavac -cp .:/pathto/pdfbox-2.0.6.jar:/pathto/commons-logging-1.2.jar:/pathto/PDFLayoutTextStripper/fontbox-2.0.6.jar *.java\njava -cp .:/pathto/pdfbox-2.0.6.jar:/pathto/commons-logging-1.2.jar:/pathto/PDFLayoutTextStripper/fontbox-2.0.6.jar test\n```\n\n### How to use on Windows\n\nThe same as for Linux (see above) but replace :  with ;\n\n## Sample code\n```\nimport java.io.File;\nimport java.io.FileNotFoundException;\nimport java.io.IOException;\nimport org.apache.pdfbox.io.RandomAccessFile;\nimport org.apache.pdfbox.pdfparser.PDFParser;\nimport org.apache.pdfbox.pdmodel.PDDocument;\nimport org.apache.pdfbox.text.PDFTextStripper;\n\npublic class test {\n\tpublic static void main(String[] args) {\n\t\tString string = null;\n        try {\n            PDFParser pdfParser = new PDFParser(new RandomAccessFile(new File(\"./samples/bus.pdf\"), \"r\"));\n            pdfParser.parse();\n            PDDocument pdDocument = new PDDocument(pdfParser.getDocument());\n            PDFTextStripper pdfTextStripper = new PDFLayoutTextStripper();\n            string = pdfTextStripper.getText(pdDocument);\n        } catch (FileNotFoundException e) {\n            e.printStackTrace();\n        } catch (IOException e) {\n            e.printStackTrace();\n        };\n        System.out.println(string);\n\t}\n}\n```\n\n## Contributors\nThanks to\n\n* Dmytro Zelinskyy for reporting an issue with its correction (v2.2.3) \n* Ho Ting Cheng for reporting an issue (v2.1)\n* James Sullivan for having updated the code to make it work with the latest version of PDFBox (v2.0)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonathanlink%2Fpdflayouttextstripper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonathanlink%2Fpdflayouttextstripper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonathanlink%2Fpdflayouttextstripper/lists"}