字体问题从Crystal Report 11中没有ReportView的代码导出到PDF时 [英] Font Problem When export to PDF from code behind without ReportView in Crystal Report 11
问题描述
我正在使用visual studio 2008的水晶报告11.我要求从后面的代码直接将报告导出为PDF(v9)。我正在使用Windows 7并安装了所需的Unicode字体(乌尔都语/阿拉伯语)。
当我将报告查看器中的报告导出为PDF时,所有urdu字体都以正确的顺序显示,但是当我绕过报告查看器时,我遇到字体问题并且没有按正确的顺序显示。
我使用以下代码从后面的代码导出到PDF。
I am using crystal reports 11 with visual studio 2008. I have requirement to export the report directly to PDF(v9) from code behind. I am using windows 7 and installed required Unicode Fonts (Urdu/Arabic).
When I export report from Report Viewer to PDF then all urdu fonts are displayed in proper order but when I bypass report viewer then I have font problem and are not displayed in proper order.
I have used following code to export to PDF from code behind.
//getReportDocument(); this function will return ReportDocument object
ReportDocument repDoc = getReportDocument();
Response.Buffer = false;
Response.ClearContent();
Response.ClearHeaders();
try
{
repDoc.ExportToHttpResponse(ExportFormatType.PortableDocFormat, Response, true, "Customers");
}
我也试过ExportToDisk但是徒劳无功。
我的问题是我想将正确的字体嵌入PDF以正确显示数据。
任何直接的帮助将不胜感激。
问候
Azhar Iqbal
I have also try ExportToDisk but in vain.
My Question is that I want to embed proper font to PDF to display Data Properly.
Any Immediate Help would be appreciated.
Regards
Azhar Iqbal
推荐答案
我确信这与Open有关键入字体和True Type字体。
正如我在上面的评论中提到的,尝试使用True类型字体并查看PDF是否打印。
检查SAP本身的线程的以下链接。
http://scn.sap.com/thread/ 2076266#10817872 [ ^ ]
您应该能够将字体转换为TrueType然后再次运行。
I am sure this has to do with Open Type fonts and True Type fonts.
As I mentioned in the comment above, try using a True type font and see if PDF prints.
Check the following link of a thread from SAP itself.
http://scn.sap.com/thread/2076266#10817872[^]
You should be able to convert the font to TrueType and then run it again.
我在注册表中添加了两个键,我的问题解决了
I add two keys in registry and my problem solved
HKCR\Software\Business Objects\Suite 11.5\Crystal Reports\Export\PDF\ForceLargerFonts
Type: DWORD
Recognized Values: 0,1
Default Value: 1
Creation Method: manual
HKLM\Software\Business Objects\Suite 11.5\Crystal Reports\Export\PDF\ForceLargerFonts
Type: DWORD
Recognized Values: 0,1
Default Value: 1
Creation Method: manual
感谢您的帮助。
Thanks for help.
i thi你必须在你的水晶报告工具中创建pdf字体的路径..然后设置pdf字体然后可能是你的问题将解决..
i think you have to create path for pdf fonts in ur crystal reports tool..and set pdf font then may be ur problem will solve..
这篇关于字体问题从Crystal Report 11中没有ReportView的代码导出到PDF时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!