Skip to content
This repository was archived by the owner on Mar 22, 2019. It is now read-only.
This repository was archived by the owner on Mar 22, 2019. It is now read-only.

Exception when the PDF file have HSamples dictionary definition #17

@BorisMorel

Description

@BorisMorel

Hi,

When the function StreamObject::_extractDictionaryData is called an excpetion is handle Undefined property: \ZendPdf\InternalType\ArrayObject::$value
This bug comes to try get a value on an array ( line 114 ).

$paramKey = HSample;
$this->_dictionary->DecodeParms->$paramKey->value

So here the code is wrong because it trying to get ->value property on an array.

Regards,
Boris.

Dump of the real pdf structure

$this(ZendPdf\InternalType\StreamObject)
    |-[-] _dictionary(ZendPdf\InternalType\DictionaryObject)
    |  |-[-] _items[12]                       
    |  |  |-[+] BitsPerComponent(ZendPdf\InternalType\NumericObject)
    |  |  |-[+] ColorSpace(ZendPdf\InternalType\NameObject)
    |  |  |-[-] DecodeParms(ZendPdf\InternalType\DictionaryObject)
    |  |  |  |-[-] _items[8]                        
    |  |  |  |  |-[+] Blend(ZendPdf\InternalType\NumericObject)
    |  |  |  |  |-[+] ColorTransform(ZendPdf\InternalType\NumericObject)
    |  |  |  |  |-[+] Colors(ZendPdf\InternalType\NumericObject)
    |  |  |  |  |-[+] Columns(ZendPdf\InternalType\NumericObject)
    |  |  |  |  |-[-] HSamples(ZendPdf\InternalType\ArrayObject)
    |  |  |  |  |  |-[+] items(ArrayObject)
    |  |  |  |  |  `-     *ZendPdf\InternalType\AbstractTypeObject*_parentObject null

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions