bithost-gmbh / pdfviewhelpers

TYPO3 CMS extension that provides various Fluid ViewHelpers to generate PDF documents.
GNU General Public License v3.0
44 stars 20 forks source link

Bmp & Jpeg Image Extensions #135

Closed quak closed 4 years ago

quak commented 4 years ago

It seams that it isn't possible to use the image file extensions bmp & jpeg I added the two image extensions to allowedImageTypes - i still get a error Screenshot 2019-10-29 at 12 21 58

macjohnny commented 4 years ago

could you please give more details about your code?

maechler commented 4 years ago

@quak Using JPEG should definitely not be an issue, as you can see in our example here: https://docs.typo3.org/typo3cms/extensions/pdfviewhelpers/stable/Examples/BasicUsage/Index.html

<pdf:image src="EXT:pdfviewhelpers/Resources/Public/Examples/BasicUsage/Bithost.jpg" />

For BMP you probably would have to extend allowedImageTypes and have ImageMagick installed.

plugin.tx_pdfviewhelpers.settings.config.allowedImageTypes.image = jpg,png,gif,bmp

I suspect that you have an error in your path, could you please share your template?

mediaessenz commented 4 years ago

adding Type "jpeg"(with the e) in the default settings would be nice, btw.

maechler commented 4 years ago

@mediaessenz True, I just added it: https://github.com/bithost-gmbh/pdfviewhelpers/commit/4a709c301a45b48e4f1d61f87ad0ff477992d09c

maechler commented 4 years ago

@quak Could you solve the issue?

quak commented 4 years ago

@maechler thanks for your advice - i solved it for jpeg but not for bmp I also added the both image types in the default settings but it just wont work for bmp Guess i will just exclude bmp from the upload setting of my extension.

maechler commented 4 years ago

@quak Thanks for your reply! Under the hood pdfviewhelpers uses TCPDF, which in turn should support all image formats that are supported with GD or ImageMagick:

supports JPEG, PNG and SVG images natively, all images supported by 
GD (GD, GD2, GD2PART, GIF, JPEG, PNG, BMP, XBM, XPM) 
and all images supported via ImageMagick 
(http: www.imagemagick.org/www/formats.html)
-- https://tcpdf.org/

If bmp is not working, I guess there is a problem with your graphics library installed on the server.

If you like the extension, please consider giving it a star on GitHub =)

quak commented 4 years ago

yeah i know - if i will have some spare time i will investigate what went wrong and will post it here :)