doubeng3216 2014-04-16 11:51
浏览 83
已采纳

用土耳其语fpdf生成pdf

In put and out put data are getting different on pdf file generated through fpdf.

input: uçak is Turkish word
Output: uçak is Turkish word

What I am doing:

  1. Convert arial.tft to .z and define php from http://fpdf.fruit-lab.de/index.php?id=3
  2. Map: cp1254 for Turkish language.
  3. Download only .z and define php file.
  4. Both are copied in the font folder in fpdf.

I am using following code:

<?php
require('fpdf.php');

$pdf = new FPDF();
$pdf->AddFont('ArialMT','','ArialMT.php');
$pdf->AddPage();
$pdf->SetFont('ArialMT','',35);
$pdf->Write(10,'uçak is Turkish word');
$pdf->Output();
?>

which results in the following output:

uçak is Turkish word

Where am I making mistake? Do I have to do any additional task?

  • 写回答

2条回答 默认 最新

  • duanhun3273 2014-04-18 19:40
    关注

    I answered this in the comments section above, but for future reference:

    By default, FPDF does not support unicode characters. There are two popular extensions available, which are:

    • tFPDF - A fork of FPDF with unicode support.
    • uFPDF - A minor patch for unicode support. Contains lots of examples.
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 随身WiFi网络灯亮但是没有网络,如何解决?
  • ¥15 gdf格式的脑电数据如何处理matlab
  • ¥20 重新写的代码替换了之后运行hbuliderx就这样了
  • ¥100 监控抖音用户作品更新可以微信公众号提醒
  • ¥15 UE5 如何可以不渲染HDRIBackdrop背景
  • ¥70 2048小游戏毕设项目
  • ¥20 mysql架构,按照姓名分表
  • ¥15 MATLAB实现区间[a,b]上的Gauss-Legendre积分
  • ¥15 Macbookpro 连接热点正常上网,连接不了Wi-Fi。
  • ¥15 delphi webbrowser组件网页下拉菜单自动选择问题