{"id":16690772,"url":"https://github.com/omaxel/pdf-ocr","last_synced_at":"2025-04-10T00:51:20.730Z","repository":{"id":87213915,"uuid":"116784450","full_name":"omaxel/pdf-ocr","owner":"omaxel","description":"Recognize page content of a PDF as text using Tesseract and Ghostscript.","archived":false,"fork":false,"pushed_at":"2018-01-09T16:33:33.000Z","size":177,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-10T00:51:16.131Z","etag":null,"topics":["csharp","ghostscript","ocr","pdf","pdf-ocr-extraction","tesseract-ocr"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":false,"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/omaxel.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":"2018-01-09T07:57:05.000Z","updated_at":"2024-03-26T17:54:57.000Z","dependencies_parsed_at":null,"dependency_job_id":"4c1be34d-d770-4af1-b809-ba30d4c68e19","html_url":"https://github.com/omaxel/pdf-ocr","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omaxel%2Fpdf-ocr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omaxel%2Fpdf-ocr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omaxel%2Fpdf-ocr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omaxel%2Fpdf-ocr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/omaxel","download_url":"https://codeload.github.com/omaxel/pdf-ocr/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248137997,"owners_count":21053775,"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":["csharp","ghostscript","ocr","pdf","pdf-ocr-extraction","tesseract-ocr"],"created_at":"2024-10-12T16:05:18.262Z","updated_at":"2025-04-10T00:51:20.721Z","avatar_url":"https://github.com/omaxel.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"﻿# pdf-ocr\nRecognize page content of a PDF as text [Tesseract](https://github.com/charlesw/tesseract) and [Ghostscript](https://www.ghostscript.com/).\n\n## Prerequisites\n* Install [Visual Studio 2015 Runtime](https://www.microsoft.com/en-us/download/details.aspx?id=48145) (both x86 \u0026 x64)\n* Install [Ghostscript](https://www.ghostscript.com/download/gsdnld.html) (x86 or x64, depending on your computer)\n\n## Installation\n* Clone or download this repository.\n* Open the solution in Visual Studio and run `Install-Package Tesseract -Version 3.0.2` from the `Package Manager Console`.\n* Download language data files for tesseract 3.04 from the [tessdata repository](https://github.com/tesseract-ocr/tessdata/archive/3.04.00.zip) and add them to the `tessdata` folder of your project. Set `Copy to output directory` to `Always` for all the copied files. You can copy only the language files you are interested in (e.g. all the files that starts with `eng` for English language).\n\n## Configuration\n\n|                                  | Variable name   | Default                                | Description                                                                                                                                                                                   |\n|----------------------------------|-----------------|----------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| **Input PDF file**                   | `inputPdfFile`  | `test.pdf`, included in the repository | The PDF file whose selected page's content will be recognized as text.                                                                                                                        |\n| **Page number**                    | `pageNumber`    | `1`                                    | The number of the page whose content will be recognized as text.                                                                                                                              |\n| **Recognition language**            | `ocrLanguage`   | `\"eng\"`                                | The language used from tesseract to recognize text. When you change this value, make shure you add the language data files to the tessdata folder. See [Installation section](#Installation). |\n| **DPI converting PDF page to image** | `pdfToImageDPI` | `150`                                  | Tesseract can't recognize text from PDF pages. This is way we have to convert the PDF page to an image. This property indicates the DPI when making this convertion.                          |\n\n## Tesseract usage\nIf you need more information on Tesseract usage, please visit [its own repository](https://github.com/charlesw/tesseract).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fomaxel%2Fpdf-ocr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fomaxel%2Fpdf-ocr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fomaxel%2Fpdf-ocr/lists"}