NAME

Renard::Incunabula::MuPDF::mutool::ObjectParser - Parser for the output of mutool show

VERSION

version 0.004

EXTENDS

ATTRIBUTES

filename

A required File attribute that represents the location of the PDF file.

string

A required Str attribute that represents the raw string output from mutool show.

is_toplevel

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.

Default: true

data

A Str containing the parsed data.

type

Contains the type parsed in the data attribute. See "Types" for more information.

CLASS METHODS

unescape

  classmethod unescape((Str) $pdf_string )

A class method that unescapes the escape sequences in a PDF string.

Returns a Str.

METHODS

BUILD

Initialises the object by parsing the input data.

resolve_key

  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::Incunabula::MuPDF::mutool::ObjectParser instance.

new_from_reference

  method new_from_reference( (InstanceOf['Renard::Incunabula::MuPDF::mutool::ObjectParser']) $ref_obj )

Returns an instance of Renard::Incunabula::MuPDF::mutool::ObjectParser that follows the reference ID contained inside $ref_obj.

Types

  TypeString
  TypeNumber
  TypeBoolean
  TypeReference
  TypeDictionary
  TypeDate
  TypeArray

The listed types are an enum for the kind of datatypes stored in the type attribute.

AUTHOR

Project Renard

COPYRIGHT AND LICENSE

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.