2012-02-15 68 views
2

我一直在寻找解决这个问题的一段时间。如何用上标注册商标符号填充pdf字段

  • 我使用CF9的cfpdf填充pdf字段。
  • 一个字段是“标题”字段,一个特定标题必须是 ,后面跟着注册的商标符号。
  • 注册商标符号必须是上标

有没有人有任何可能的解决方案?

非常感谢您的时间。

代码片段:

<cfpdfform 
action="populate" 
source="#var.workFiles##var.ID#.pdf" 
destination="#var.workFiles##var.ID#.pdf" overwrite = "true"> 

<!--this is the value that could contain the registered trademark --> 

<cfpdfformparam name="title" value="#trim(var.title)#"> 
+0

你可以发布你的代码和版本(CF9?) – Leigh 2012-02-15 03:50:27

+0

Coldfusion9。这是大量的代码,但我会发布一个片段。 – Kerrie 2012-02-15 13:09:26

回答

1

有可能是一条捷径,但尝试这样的事:

<cfset symbol = charsetEncode(binaryDecode("c2ae", "hex"), "utf-8")> 
... 
<cfpdfformparam name="title" value="XYZ Corporation#symbol#"> 
+0

Leigh ...它的作品!!!!!但是,我可以谢谢你吗?绝对精彩。 – Kerrie 2012-02-15 19:40:06

+0

很酷,很高兴我可以帮助:) – Leigh 2012-02-15 19:47:11

0

要在Leigh的答案扩大,我也有与字符编码的问题,特别是£标志。其中显示为

我解决了问题以同样的方式,通过寻找符号£在http://www.utf8-chartable.de/(为£标志c2a3)的hexicecimal表示和使用charsetEncode(binaryDecode("c2a3", "hex"), "utf-8")部分来自Leigh的答案与正确的十六进制代码。