{"id":13961661,"url":"https://github.com/SimpleApp/PDFParser","last_synced_at":"2025-07-21T06:31:30.886Z","repository":{"id":148837016,"uuid":"139564279","full_name":"SimpleApp/PDFParser","owner":"SimpleApp","description":"Swift PDFParser for PDF parsing and text mining. Includes a TrueType font parser","archived":false,"fork":false,"pushed_at":"2019-08-05T18:34:21.000Z","size":150,"stargazers_count":37,"open_issues_count":0,"forks_count":10,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-11-28T07:34:36.771Z","etag":null,"topics":["pdf-parser","swift","truetype"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SimpleApp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2018-07-03T10:03:39.000Z","updated_at":"2024-11-19T12:53:38.000Z","dependencies_parsed_at":"2024-01-15T03:59:49.713Z","dependency_job_id":null,"html_url":"https://github.com/SimpleApp/PDFParser","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/SimpleApp/PDFParser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SimpleApp%2FPDFParser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SimpleApp%2FPDFParser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SimpleApp%2FPDFParser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SimpleApp%2FPDFParser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SimpleApp","download_url":"https://codeload.github.com/SimpleApp/PDFParser/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SimpleApp%2FPDFParser/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266253526,"owners_count":23900051,"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":["pdf-parser","swift","truetype"],"created_at":"2024-08-08T17:01:20.409Z","updated_at":"2025-07-21T06:31:30.583Z","avatar_url":"https://github.com/SimpleApp.png","language":"Swift","readme":"#  PDFParser\nA pure Swift library for extracting text information from pdf files, such as text blocks with coordinates and font information. Also includes a true type font parser for glyph width computation.\n\nParsing code based on PDFKitten https://github.com/KurtCode/PDFKitten\nTrueType parser based on  http://stevehanov.ca/blog/index.php?id=143\n\nParsing is done very simply, and returns TextBlocks structs, that can be later indexed by custom code.\nA simple indexer is provided, assuming single column layout, aggregating words.\n\n```Swift\nvar documentIndexer = SimpleDocumentIndexer()\nlet documentPath = Bundle.main.path(forResource: \"Kurt the Cat\", ofType: \"pdf\", inDirectory: nil, forLocalization: nil)\n\nlet parser = try! Parser(documentURL: URL(fileURLWithPath: documentPath!), delegate:self, indexer: documentIndexer)\nparser.parse()\n\nprint( \"All Text Blocks Raw dump : \\n\")\nprint(documentIndexer.pageIndexes[1]!.textBlocks)\n\nprint( \"\\nWords per lines : \\n\")\nprint(documentIndexer.pageIndexes[1]!.allLinesDescription())\n```\n\nViewController in the DemoApp displays UILabel for textblocks. This lets you see if the frames for the textblock returned by the parser is correct.\n\n\u003e This code is not ready for production. Use at your own risk.\n\u003e This code is probably way too unoptimized to be used for anything latency-sensitive. It was meant to be easy to understand and correct first and foremost. \n","funding_links":[],"categories":["Swift"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSimpleApp%2FPDFParser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FSimpleApp%2FPDFParser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSimpleApp%2FPDFParser/lists"}