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
ImageMagick: Receiving invalid filename error when converting first page of pdf to jpg #4771
Comments
Looks like we don't properly parse the path because we're lacking GetPathComponent. hhvm/hphp/runtime/ext/imagick/ext_imagick.cpp Lines 98 to 113 in df46f65
|
Would like to know if there's any progress on this issue. WordPress 4.7 introduced enhanced PDF support by automatically trying to generate a thumbnail of the first page of a PDF file. This fails on HHVM because of this issue. |
Just ran into this issue from one of my users as well. (HHVM 3.30.0). Referencing the workaround here: https://stackoverflow.com/questions/28286358/receiving-invalid-filename-error-when-converting-first-page-of-pdf-to-jpg |
Actually, the workaround doesn't work for me either. Only happens with PDFs. |
Environment: Ubuntu 14.04, HHVM 3.5
I'm using ImageMagick to convert a pdf to a jpg in a script I have...it works fine if I give the full server path to the uploaded pdf without the page specifier, but when I add the
[0]
onto the end of the file path to specify that I only want to read the first page, it bombs out with the following error:I've also tried using
'/path/to/file.pdf[0]'
directly in the constructor with no luck, but without the page specifier, that also works fine.According to what I've read in the PHP docs and tested, this code should work, but gives the error seen above when using the page specifier.
The text was updated successfully, but these errors were encountered: