https://github.com/msp95/pdftotext
A simple Elixir package to convert .pdf file to .txt using OCR API
https://github.com/msp95/pdftotext
elixir hex
Last synced: 7 days ago
JSON representation
A simple Elixir package to convert .pdf file to .txt using OCR API
- Host: GitHub
- URL: https://github.com/msp95/pdftotext
- Owner: MSP95
- License: mit
- Created: 2018-05-06T21:09:08.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-05-08T22:48:08.000Z (about 7 years ago)
- Last Synced: 2025-06-04T02:21:43.767Z (about 1 month ago)
- Topics: elixir, hex
- Language: Elixir
- Size: 175 KB
- Stars: 9
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Pdftotext
A simple Elixir package to convert .pdf file to .txt using OCR API**Module Page:** [hex.pm/packages/pdftotext](https://hex.pm/packages/pdftotext)
> convert(file, key)
This is the main PDF to Text Module.
Converts the given pdf file into text.
**Parameters:**
1. File -> Accepts a Plug.Upload{} struct or a binary of the file.
2. Key -> Accepts a key for the OCR API. Get your key here: [OCR API KEY](https://ocr.space/ocrapi)**Returns:**
> {:ok, result} -> On a successful parse returns this where 'result' is a string containing the contents of the passed file.> {:error, error_message, result} -> returns a :error struct with the error_message and the partial result if any.