简体   繁体   English

使用非ASCII字符创建pdf

[英]Create pdf with non-ASCII characters

When I write Hebrew text in PDFMake it becomes '????' 当我在PDFMake中编写希伯来语文本时,它变成“ ????” in the output. 在输出中。
Is there a way to create a PDF containing non-ASCII characters? 有没有一种创建包含非ASCII字符的PDF的方法?

You should install a Font that support the Hebrew characters (same problem for all other languages with special characters.) 您应该安装支持希伯来语字符的字体(所有其他带有特殊字符的语言都存在相同的问题。)

Here is how you should do : https://github.com/bpampuch/pdfmake/wiki/Custom-Fonts---client-side 这是您应该怎么做: https : //github.com/bpampuch/pdfmake/wiki/Custom-Fonts---客户端

  1. create vfs_fonts.js containing your fonts. 创建包含您的字体的vfs_fonts.js。
  2. define font family. 定义字体系列。
  3. change font family in doc-definition-object. 在doc-definition-object中更改字体系列。

If not fixed after, please consider reporting the issue here : https://github.com/bpampuch/pdfmake/issues/165 如果之后没有解决,请考虑在此处报告问题: https : //github.com/bpampuch/pdfmake/issues/165

It's seems to be the related issue to your problem and people seems to have this issue fixed there. 这似乎是与您的问题相关的问题,人们似乎已将其修复。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 警告Django形式的非ASCII字符 - Warn on non-ASCII Characters in Django Form 正则表达式匹配非ASCII字符? - Regular expression to match non-ASCII characters? 需要在JavaScript中转义非ASCII字符 - Need to escape non-ASCII characters in JavaScript 通过 HttpResponse 和 AJAX 提供时,非 ASCII 字符未正确显示在 PDF 中 - Non-ASCII characters are not correctly displayed in PDF when served via HttpResponse and AJAX 在Javascript中验证电子邮件地址,并与非ASCII字符兼容 - Validate email address in Javascript, and compatible with non-ASCII characters 从nodejs crypto返回的字符串中修剪非ASCII字符 - trim non-ascii characters from string returned by nodejs crypto 使用Blob创建的文件不支持NON-ASCII字符 - File created with blob does not support NON-ASCII characters 正则表达式,用于允许使用非ASCII字符的(类似twitter的)主题标签 - Regex for a (twitter-like) hashtag that allows non-ASCII characters 正则表达式:如何匹配非ASCII字符串的所有大写字符 - Regex: How to match all uppercase characters of non-ascii string 用于检测非ascii字符的Java Script正则表达式 - Java Script regular expression for detecting non-ascii characters
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM