Closed int-sst closed 3 years ago
Hi Saša,
Thanks for this will written issue. I would however argue that fileadmin/user_upload/_b2b/products/11009379_tv%20MOLISE AH_BBS.jpg
is a path and as such %20
should be interpreted as %20
literally instead of like a space.
It would probably be different if it was a file URI, such as: file:///some/absolute/path/to/fileadmin/user_upload/_b2b/products/11009379_tv%20MOLISE AH_BBS.jpg
But even with file URIs the PHP functions do not seem to decode %20
to a space.
I would recommend you to use an URL decode ViewHelper in front of the path:
<pdf:image src="{filePath -> v:format.url.decode()}"></pdf:image>
Or even better find out where this %20
comes from and avoid it.
@macjohnny What do you think?
Hi, the encoded filename comes from
<pdf:image src="{f:uri.image(image:'{someImageObj}')}" />
It has been uploaded via Filelist.
If you already have an image object, you can just pass it as the source:
<pdf:image src="{someImageObj}" />
Does that work for you?
The same error occurs when using <pdf:image src="{someImageObj}" />
Invalid file src provided, must be either a uid, combined identifier, path/filename or implement FileInterface. ERROR: 1536560752
Then {someImageObj}
is probably not an image object implementing FileInterface
. Could you please show us the output of <f:debug>{someImageObj}</f:debug>
?
Closing because of no response within 3 weeks. If you would like to continue the discussion, please feel free to comment.
Hi,
when calling the
<pdf:image>
ViewHelper with an image containing urlencoded spaces, e.g.we are receiving an error message
TYPO3 version(s): 10.4.12 pdfviewhelpers version: 2.3.4
A solution is to urldecode the src in EXT:pdfviewhelpers/Classes/ViewHelpers/ImageViewHelper.php
Regards, Saša