查看文件: example_038.php
大小: 3.24 KB
类型: application/octet-stream
<?php require_once('tcpdf_include.php'); $pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false); $pdf->SetCreator(PDF_CREATOR); $pdf->SetAuthor('Us House'); $pdf->SetTitle('不動產說明書'); $pdf->SetSubject('PDF 不動產說明書'); $pdf->SetKeywords('不動產說明書, PDF'); // set default header data // pass1 $pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 038', PDF_HEADER_STRING); $pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, '優勢房產', '不動產說明書'); // set header and footer fonts //$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN)); //$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA)); $pdf->setHeaderFont(Array('msungstdlight', '', PDF_FONT_SIZE_MAIN)); $pdf->setFooterFont(Array('msungstdlight', '', PDF_FONT_SIZE_DATA)); // set default monospaced font $pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED); // set margins $pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT); $pdf->SetHeaderMargin(PDF_MARGIN_HEADER); $pdf->SetFooterMargin(PDF_MARGIN_FOOTER); // set auto page breaks $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM); // set image scale factor $pdf->setImageScale(PDF_IMAGE_SCALE_RATIO); // set some language-dependent strings (optional) if (@file_exists(dirname(__FILE__).'/lang/zho.php')) { require_once(dirname(__FILE__).'/lang/zho.php'); $pdf->setLanguageArray($l); } // --------------------------------------------------------- // set font //$pdf->SetFont('helvetica', '', 20); $pdf->SetFont('msungstdlight','',14); // add a page $pdf->AddPage(); $txt = '林書豪再現「林來瘋」身手!'; $txt = $txt . '昨拿廿分、十三助攻與四抄截,'; $txt = $txt . '本季第六次獻出兩個「雙位數」成績單;'; $txt = $txt . '可惜紐約尼克隊防守再出紕漏,'; $txt = $txt . '終場一一四比一一九不敵密爾瓦基公鹿,客場四戰全輸。'; $txt = $txt . '明天凌晨十二點重返紐約主場迎戰費城七六人,尼克全力止敗。'; $pdf->Write(0, $txt, '', 0, 'L', true, 0, false, false, 0); $pdf->AddPage(); $txt = '林書豪'; $txt = $txt . '昨拿廿分、十三助攻與四抄截,'; $txt = $txt . '本季第六次獻出兩個「雙位數」成績單;'; $txt = $txt . '可惜紐約尼克隊防守再出紕漏,'; $txt = $txt . '終場一一四比一一九不敵密爾瓦基公鹿,客場四戰全輸。'; $txt = $txt . '明天凌晨十二點重返紐約主場迎戰費城七六人,尼克全力止敗。'; $pdf->Write(0, $txt, '', 0, 'L', true, 0, false, false, 0); /* $txt = 'Example of CID-0 CJK unembedded font. To display extended text you must have CJK fonts installed for your PDF reader:'; $pdf->Write(0, $txt, '', 0, 'L', true, 0, false, false, 0); // set font $pdf->SetFont('cid0jp', '', 40); $txt = 'こんにちは世界'; $pdf->Write(0, $txt, '', 0, 'L', true, 0, false, false, 0); */ // --------------------------------------------------------- //Close and output PDF document $pdf->Output('example_038.pdf', 'I'); //============================================================+ // END OF FILE //============================================================+
保存
取消
返回文件列表