Close and output PDF document $pdf ->Output( 'example.pdf', 'I' ) īuilding a PDF viewer with PHP is a viable solution for those with basic PDF viewing needs. reset pointer to the last page $pdf ->lastPage() $pdf ->writeHTML( $html, true, false, true, false, '' ) $pdf->writeHTML($html, true, false, true, false, '') // add a page $pdf ->AddPage() ![]() Print text using writeHTMLCell() $pdf ->writeHTMLCell( 0, 0, '', '', $html, 0, 1, 0, true, '', true ) Please check the source code documentation for more examples of using TCPDF. set image scale factor $pdf ->setImageScale(PDF_IMAGE_SCALE_RATIO) set auto page breaks $pdf ->SetAutoPageBreak( TRUE, PDF_MARGIN_BOTTOM) $pdf ->SetFooterMargin(PDF_MARGIN_FOOTER) $pdf ->SetHeaderMargin(PDF_MARGIN_HEADER) set margins $pdf ->SetMargins( 20, 20, 20 ) set default monospaced font $pdf ->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED) ![]() $pdf ->setFooterFont( Array (PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA)) set header and footer fonts $pdf ->setHeaderFont( Array (PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN)) set default header data $pdf ->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE. $pdf ->SetTitle( 'PDF file using TCPDF' )
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |