2017 © Pedro Peláez
 

library pdfextractor

Easy way to split PDF

image

ztomesic/pdfextractor

Easy way to split PDF

  • Tuesday, March 27, 2018
  • by ZTomesic
  • Repository
  • 0 Watchers
  • 0 Stars
  • 32 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 10 Versions
  • 10 % Grown

The README.md

Build Status, (*1)

A PDF manipulator based on pdftk., (*2)

Features

PHPExtractor is a PDF manipulation tool for PHP., (*3)

  • Concatenate pages from several PDF files into a new PDF file
  • Split a PDF into multiple one page PDF files
  • Convert PDF to text
  • Search PDF
  • Rebuild PDF by keyword(s)
  • Extract PDF by keyword(s)
  • Create new directory
  • Delete all files from directory

Requirements

  • The pdftk command must be installed on your system

Installation

You should use use composer to install this library., (*4)

composer require ztomesic/pdfextractor

Examples

use ZTomesic\PDFExtractor\PDFExtractor;, (*5)

PDF File class

use ZTomesic\PDFExtractor\PDF;, (*6)

$pdf = new PDF('/file/location/file.pdf');, (*7)

Burst

Split a PDF file into one file per page., (*8)

$file = new PDF('/file/location/file.pdf');

PDFExtractor::burst($file)->save('/location/where/to/burst/');

Cat

Concatenate pages from several PDF files into a new PDF file., (*9)

PDFExtractor::cat(/location/of/pdf/files/, '*.pdf')->save('location/where/to/save/', 'name_of_new_file.pdf');

PDF To Text

Convert PDF to text., (*10)

$pdf = new PDF('/file/location/file.pdf');

PDFExtractor::PDFToText($pdf);

Search PDF

Search PDF file by keywoard(s)., (*11)

$pdf = new PDF('/file/location/file.pdf');

PDFExtractor::searchPDF($pdf, 'wordToSearchBy');

Rebuild PDF By Keyword

Rebuild PDF(s) by keyword(s), (*12)

$pdf = new PDF('/file/location/file.pdf');

PDFExtractor::rebuildPDFByKeyword($pdf, '/location/where/to/burst/', '/location/where/to/rebuild/', 'keyword_to_rebuild_by');

Relocate File

Change location of specific file, (*13)

$pdf = new PDF('/file/location/file.pdf');

PDFExtractor::relocateFile($pdf, '/new/file/path/');

Clear Folder

Delete all content from folder., (*14)

$excludedFiles = ['excluded_file.pdf'];

PDFExtractor::clearFolder('/path/to/directory/', $excludedFiles);

Remove Directory

Delete directory and content., (*15)

PDFExtractor::removeDirectory('/path/to/directory/');

Create Directory

Create new directory., (*16)

PDFExtractor::createDirectory('/path/to/directory/name/');

Search and rebuild

Search PDF(s) and rebuild by keyword., (*17)

$pdf = new PDF('/file/location/file.pdf');
$PDFExtractor = PDFExtractor::burst($file)->save('/location/where/to/burst/');

$PDFExtractor->searchMultiplePDFByKeywords('/location/where/to/burst/', 'wordToSearchBy')
             ->changeFileLocation('/location/where/to/rebuild/')
             ->mergePDFByKeywords();

Extract Metadata To Array

Extract metadata to array., (*18)

PDFExtractor::extractMetadata('/path/to/directory/name/')
    ->save('/location/where/to/save/', 'name_of_file.txt')
    ->toArray();

Extract Metadata To String

Extract metadata to string., (*19)

PDFExtractor::extractMetadata('/path/to/directory/name/')
    ->save('/location/where/to/save/', 'name_of_file.txt')
    ->toString();

The Versions

27/03 2018

dev-master

9999999-dev

Easy way to split PDF

  Sources   Download

MIT

by Zvonimir Tomesic

search pdf pdftk

27/03 2018

v1.7.1

1.7.1.0

Easy way to split PDF

  Sources   Download

MIT

by Zvonimir Tomesic

search pdf pdftk

21/03 2018

v1.7

1.7.0.0

Easy way to split PDF

  Sources   Download

MIT

by Zvonimir Tomesic

search pdf pdftk

25/02 2018

v1.5

1.5.0.0

Easy way to split PDF

  Sources   Download

MIT

by Zvonimir Tomesic

search pdf pdftk

25/02 2018

v1.6

1.6.0.0

Easy way to split PDF

  Sources   Download

MIT

by Zvonimir Tomesic

search pdf pdftk

25/02 2018

v1.4

1.4.0.0

Easy way to split PDF

  Sources   Download

MIT

by Zvonimir Tomesic

search pdf pdftk

24/02 2018

v1.3

1.3.0.0

Easy way to split PDF

  Sources   Download

MIT

by Zvonimir Tomesic

search pdf pdftk

24/02 2018

v1.2

1.2.0.0

Easy way to split PDF

  Sources   Download

MIT

by Zvonimir Tomesic

search pdf pdftk

19/02 2018

v1.1

1.1.0.0

Easy way to split PDF

  Sources   Download

MIT

by Zvonimir Tomesic

search pdf pdftk

17/02 2018

v1.0

1.0.0.0

Easy way to split PDF

  Sources   Download

MIT

by Zvonimir Tomesic

search pdf pdftk