class PdfToText
The PdfToText object.
This binary adapter is used to extract text from PDF with the PdfToText
binary provided by XPDF.
Methods
|
__construct(string $binary, Logger $logger)
Constructor |
||
|
__destruct()
Destructor |
||
| PdfToText |
open(string $pathfile)
Opens a PDF file in order to extract text |
|
| PdfToText |
close()
Close the current open file |
|
| PdfToText |
setOuputEncoding(string $charset)
Set the output encoding. |
|
| string |
getOuputEncoding()
Get the ouput encoding, default is UTF-8 |
|
| string |
getText(integer $page_start = null, integer $page_end = null)
Extract the text of the current open PDF file, if not page start/end provided, etxract all pages |
|
| static PdfToText |
load(Logger $logger)
Look for pdftotext binary and return a new XPDF object |
Details
at line 41
public
__construct(string $binary, Logger $logger)
Constructor
at line 50
public
__destruct()
Destructor
at line 65
public PdfToText
open(string $pathfile)
Opens a PDF file in order to extract text
at line 84
public PdfToText
close()
Close the current open file
at line 99
public PdfToText
setOuputEncoding(string $charset)
Set the output encoding.
If the charset is invalid, the getText method
will fail.
at line 111
public string
getOuputEncoding()
Get the ouput encoding, default is UTF-8
at line 127
public string
getText(integer $page_start = null, integer $page_end = null)
Extract the text of the current open PDF file, if not page start/end provided, etxract all pages
at line 190
static public PdfToText
load(Logger $logger)
Look for pdftotext binary and return a new XPDF object