News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Using svg as payment or shipment icons breaks tcpdf generation

Started by Kuubs, September 23, 2023, 11:58:47 AM

Previous topic - Next topic

Kuubs

Hello,

On Virtuemart 4.2.2 10908 and Joomla 3.10.13

When you use SVG icons for payment or shipment icons it will break the TCPDF generation, and will also not send confirmation emails (because of an error in the PDF generation). If you remove the SVG icons from the payment icons the generation works again.

I have some info, but I don't know if it's sufficient to fix this. It worked definitely in the past because this new update gave me this issue, I haven't got this issue on earlier versions:

Error message data:
E_ERROR:1 0: Division by zero in file: **REDACTEDFORPRIVACY**/public_html/libraries/vendor/tecnickcom/tcpdf/tcpdf.php line: 23636

If i check the file it is indeed a function regarding SVG:

protected function SVGPath($d, $style='') {






hazael

SVG vector drawings, WEBP and some transparent PNG files may not be fully supported.

An SVG drawing can be saved in several ways. Text is or is not converted to curves, layer styles in the SVG file can be saved directly or separately. Some SVG files may have nested raster images.

Kuubs

Quote from: hazael on September 23, 2023, 12:04:00 PM
SVG vector drawings, WEBP and some transparent PNG files may not be fully supported.

An SVG drawing can be saved in several ways. Text is or is not converted to curves, layer styles in the SVG file can be saved directly or separately. Some SVG files may have nested raster images.

My SVG's are converted into shapes and paths and have 0 dependencies. For some reason it worked in earlier versions but now it suddenly breaked. I have switched to PNG files and now it's working again.