module HexaPDF::DictionaryFields::DictionaryConverter

Converter module for fields of type Dictionary and its subclasses.

The first class in the type array of the field is used for the conversion. Symbol names for classes may also be used since they are automatically resolved.

Public Class Methods


Dictionary fields can also contain simple hashes.

convert(data, type, document)

Wraps the given data value in the PDF specific type class if it can be converted. Otherwise returns nil.


This converter is used when either a Symbol is provided as type (for lazy loading) or when the type is a class derived from the Dictionary class.