You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 22, 2019. It is now read-only.
When we try loading pdf file size more than 5 MB there is problem.
PdfDocument runs _loadOutlines with PDF trailer root.
Then in the _loadOutlines function it trys to getType from OutLines - $root->Outlines->getType()
Then there is $this->_ref which is null and it runs $this->_dereference();
Problem in this method _dereference()
There are 3 conditions in this method:
It checks fetchObject is null and if it is null it gets object from context's parser.
it checks obj is null and if it is null it set $this->_ref = new NullObject();
it check like this : if ($obj->toString() != $this->_objNum . ' ' . $this->_genNum . ' R') {
The problem that in my case when file size more than 5 MB.
After first condition obj is set new InternalType\NullObject();
Second condition is skipped because obj is not null
In the third condition it uses method toString() and it returns null and this condition returns exception "Incorrect reference to the object" .
In my opinion it returns this exception because PdfParser\StructureParser sets wrong context. It doesn't set RefTable to the context and then $offset is null inside getObject and it returns NullObject.
Please check loading pdf file with size more than 5 MB.