将TeeChart导出为PDF时,使用Acrobat Reader X打印后出现错误。
编辑:使用不同的字体时,找不到任何使用过的字体,并且所有字体都被标准字体替换。
代码
chart.Export.Image.PDF.Height = Math.Round(chart.ActualHeight, 0)
chart.Export.Image.PDF.Width = Math.Round(chart.ActualWidth, 0)
chart.Export.Image.PDF.Save(filename)
顺便说一句。需要对高度/宽度进行舍入,因为导出的PDF有时会在未执行此操作时被破坏。也许是因为WPF中有许多ActualHeight值的数字。
示例文件:PDF
来自Acrobat Reader X的错误消息
此页面上存在错误。 Acrobat可能无法正确显示页面。请与创建PDF文档的人员联系以解决问题。
在GSView(或其他PDF浏览器,如SumatraPDF)中打开时不会出错,但GSView会在消息中显示很多内容。
来自GSView的消息
GSview 5.0 2012-01-17 GPL Ghostscript 9.07 (2013-02-14) Copyright (C) 2012 Artifex Software, Inc. All rights reserved. This software comes with NO WARRANTY: see the file PUBLIC for details. Scanning PDF file **** Warning: length of some xref entries is not equal to 20 bytes. %GSVIEW_PDF_PAGES: 1 1 Displaying PDF page 1 %GSVIEW_PDF_PAGE: 1 %GSVIEW_PDF_MEDIA: [0 0 400 250] %GSVIEW_PDF_ROTATE: 0 Warning: EPS file must not use /setglobal Warning: EPS file must not use /setglobal Warning: EPS file must not use /setglobal Warning: EPS file must not use /setglobal **** Warning: Tf refers to an unknown resource name: F0 Assuming it's a font name. Warning: EPS file must not use /setglobal Warning: EPS file must not use /setglobal Warning: EPS file must not use /setglobal Scanning c:\psfonts for fonts... 0 files, 0 scanned, 0 new fonts. Warning: EPS file must not use /setglobal Can't find (or can't open) font file %rom%Resource/Font/F0. Can't find (or can't open) font file F0. Querying operating system for font files... Didn't find this font on the system! Substituting font Courier for F0. Loading NimbusMonL-Regu font from %rom%Resource/Font/NimbusMonL-Regu... 3168784 1826611 4629224 3331406 3 done. **** Warning: Tf refers to an unknown resource name: F0 Assuming it's a font name. **** Warning: Tf refers to an unknown resource name: F0 Assuming it's a font name. **** Warning: Tf refers to an unknown resource name: F0 Assuming it's a font name. **** Warning: Tf refers to an unknown resource name: F0 Assuming it's a font name. **** Warning: Tf refers to an unknown resource name: F0 Assuming it's a font name. **** Warning: Tf refers to an unknown resource name: F0 Assuming it's a font name. **** Warning: Tf refers to an unknown resource name: F0 Assuming it's a font name. **** Warning: Tf refers to an unknown resource name: F0 Assuming it's a font name. **** Warning: Tf refers to an unknown resource name: F0 Assuming it's a font name. **** Warning: Tf refers to an unknown resource name: F0 Assuming it's a font name. **** Warning: Tf refers to an unknown resource name: F0 Assuming it's a font name. **** Warning: Tf refers to an unknown resource name: F0 Assuming it's a font name. **** Warning: Tf refers to an unknown resource name: F0 Assuming it's a font name. **** Warning: Tf refers to an unknown resource name: F0 Assuming it's a font name. **** Warning: Tf refers to an unknown resource name: F0 Assuming it's a font name. **** Warning: Tf refers to an unknown resource name: F0 Assuming it's a font name. **** Warning: Tf refers to an unknown resource name: F0 Assuming it's a font name. **** Warning: Tf refers to an unknown resource name: F0 Assuming it's a font name. **** Warning: Tf refers to an unknown resource name: F0 Assuming it's a font name. **** Warning: Tf refers to an unknown resource name: F0 Assuming it's a font name. **** Warning: Tf refers to an unknown resource name: F0 Assuming it's a font name. **** Warning: Tf refers to an unknown resource name: F0 Assuming it's a font name. **** Warning: Tf refers to an unknown resource name: F0 Assuming it's a font name. **** Warning: Tf refers to an unknown resource name: F0 Assuming it's a font name. **** Warning: Tf refers to an unknown resource name: F0 Assuming it's a font name. **** Warning: Tf refers to an unknown resource name: F0 Assuming it's a font name. **** Warning: Tf refers to an unknown resource name: F0 Assuming it's a font name.
我更改了轴,图例,标题中的所有字体......但仍然出现错误。看起来字体名称不会写入生成的PDF。
我能做些什么吗?每次要从TeeChart打印PDF时,看起来不太好看到错误消息。
使用TeeChart WPF(4.1.2012.1312),但使用win表格制作了一个测试项目并显示相同的错误。
答案 0 :(得分:0)
打印PDF文件后出现此错误消息:
“此页面上存在错误.Acrobat可能无法正确显示页面。请与创建PDF文档的人员联系以解决问题。”
文件打印正确,但PDF文件忽略了字体名称设置,因此我将缺陷(TF02016650)添加到要修复的错误列表中。