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

Exception when the PDF file have HSamples dictionary definition #17

Open
BorisMorel opened this issue Mar 17, 2014 · 1 comment
Open

Comments

@BorisMorel
Copy link

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
@gitnik
Copy link

gitnik commented Oct 27, 2016

@BorisMorel Have you found a way to fix this? I am running into the same problem

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants