ERushforth
ERushforth

Reputation: 186

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);

Upvotes: 2

Views: 16075

Answers (2)

tim
tim

Reputation: 2724

FPDF does not support SVG as far as I know. But if you can convert your SVG vectors to EPS you can use ImageEps().

http://www.fpdf.org/en/script/script84.php

Upvotes: 1

ralf htp
ralf htp

Reputation: 9422

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

Upvotes: 2

Related Questions