Class MLA (Media Library Assistant) PDF extracts legacy and XMP meta data from PDF files
| package |
Media Library Assistant |
|---|---|
| since | 2.10 |
_build_pdf_indirect_objects( &$string) : void
Creates the array of indirect object offsets and lengths
| since | 2.10 |
|---|
_extract_pdf_trailer( $file_name, $file_offset) : mixed
| since | 2.10 |
|---|
mixedarray of "PDF dictionary arrays", newest first, or NULL on failure
_find_pdf_indirect_dictionary( $file_name, $object, $generation, $instance = NULL) : mixed
The function searches the entire file, if necessary, to find the last/most recent copy of the object. This is required because Adobe Acrobat does NOT increment the generation number when it reuses an object.
| since | 2.10 |
|---|
mixedNULL on failure else array( 'start' => offset in the file, 'length' => object length, 'content' => dictionary contents )
_parse_pdf_dictionary( &$source_string, $offset) : array
Returns an array of dictionary contents, classified by object type: boolean, numeric, string, hex (string), indirect (object), name, array, dictionary, stream, and null. The array also has a '/length' element containing the number of bytes occupied by the dictionary in the source string, excluding the enclosing delimiters.
| since | 2.10 |
|---|
array( '/length' => length, key => array( 'type' => type, 'value' => value ) ) for each dictionary field
_parse_pdf_LPD_dictionary( &$source_string, $filesize) : mixed
Returns an array of dictionary contents, classified by object type: boolean, numeric, string, hex (string), indirect (object), name, array, dictionary, stream, and null. The array also has a '/length' element containing the number of bytes occupied by the dictionary in the source string, excluding the enclosing delimiters, if passed in.
| since | 2.10 |
|---|
mixedarray of dictionary objects on success, false on failure
_parse_pdf_string( &$source_string, $offset) : array
Returns an array with one dictionary entry. The array also has a '/length' element containing the number of bytes occupied by the string in the source string, including the enclosing parentheses.
| since | 2.10 |
|---|
array( key => array( 'type' => type, 'value' => value, '/length' => length ) ) for the string
_parse_pdf_UTF16BE( &$source_string) : string
| since | 2.10 |
|---|
stringUTF-8 encoded string
_parse_pdf_xref_section( $file_name, $file_offset) : integer
Creates the array of indirect object offsets and lengths
| since | 2.10 |
|---|
integerlength of the section
_parse_pdf_xref_stream( $file_name, $file_offset, $entry_parms_string) : integer
Creates the array of indirect object offsets and lengths
| since | 2.10 |
|---|
integerlength of the stream
_parse_pdf_xref_subsection( &$xref_section, $offset, $object_id, $count) : void
A cross-reference subsection is a sequence of 20-byte entries, each with offset and generation values.
| since | 2.10 |
|---|
pdf_indirect_objects : array
This array contains all of the indirect object offsets and lengths. The array key is ( object ID * 1000 ) + object generation. The array value is array( number, generation, start, optional /length )
| since | |
|---|---|
| var |
array