⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 10-6.php

📁 《php程序设计》的配套源码 《php程序设计》的配套源码 《php程序设计》的配套源码 《php程序设计》的配套源码
💻 PHP
字号:
<?php
  $p = pdf_new();
  pdf_open_file($p);
  pdf_set_info($p,"Creator","hello.php");
  pdf_set_info($p,"Author","Rasmus Lerdorf");
  pdf_set_info($p,"Title","Hello world (PHP)");
  pdf_set_parameter($p, "resourcefile",
                    '/usr/local/lib/fonts/pdflib.upr');
  pdf_begin_page($p,612,792);
  pdf_set_text_pos($p,25,750);
  $fonts = array('Courier'=>0,'Courier-Bold'=>0,'Courier-BoldOblique'=>0,
                 'Courier-Oblique'=>0,'Helvetica'=>0,'Helvetica-Bold'=>0,
                 'Helvetica-BoldOblique'=>0,'Helvetica-Oblique'=>0,
                 'Times-Bold'=>0,'Times-BoldItalic'=>0, 'Times-Italic'=>0,
                 'Times-Roman'=>0, 'LuciduxSans'=>1,
                 'Georgia' => 1, 'Arial' => 1, 'Century Gothic' => 1,
                 'Century Gothic Bold' => 1, 'Century Gothic Italic' => 1,
                 'Century Gothic Bold Italic' => 1
                );
  foreach($fonts as $f=>$embed) {
    $font = pdf_findfont($p,$f,"host",$embed);
    pdf_setfont($p,$font,25.0);
    pdf_continue_text($p,"$f (".chr(128)." 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -