Repository: smalot/pdfparser

Issue #359: Changes are breaking something commit 1f4056d
Created: 2020-10-23T10:21:44Z
Unfortunately I can't provide sample PDF this time.
Output is correct before commit 1f4056d.
Output with latest commit / release:
Notice: Undefined offset: 67 in pdfparser\src\Smalot\PdfParser\Encoding\PostScriptGlyphs.php on line 1091
Notice: Undefined offset: 117 in pdfparser\src\Smalot\PdfParser\Encoding\PostScriptGlyphs.php on line 1091
Notice: Undefined offset: 114 in pdfparser\src\Smalot\PdfParser\Encoding\PostScriptGlyphs.php on line 1091
Notice: Undefined offset: 114 in pdfparser\src\Smalot\PdfParser\Encoding\PostScriptGlyphs.php on line 1091
Notice: Undefined offset: 105 in pdfparser\src\Smalot\PdfParser\Encoding\PostScriptGlyphs.php on line 1091
Notice: Undefined offset: 99 in pdfparser\src\Smalot\PdfParser\Encoding\PostScriptGlyphs.php on line 1091
Notice: Undefined offset: 117 in pdfparser\src\Smalot\PdfParser\Encoding\PostScriptGlyphs.php on line 1091
Notice: Undefined offset: 108 in pdfparser\src\Smalot\PdfParser\Encoding\PostScriptGlyphs.php on line 1091
Notice: Undefined offset: 117 in pdfparser\src\Smalot\PdfParser\Encoding\PostScriptGlyphs.php on line 1091
Notice: Undefined offset: 109 in pdfparser\src\Smalot\PdfParser\Encoding\PostScriptGlyphs.php on line 1091
Notice: Undefined offset: 32 in pdfparser\src\Smalot\PdfParser\Encoding\PostScriptGlyphs.php on line 1091
Notice: Undefined offset: 86 in pdfparser\src\Smalot\PdfParser\Encoding\PostScriptGlyphs.php on line 1091
Notice: Undefined offset: 105 in pdfparser\src\Smalot\PdfParser\Encoding\PostScriptGlyphs.php on line 1091
Notice: Undefined offset: 116 in pdfparser\src\Smalot\PdfParser\Encoding\PostScriptGlyphs.php on line 1091
Notice: Undefined offset: 97 in pdfparser\src\Smalot\PdfParser\Encoding\PostScriptGlyphs.php on line 1091
Notice: Undefined offset: 101 in pdfparser\src\Smalot\PdfParser\Encoding\PostScriptGlyphs.php on line 1091
Notice: Undefined offset: 32 in pdfparser\src\Smalot\PdfParser\Encoding\PostScriptGlyphs.php on line 1091
Notice: Undefined offset: 48 in pdfparser\src\Smalot\PdfParser\Encoding\PostScriptGlyphs.php on line 1091
Notice: Undefined offset: 55 in pdfparser\src\Smalot\PdfParser\Encoding\PostScriptGlyphs.php on line 1091
Notice: Undefined offset: 46 in pdfparser\src\Smalot\PdfParser\Encoding\PostScriptGlyphs.php on line 1091
Notice: Undefined offset: 48 in pdfparser\src\Smalot\PdfParser\Encoding\PostScriptGlyphs.php on line 1091
Notice: Undefined offset: 53 in pdfparser\src\Smalot\PdfParser\Encoding\PostScriptGlyphs.php on line 1091

... more than 5000 similary errors here

text:
ż ś ą ą żą ń ą ą ą ą ą ą ą ą ę ś ę ń ą ą ą ń ę ż ą ś ś ż ą ą ż ą ą ą ż ą ę ą ń ż ń ą ą ś ą ą ą ę ż ęż ń ę ę ą ą ą Ś Ś ą ę ż żą ż ż ż ą ś ąś ń ń ń ń ą ę ś ść Ś ść ść ść ść ś ść ę ść ą ść ść ść ść ę ś ż ę ą ą ą

Duplicate issue #360: Undefined offset: 97 in Smalot/PdfParser/Encoding/PostScriptGlyphs.php on line 1091
Created: 2020-10-23T23:56:08Z
code :
<?php
 
// Include Composer autoloader if not already done.
include 'vendor/autoload.php';
 
// Parse pdf file and build necessary objects.
$parser = new \Smalot\PdfParser\Parser();
$pdf    = $parser->parseFile('data.pdf');
 
// Retrieve all pages from the pdf file.
$pages  = $pdf->getPages();
 
// Loop over each page to extract text.
foreach ($pages as $page) {
    echo $page->getText();
}
i m try data.pdf, i try data in demo success
errors :
riptGlyphs.php on line 1091
PHP Notice:  Undefined offset: 53 in /project/php-pdf/vendor/smalot/pdfparser/src/Smalot/PdfParser/Encoding/PostScriptGlyphs.php on line 1091
PHP Notice:  Undefined offset: 32 in /project/php-pdf/vendor/smalot/pdfparser/src/Smalot/PdfParser/Encoding/PostScriptGlyphs.php on line 1091
PHP Notice:  Undefined offset: 32 in /project/php-pdf/vendor/smalot/pdfparser/src/Smalot/PdfParser/Encoding/PostScriptGlyphs.php on line 1091
PHP Notice:  Undefined offset: 32 in /project/php-pdf/vendor/smalot/pdfparser/src/Smalot/PdfParser/Encoding/PostScriptGlyphs.php on line 1091
PHP Notice:  Undefined offset: 32 in /project/php-pdf/vendor/smalot/pdfparser/src/Smalot/PdfParser/Encoding/PostScriptGlyphs.php on line 1091
PHP Notice:  Undefined offset: 80 in /project/php-pdf/vendor/smalot/pdfparser/src/Smalot/PdfParser/Encoding/PostScriptGlyphs.php on line 1091
PHP Notice:  Undefined offset: 97 in /project/php-pdf/vendor/smalot/pdfparser/src/Smalot/PdfParser/Encoding/PostScriptGlyphs.php on line 1091
PHP Notice:  Undefined offset: 115 in /project/php-pdf/vendor/smalot/pdfparser/src/Smalot/PdfParser/Encoding/PostScriptGlyphs.php on line 1091
PHP Notice:  Undefined offset: 105 in /project/php-pdf/vendor/smalot/pdfparser/src/Smalot/PdfParser/Encoding/PostScriptGlyphs.php on line 1091
PHP Notice:  Undefined offset: 101 in /project/php-pdf/vendor/smalot/pdfparser/src/Smalot/PdfParser/Encoding/PostScriptGlyphs.php on line 1091
PHP Notice:  Undefined offset: 32 in /project/php-pdf/vendor/smalot/pdfparser/src/Smalot/PdfParser/Encoding/PostScriptGlyphs.php on line 1091
PHP Notice:  Undefined offset: 83 in /project/php-pdf/vendor/smalot/pdfparser/src/Smalot/PdfParser/Encoding/PostScriptGlyphs.php on line 1091

Closing comment (2020-10-24T13:41:53Z): Thank you for reporting. This is a duplicate of #359, which reports the same notices.
I will close this issue in favor of #359, so we can focus our attention there.