Нема описа

Sample_10_EastAsianFontStyle.php 524B

12345678910111213141516
  1. <?php
  2. include_once 'Sample_Header.php';
  3. // New Word Document
  4. echo date('H:i:s'), ' Create new PhpWord object', EOL;
  5. $phpWord = new \PhpOffice\PhpWord\PhpWord();
  6. $section = $phpWord->addSection();
  7. $header = array('size' => 16, 'bold' => true);
  8. //1.Use EastAisa FontStyle
  9. $section->addText(htmlspecialchars('中文楷体样式测试'), array('name' => '楷体', 'size' => 16, 'color' => '1B2232'));
  10. // Save file
  11. echo write($phpWord, basename(__FILE__, '.php'), $writers);
  12. if (!CLI) {
  13. include_once 'Sample_Footer.php';
  14. }