xxxmmxxx
路人甲
路人甲
  • 注册日期2004-07-12
  • 发帖数8
  • QQ
  • 铜币90枚
  • 威望0点
  • 贡献值0点
  • 银元0个
阅读:1336回复:1

ExportPDF 是否支持中文输出?

楼主#
更多 发布于:2004-07-24 14:33
<P>ExportPDF  是否支持中文输出?</P>
<P>using ESRI.ArcGIS.Server;
using ESRI.ArcGIS.Geodatabase;
using ESRI.ArcGIS.Output;
using System.Drawing;
using ESRI.ArcGIS.Display; </P>


<P>namespace ConsoleApplication2
{
/// <summary>
/// Class1 的摘要说明。
/// </summary>
class Class1
{
/// <summary>
/// 应用程序的主入口点。
/// </summary>
[STAThread]
static void Main(string[] args)
{
ExportPDFClass exp = new ExportPDFClass();
IEnvelope eenv = new EnvelopeClass();
exp.ExportFileName = "d:\\test." + exp.Name;
exp.Resolution = 300;
eenv.PutCoords(0,0,209.9/25.4*exp.Resolution,297/25.4*exp.Resolution);
exp.PixelBounds = eenv;</P>
<P>IntPtr hdc = (IntPtr)exp.StartExporting();
Graphics grp = Graphics.FromHdc(hdc);
grp.PageUnit = GraphicsUnit.Pixel;
grp.DrawRectangle(new Pen(Color.Red),200,100,100,100);
grp.DrawString("This is a test ! 这是一个测试!",new Font("宋体",16),new SolidBrush(Color.Red),0,0);
exp.FinishExporting();</P>
<P>Console.WriteLine("Press Enter Key end...");
Console.ReadLine();
}
}
}</P>
<P>输出汉字的位置为短横线。如果PDFExporterClass exp = new PDFExporterClass(); 下面将产生错误exp.FinishExporting();</P>
<P>是否有其它方法让PDF输出汉字?</P>
<P>我用的在ARCGIS Server9.0
</P>
喜欢0 评分0
gis
gis
管理员
管理员
  • 注册日期2003-07-16
  • 发帖数15951
  • QQ
  • 铜币25345枚
  • 威望15368点
  • 贡献值0点
  • 银元0个
  • GIS帝国居民
  • 帝国沙发管家
  • GIS帝国明星
  • GIS帝国铁杆
1楼#
发布于:2004-07-25 02:16
在arcgis83中好象不支持中文
GIS麦田守望者,期待与您交流。
举报 回复(0) 喜欢(0)     评分
游客

返回顶部