[英]Uneven character kerning in PDF when converted from Word via automation
I need your expertise in fixing a problem I have been facing from a week. 我需要你的专业知识来解决我一周来面临的问题。 This has already turned into a 'royal pain in the lower back side' category and time is running out fast. 这已经变成了“腰背部的皇家痛苦”类别,时间快到了。
Problem 问题
I have developed a C# script that I call from ColdFusion to assist me in converting Word documents to PDF. 我开发了一个C#脚本,我从ColdFusion调用它来帮助我将Word文档转换为PDF。 This script is doing the conversion properly, but the (justified) text in the paragraphs is not being spaced properly. 此脚本正在进行正确的转换,但段落中的(对齐的)文本没有正确间隔。 I get a non-select-able space next to some character. 我在某个角色旁边有一个不可选择的空间。
See the image - 看图像 -
What is should look like... 应该是什么样子......
What it looks like... 看起来像什么......
The red marks are added to show the spaces created. 添加红色标记以显示创建的空间。
Now, if I open the file by word manually and save it, I do not get this same problem. 现在,如果我手动打开文件并保存它,我不会遇到同样的问题。 What is that I'm missing or doing wrong, that has resulted in this error? 我错过了什么或做错了什么,导致了这个错误?
Details of my application flow - 我的申请流程详情 -
I have tried this with multiple fonts and what i observe is that it only happens with certain fonts (in my case its Palatino - Linotype). 我用多种字体试过这个,我观察到它只发生在某些字体上(在我的例子中是Palatino - Linotype)。 I want to know, what is the difference from manual to automation? 我想知道,从手动到自动化有什么区别? Is there a setting (like a boolean) that is to done for this or some other hacks? 是否有针对此或其他黑客的设置(如布尔值)?
My system configuration - 我的系统配置 -
Windows 2008 R2 64b + .NET 4 + Office 2010 Windows 2008 R2 64b + .NET 4 + Office 2010
Note : I know that office automation is bad. 注意 :我知道办公室自动化很糟糕。 So on this date and time, this is the only option I have to get my job done. 所以在这个日期和时间,这是我完成工作的唯一选择。
I found a work-around for this. 我找到了解决方法。 It seems to be dependent on the selected printer! 它似乎取决于所选的打印机!
Selecting other printer drivers may work also. 选择其他打印机驱动程序也可以。 I found this solution at this thread: http://www.howtofixcomputers.com/forums/microsoft-office/bad-kerning-pdf-using-save-pdf-xps-add-244886.html 我在这个帖子找到了这个解决方案: http : //www.howtofixcomputers.com/forums/microsoft-office/bad-kerning-pdf-using-save-pdf-xps-add-244886.html
Notes: 笔记:
I guess that the trouble could be in used font. 我想麻烦可能是用过的字体。 Please try: 请试试:
Or it could be inserted special character, for example, wrong way interpreted inserted "no-width optional break". 或者它可以插入特殊字符,例如,错误的方式解释插入“无宽度可选中断”。 Try to select the text, cut&paste in word and see non-printable characters - it should be visible. 尝试选择文字,剪切和粘贴单词并查看不可打印的字符 - 它应该是可见的。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.