2017 © Pedro Peláez
 

library pdf-to-text

Extract text from a pdf

image

forest/pdf-to-text

Extract text from a pdf

  • Tuesday, October 24, 2017
  • by forest2087
  • Repository
  • 1 Watchers
  • 0 Stars
  • 9 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 38 Forks
  • 0 Open issues
  • 10 Versions
  • 0 % Grown

The README.md

Extract text from a pdf

This package provides a class to extract text from a pdf., (*1)

 \forest\PdfToText\Pdf::getText('book.pdf'); //returns the text from the pdf

Requirements

Behind the scenes this package leverages pdftotext. You can verify if the binary installed on your system by issueing this command:, (*2)

which pdftotext

If it is installed it will return the path to the binary., (*3)

To install the binary you can use this command on Ubuntu or Debian:, (*4)

apt-get install poppler-utils

If you're on RedHat or CentOS use this:, (*5)

yum install poppler-utils

Installation

You can install the package via composer:, (*6)

$ composer require forest/pdf-to-text

Usage

Extracting text from a pdf is easy., (*7)

$text = (new Pdf())
    ->setPdf('book.pdf')
    ->text();

Or easier:, (*8)

 \forest\PdfToText\Pdf::getText('book.pdf')

By default the package will assume that the pdftotext is located at /usr/bin/pdftotext. If you're using the a different location pass the path to the binary in constructor, (*9)

$text = (new Pdf('/custom/path/to/pdftotext'))
    ->setPdf('book.pdf')
    ->text();

or as the second parameter to the getText-function:, (*10)

 \forest\PdfToText\Pdf::getText('book.pdf', '/custom/path/to/pdftotext')

Change log

Please see CHANGELOG for more information what has changed recently., (*11)

Testing

bash $ composer test, (*12)

Contributing

Please see CONTRIBUTING for details., (*13)

License

The MIT License (MIT). Please see License File for more information., (*14)

The Versions

24/10 2017

dev-master

9999999-dev https://github.com/forest2087/pdf-to-text

Extract text from a pdf

  Sources   Download

MIT

The Requires

 

The Development Requires

forest pdf-to-text

24/10 2017

2.0.2

2.0.2.0 https://github.com/forest2087/pdf-to-text

Extract text from a pdf

  Sources   Download

MIT

The Requires

 

The Development Requires

forest pdf-to-text

24/10 2017

2.0.1

2.0.1.0 https://github.com/forest2087/pdf-to-text

Extract text from a pdf

  Sources   Download

MIT

The Requires

 

The Development Requires

pdf-to-text 4st

24/10 2017

2.0.0

2.0.0.0 https://github.com/forest2087/pdf-to-text

Extract text from a pdf

  Sources   Download

MIT

The Requires

 

The Development Requires

pdf-to-text 4st

31/01 2017

dev-dev-master

dev-dev-master https://github.com/julusian/pdf-to-text

Extract text from a pdf

  Sources   Download

MIT

The Requires

 

The Development Requires

spatie pdf-to-text

31/01 2017

1.0.3

1.0.3.0 https://github.com/julusian/pdf-to-text

Extract text from a pdf

  Sources   Download

MIT

The Requires

 

The Development Requires

spatie pdf-to-text

31/01 2017

1.0.2

1.0.2.0 https://github.com/spatie/pdf-to-text

Extract text from a pdf

  Sources   Download

MIT

The Requires

 

The Development Requires

spatie pdf-to-text

16/03 2016

1.0.1

1.0.1.0 https://github.com/spatie/pdf-to-text

Extract text from a pdf

  Sources   Download

MIT

The Requires

 

The Development Requires

spatie pdf-to-text

31/12 2015

1.0.0

1.0.0.0 https://github.com/spatie/pdf-to-text

Extract text from a pdf

  Sources   Download

MIT

The Requires

 

The Development Requires

spatie pdf-to-text

31/12 2015

0.0.1

0.0.1.0 https://github.com/spatie/pdf-to-text

Extract text from a pdf

  Sources   Download

MIT

The Requires

 

The Development Requires

spatie pdf-to-text