pdftk fill_form utf8问题 [英] pdftk fill_form utf8 problems

查看:162
本文介绍了pdftk fill_form utf8问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可能重复:
将FDF/XFDF平板格式转换为PDF带有utf-8字符的PHP

Possible Duplicate:
Flatten FDF / XFDF forms to PDF in PHP with utf-8 characters

我正在使用pdftk用来自fdf的数据填充模板pdf.数据具有正确的utf-8字符,但是当我使用fill_form时,生成的pdf文件存在格式错误. (我使用flatten)

I am using pdftk to fill template pdf with data from fdf. Data has correct utf-8 characters, but when I use fill_form, resulting pdf file has formating errors. (I am NOT using flatten)

我在使用šđčćž之类的字母时遇到问题.

I have problems with letters like š, đ, č, ć, ž.

谢谢.

更新 我的解决方案

最后,我放弃了pdftk,最终使用了 fpfd ,我使用了脚本. 我在这里也有一些与pdf文件有关的问题.但是我使用pdftk修复了该pdf(如脚本本身中所建议),最终它对我有所帮助:它用字符填充了我拥有的pdf表单,而不会弄乱它们.

In the end, I gave up on pdftk, I ended up using fpfd, to be more precise, I used this script. I had couple of problems here too, related to the pdf file. But I used pdftk to fix that pdf (as was suggested in the script itself), and in the end it helped me: it filled the pdf form I had with the characters without messing them up.

推荐答案

pdftk(从v1.44开始)无法处理使用FDF格式填充的标准ASCII以外的字符.有人确实尝试修改pdftk以允许多字节字符支持亚洲语言,但是从注释中我不确定它是否确实有效.

pdftk (as of v1.44) can't handle chars outside the standard ASCII with FDF form fill. Someone did try to modify pdftk to allow multi-byte characters to support Asian languages, but from the comments I'm not sure it actually works.

http://blog.rubypdf. com/2007/07/19/pdftk-supports-chinese-path-now/

相关问题:

平面FDF/XFDF表单用utf-8字符在PHP中转换为PDF

pdftk + xfdf + php无法处理变音符

这篇关于pdftk fill_form utf8问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆