Search code examples
pdfsvgfpdf

SVG graphic in FPDF


I need SVG data to print to an FPDF generated PDF. I'm bringing in said data from a post variable named $svg. When I try and write the variable to the page I get the entire data in text, not as an image (as expected), is there a way to get FPDF to draw the $svg on to the PDF? Below is my terrible attempt. Thanks.

    $pdf->Write( 6, $svg);

Solution

  • In PHP TCPDF supports .svg (http://www.tcpdf.org/)