pdfparser icon indicating copy to clipboard operation
pdfparser copied to clipboard

Input not checked enough PdfParser/Font.php L253

Open kaystrobach opened this issue 12 years ago • 15 comments

PHP Warning:  pack(): Type H: illegal hex digit y in smalot/pdfparser/src/Smalot/PdfParser/Font.php on line 253

With some documents i get tons of this warnings, with others none ...

kaystrobach avatar Feb 15 '14 12:02 kaystrobach

Can you provide me a pdf file to reproduce the issue ? [email protected] Which version of PHP do you use ?

smalot avatar Feb 15 '14 17:02 smalot

I use

PHP 5.4.17 (cli) (built: Aug 25 2013 02:03:38) 
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies

Mail sent with attachment

kaystrobach avatar Feb 16 '14 09:02 kaystrobach

should be fixed too : 0.9.20 can you check it ?

smalot avatar Feb 17 '14 09:02 smalot

Sadly i have a broken internet connection, i'm currently checkin out all the changes, git pull is running since 0916 (Europe/Berlin), with 1KiB/s now ...

Thank you

kaystrobach avatar Feb 17 '14 09:02 kaystrobach

most of the warnings are solved, some are not:

PHP Warning:  pack(): Type H: illegal hex digit p in .../Packages/Libraries/smalot/pdfparser/src/Smalot/PdfParser/Font.php on line 253

Perhaps a whitelist is the best solution? I send you an example pdf :smile:

kaystrobach avatar Feb 17 '14 12:02 kaystrobach

mail sent

kaystrobach avatar Feb 17 '14 12:02 kaystrobach

Can you give me the filename concerned ?

Sébastien MALOT

Please consider the environment before printing this email.

2014-02-17 13:57 GMT+01:00 Kay Strobach [email protected]:

mail sent

— Reply to this email directly or view it on GitHubhttps://github.com/smalot/pdfparser/issues/18#issuecomment-35254434 .

smalot avatar Feb 17 '14 13:02 smalot

Please refer to Mail with the following subject:

Input not checked enough PdfParser/Font.php L253 #18

This mail contained 3 files (parts replaced with dotes

  • 38_..._alko.pdf
  • 38_...1_alko.pdf
  • hbse...co.pd

kaystrobach avatar Feb 20 '14 14:02 kaystrobach

I'm getting this warning as well: Type H: illegal hex digit p in .../smalot/pdfparser/src/Smalot/PdfParser/Font.php line 253

PHP v 5.4.24 PdfParser master branch

dsands avatar Aug 30 '14 13:08 dsands

Yup, getting this warning a lot

scaleupcto avatar May 29 '15 09:05 scaleupcto

can confirm this warnings..

wackerm avatar May 29 '15 16:05 wackerm

Still issue exists. pack(): Type H: illegal hex digit v PHP Version: 7.0

arunkumars3483 avatar Jul 03 '18 05:07 arunkumars3483

screen shot 2018-07-03 at 10 56 04 am

The above fix for pack() arguments solves the issue. Please update

arunkumars3483 avatar Jul 03 '18 05:07 arunkumars3483

I get the same problem

The arunkumars3483 solution solve the problem for me too, thanks you @arunkumars3483

Please update :+1:

lucas-gp avatar Jul 26 '18 16:07 lucas-gp

Had the same issue. No idea what the code of arunkumars3483 does - but it fixes the issue for me.

Pesche007 avatar Nov 23 '18 08:11 Pesche007