Renard::API::MuPDF::mutool::ObjectParser - Parser for the output of mutool show
mutool show
version 0.006
Moo::Object
A required File attribute that represents the location of the PDF file.
File
A required Str attribute that represents the raw string output from mutool show.
Str
An optional Bool attribute that tells whether the data is top-level or not. This influences the parsing by removing the header from the mutool show output.
Bool
Default: true
true
A Str containing the parsed data.
Contains the type parsed in the data attribute. See "Types" for more information.
data
classmethod unescape_ascii_string((Str) $pdf_string )
A class method that unescapes the escape sequences in a PDF string.
Returns a Str.
classmethod decode_hex_utf16be( (Str) $pdf_string )
A class method that decodes data stored in angle brackets.
Currently only implements Unicode character encoding for what is called a UTF-16BE encoded string with a leading byte order marker using ASCIIHexDecode:
first two bytes must be the Unicode byte order marker (U+FEFF),
U+FEFF
one byte per each pair of hex characters (/[0-9A-F]{2}/))
/[0-9A-F]{2}/
whitespace is ignored
See the following parts of PDF Reference 1.7:
Section 3.3.1 ASCIIHexDecode Filter (pg. 69) and
Section 3.8.1 Text String Type (pg. 158)
Initialises the object by parsing the input data.
method resolve_key( (Str) $key )
A method that follows the reference IDs contained in the data for the until a non-reference type is found.
Returns a Renard::API::MuPDF::mutool::ObjectParser instance.
Renard::API::MuPDF::mutool::ObjectParser
method new_from_reference( (InstanceOf['Renard::API::MuPDF::mutool::ObjectParser']) $ref_obj )
Returns an instance of Renard::API::MuPDF::mutool::ObjectParser that follows the reference ID contained inside $ref_obj.
$ref_obj
TypeNull TypeString TypeStringASCII TypeStringUTF16BE TypeNumber TypeBoolean TypeReference TypeDictionary TypeDate TypeArray
The listed types are an enum for the kind of datatypes stored in the type attribute.
type
Project Renard
This software is copyright (c) 2017 by Project Renard.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Renard::API::MuPDF::mutool, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Renard::API::MuPDF::mutool
CPAN shell
perl -MCPAN -e shell install Renard::API::MuPDF::mutool
For more information on module installation, please visit the detailed CPAN module installation guide.