https://github.com/heussd/pdftotext-go
Extract texts + their page numbers from PDF
https://github.com/heussd/pdftotext-go
golang pdf text-extraction
Last synced: 5 months ago
JSON representation
Extract texts + their page numbers from PDF
- Host: GitHub
- URL: https://github.com/heussd/pdftotext-go
- Owner: heussd
- License: mit
- Created: 2023-06-04T13:02:38.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-08-04T14:33:57.000Z (almost 2 years ago)
- Last Synced: 2024-08-25T12:09:12.597Z (almost 2 years ago)
- Topics: golang, pdf, text-extraction
- Language: Go
- Homepage:
- Size: 229 KB
- Stars: 8
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# pdftotext-go
[](https://securityscorecards.dev/viewer/?uri=github.com/heussd/pdftotext-go)
Extract texts with their corresponding page numbers from PDF files.
Wraps the command line tool `pdftotext` ([poppler-utils](https://poppler.freedesktop.org/)).
## Usage
1. [poppler-utils](https://poppler.freedesktop.org/) (version >=22.05.0) must be installed and available in the path.
1. `go get "github.com/heussd/pdftotext-go"`
1. See [tests for code examples](pdftotext_test.go).
## Why poppler version >=22.05.0
[Version 22.05.0 of poppler](https://poppler.freedesktop.org/releases.html) introduced a new parameter `-tsv`, which extracts PDF content with meta data as TSV. This functionality is essential for the operation of this library.
## Thanks to
- [amitaifrey](https://github.com/amitaifrey) for finding and fixing a bug