【问题标题】:How to insert a copyright symbol on Zend_pdf_table component?如何在 Zend_pdf_table 组件上插入版权符号?
【发布时间】:2012-09-07 10:11:31
【问题描述】:

有人知道如何在 Zend_pdf_table 组件上插入版权符号吗?

还有另一个符号?

【问题讨论】:

标签: php zend-framework pdf zend-pdf


【解决方案1】:

关键是知道特殊字符的 UTF-8 代码点。

这是一个例子:

$pdf = new Zend_Pdf();

$pdf->pages[0] = new Zend_Pdf_Page(Zend_Pdf_Page::SIZE_A4);
$pdf->pages[0]->setFont(Zend_Pdf_Font::fontWithName(Zend_Pdf_Font::FONT_HELVETICA), 36);

$pdf->pages[0]->drawText("\xc2\xa9", 200, 400);

$pdf->save( 'test.pdf' );

在此示例中,“\xc2\xa9”是版权符号的 UTF-8 代码点。 TM 符号为“\xe2\x84\xa2”,破折号为“\xe2\x80\x94”。

【讨论】:

猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2017-08-15
  • 2013-09-08
  • 2012-07-15
  • 1970-01-01
  • 1970-01-01
  • 2012-07-12
  • 2020-07-13
相关资源
最近更新 更多