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

The parameter pValue can't have the value "020B0604030504040204" (Validation: The length is not equals to 10) #798

Open
kolaente opened this issue Mar 28, 2024 · 6 comments · Fixed by gazzoy/phppresentation#1

Comments

@kolaente
Copy link

When trying to read a pptx file using the latest version from the develop branch, reading fails with the error message:

The parameter pValue can't have the value "020B0604030504040204" (Validation: The length is not equals to 10)

Why does that happen? What can I do to prevent it? Why is there a limit of 10 characters?

It looks like the limit was added in ec4700e#diff-3412465bd7f45b4c39d517277b37db019c65ab68d5f03d5557fd4463caad5a46

pinging @Progi1984 as you introduced the change. Any idea what could cause this?

@kolaente
Copy link
Author

If I change this line to $pValue = '';, it seems to work.

@kolaente kolaente reopened this Mar 28, 2024
@Progi1984
Copy link
Member

@kolaente Could you send me a sample file, please, for fixing the bug ?

@kolaente
Copy link
Author

Unfortunately, I can't send you the file, since it was provided to me under NDA. Do you have any tips on how to debug this?

@Progi1984
Copy link
Member

@kolaente Can't you clean the file and check with a basic file ?

@kolaente
Copy link
Author

I'll investigate.

@welja
Copy link

welja commented Sep 9, 2024

@Progi1984 I have the same problem and i have created a sample file triggering the error for you.

My code:

try {
	$dir_path = MVC_UPLOADS_PRIVATE;
	$file = 'blanco3'.'.pptx';
	$presentation = IOFactory::load($dir_path.$file);
}
catch( Exception $e ) {
	echo $e->getMessage();
	echo $e->getTraceAsString();
}
exit;

Here is the file:
blanco3.pptx

And this is the exception trace:

The parameter pValue can't have the value "020F0502020204030204" (Validation: The length is not equals to 10)

#0 /var/www/vendor/phpoffice/phppresentation/src/PhpPresentation/Reader/PowerPoint2007.php(1342): PhpOffice\PhpPresentation\Style\Font->setPanose('020F05020202040...')
#1 /var/www/vendor/phpoffice/phppresentation/src/PhpPresentation/Reader/PowerPoint2007.php(1018): PhpOffice\PhpPresentation\Reader\PowerPoint2007->loadParagraph(Object(PhpOffice\Common\XMLReader), Object(DOMElement), Object(PhpOffice\PhpPresentation\Shape\RichText))
#2 /var/www/vendor/phpoffice/phppresentation/src/PhpPresentation/Reader/PowerPoint2007.php(1503): PhpOffice\PhpPresentation\Reader\PowerPoint2007->loadShapeRichText(Object(PhpOffice\Common\XMLReader), Object(DOMElement), Object(PhpOffice\PhpPresentation\Slide))
#3 /var/www/vendor/phpoffice/phppresentation/src/PhpPresentation/Reader/PowerPoint2007.php(497): PhpOffice\PhpPresentation\Reader\PowerPoint2007->loadSlideShapes(Object(PhpOffice\PhpPresentation\Slide), Object(DOMNodeList), Object(PhpOffice\Common\XMLReader))
#4 /var/www/vendor/phpoffice/phppresentation/src/PhpPresentation/Reader/PowerPoint2007.php(392): PhpOffice\PhpPresentation\Reader\PowerPoint2007->loadSlide('loadSlides('loadFile('/var/www/privat...')
#7 /var/www/vendor/phpoffice/phppresentation/src/PhpPresentation/IOFactory.php(65): PhpOffice\PhpPresentation\Reader\PowerPoint2007->load('/var/www/privat...')

Good luck!

@Progi1984 Progi1984 added this to the 1.2.0 milestone Sep 9, 2024
@Progi1984 Progi1984 self-assigned this Sep 9, 2024
gazzoy added a commit to gazzoy/phppresentation that referenced this issue Oct 16, 2024
This was referenced Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

3 participants