Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fatal error: Uncaught exception 'Exception' with message 'Object list not found. Possible secured file.' #397

Closed
sergey833 opened this issue Feb 26, 2021 · 6 comments · Fixed by #400
Labels
help wanted parsing fail When (almost) nothing can be extracted from a given PDF

Comments

@sergey833
Copy link

sergey833 commented Feb 26, 2021

Fatal error: Uncaught exception 'Exception' with message 'Object list not found. Possible secured file.' in ...\src\Smalot\PdfParser\Parser.php:118 Stack trace: 
#0 ...\src\Smalot\PdfParser\Parser.php(97): Smalot\PdfParser\Parser->parseContent('%PDF-1.5\n%\xE2\xE3\xCF\xD3\n...') 
#1 ...\index.php(770): Smalot\PdfParser\Parser->parseFile('......') 
#2 {main} thrown in ...\src\Smalot\PdfParser\Parser.php on line 118

PDF loaded from https://elib.vsmu.by/bitstream/123/2275/1/Kabanova-SA_Osnovy%20cheliustno-litsevoj%20khirurgii_T-1_2011.pdf

@k00ni k00ni changed the title Fatal error: Uncaught exception 'Exception' with message 'Object list not found. Possible secured file.' in C:\vip-site\www\google\src\Smalot\PdfParser\Parser.php:118 Stack trace: #0 C:\vip-site\www\google\src\Smalot\PdfParser\Parser.php(97): Smalot\PdfParser\Parser->parseContent('%PDF-1.5\n%\xE2\xE3\xCF\xD3\n...') #1 C:\vip-site\www\google\index.php(770): Smalot\PdfParser\Parser->parseFile('c:/vip-site/www...') #2 {main} thrown in C:\vip-site\www\google\src\Smalot\PdfParser\Parser.php on line 118 Fatal error: Uncaught exception 'Exception' with message 'Object list not found. Possible secured file.' Feb 26, 2021
@k00ni k00ni added the bug label Feb 26, 2021
@ppritcha
Copy link

ppritcha commented Mar 6, 2021

We are experiencing this problem also. It appears to be the same as #392, #373, #356, and #330. #330 was reported on August 30 of last year.

@k00ni, Is there anything we can do to help get this resolved?

@k00ni
Copy link
Collaborator

k00ni commented Mar 8, 2021

Unfortunately I don't have the time to dive into that, but I will assist any pull request which aims to solve this issue. For what I saw until now, I assume that this library is not be able to parse this kind of files (yet). This functionality must be written first.

public function parseContent($content)
{
// Create structure from raw data.
list($xref, $data) = $this->rawDataParser->parseData($content);
if (isset($xref['trailer']['encrypt'])) {
throw new \Exception('Secured pdf file are currently not supported.');
}
if (empty($data)) {
throw new \Exception('Object list not found. Possible secured file.');
}

@k00ni k00ni added help wanted parsing fail When (almost) nothing can be extracted from a given PDF and removed bug labels Mar 8, 2021
@ppritcha
Copy link

ppritcha commented Mar 8, 2021

I see now that this issue was first reported in 2014, in the earliest issue that is still open: #30 Also, #209, #192, #185 . It's been reported about 9 times over the course of 7 years. It appears to be a problem with the library not handling PDFs that are have a version > 1.4.

@k00ni k00ni linked a pull request Mar 9, 2021 that will close this issue
@k00ni
Copy link
Collaborator

k00ni commented Mar 9, 2021

Could you please give us feedback if #400 solves this problem?

@ppritcha
Copy link

ppritcha commented Mar 9, 2021

That solves the problem for us.

@k00ni
Copy link
Collaborator

k00ni commented Mar 10, 2021

Thank you for your quick response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted parsing fail When (almost) nothing can be extracted from a given PDF
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants