How to put HTML data into header of tcpdf?

前端 未结 3 1231
小蘑菇
小蘑菇 2021-02-04 09:35

I\'m using the tcpdf library to generate the pdf document. I\'m using smarty template engine to hold the data. Below is the script to put in the header data:

//          


        
3条回答
  •  忘掉有多难
    2021-02-04 10:29

    I used the following method to set header

    $PDF_HEADER_LOGO = "logo.png";//any image file. check correct path.
    $PDF_HEADER_LOGO_WIDTH = "20";
    $PDF_HEADER_TITLE = "This is my Title";
    $PDF_HEADER_STRING = "Tel 1234567896 Fax 987654321\n"
    . "E abc@gmail.com\n"
    . "www.abc.com";
    $pdf->SetHeaderData($PDF_HEADER_LOGO, $PDF_HEADER_LOGO_WIDTH, $PDF_HEADER_TITLE, $PDF_HEADER_STRING);
    

    This is work for me.

提交回复
热议问题