SVG to PDF on a shared linux server

前端 未结 5 1593
庸人自扰
庸人自扰 2020-12-28 09:10

I have a website which uses SVG for an interactive client side thingamabob. I would like to provide the option to download a PDF of the finished output. I can pass the final

5条回答
  •  半阙折子戏
    2020-12-28 09:42

    i have used TCPDF (http://www.tcpdf.org/) in many projects and it work in almost every use case.

    Here is the example of SVG: https://tcpdf.org/examples/example_058/

    and following is the code which can help you:

    $pdf->ImageSVG($file='images/testsvg.svg', $x=15, $y=30, $w='', $h='', $link='http://www.tcpdf.org', $align='', $palign='', $border=1, $fitonpage=false);
    
    $pdf->ImageSVG($file='images/tux.svg', $x=30, $y=100, $w='', $h=100, $link='', $align='', $palign='', $border=0, $fitonpage=false);
    

提交回复
热议问题