Hello all. I just started using mPDF and it's fantastic. It is able to do everything I need it to and then some. However, is there, or will there be, support to render an SVG file in a PDF? I've tried the syntax from http://www.w3schools.com/svg/svg_inhtml.asp on putting in the $html variable before doing the $mPDF->WriteHtml($html); function. None of the methods work and the SVG file does not show in the PDF.
The purpose of this is that I am making a certificate and receipt template for my company website and I wanted to use a vector style logo instead of a raster image. I have the logo in EPS and SVG formats but EPS will not render on browsers, but SVG will on most of them if placed in object, embed, or iframe tags. I tried converting to WMF which does work as per Example 04, but the logo is rendered inverted, truncated, and upside down on the PDF.
So, is there a way to put an SVG or EPS file on the PDF then output it?
There is this capability in TCPDF. Can any of that be ported? Being as PDFs are usually printed having a logo in some vector based format would really help.
TCPDF uses ImageMagick - which I suspect is not commonly installed. But see mPDF v4.5 - it will do quite a lot of SVG files now, although it does not support all features.
It seems I ran into one of the unsupported issues with SVG, the gradient coloring is off in the middle of the logo when rendered in the pdf. Is there any possibility that when mPDF 4.7 comes out, the support for SVG will increase?
To be honest, I don't see this increasing in the near future. SVG allows for very complex cross referencing of objects which makes it difficult to support it.