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

📄 10-5.php

📁 《php程序设计》的配套源码 《php程序设计》的配套源码 《php程序设计》的配套源码 《php程序设计》的配套源码
💻 PHP
字号:
<?php
  $p = pdf_new();
  pdf_open_file($p);
  pdf_begin_page($p,612,792);

  $font = pdf_findfont($p,"Helvetica-Bold","host",0);
  pdf_setfont($p,$font,38.0);
  pdf_set_parameter($p, "overline", "true");
  pdf_show_xy($p, "Overlined Text", 50,720);
  pdf_set_parameter($p, "overline", "false");
  pdf_set_parameter($p, "underline", "true");
  pdf_continue_text($p, "Underlined Text");
  pdf_set_parameter($p, "strikeout", "true");
  pdf_continue_text($p, "Underlined strikeout Text");
  pdf_set_parameter($p, "underline","false");
  pdf_set_parameter($p, "strikeout","false");
  pdf_setcolor($p,"fill","rgb", 1.0, 0.1, 0.1);
  pdf_continue_text($p, "Red Text");
  pdf_setcolor($p,"fill","rgb", 0, 0, 0);
  pdf_set_value($p,"textrendering",1);
  pdf_setcolor($p,"stroke","rgb", 0, 0.5, 0);
  pdf_continue_text($p, "Green Outlined Text");
  pdf_set_value($p,"textrendering",2);
  pdf_setcolor($p,"fill","rgb", 0, .2, 0.8);
  pdf_setlinewidth($p,2);
  pdf_continue_text($p, "Green Outlined Blue Text");

  pdf_end_page($p);
  pdf_close($p);

  $buf = pdf_get_buffer($p);
  $len = strlen($buf);
  header("Content-type: application/pdf");
  header("Content-Length: $len");
  header("Content-Disposition: inline; filename=coord.pdf");
  echo $buf;
  pdf_delete($p);
?>

⌨️ 快捷键说明

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