当前位置:首页 » 软件开发
开发技术指南» 文章正文
    引言: 参考 《让Fastreport3.x支持中文PDF的输出》一文,确实可以支持中文。
 

 

 ·安装程序打包interbase的方法     »显示摘要«
    摘要:使用interbase是因其体积小巧,运行效率高。下面以inno setup5.0的安装脚本为例介绍一下最小化打包interbase的方法。本安装脚本仅适合win2000及以上操作系统,不兼容win9x。本脚本在xp下安装通过,win2000应该也一样。如果您有更好的安装脚本或别的意见建议,欢迎与我联系 ufo2003@126.com[files];以下为客户端所需文件,计5个,大小为875kso......
    摘要:(期待整理)row cannot be located for updating的解决方法: //---- adcprop_updatecriteria_enum values ---- //const adcriteriakey = 0 //const adcriteriaallcols = 1 //const adcriteriaupdcols = 2 //const adcriteriati......


Fastreport3.14的中文PDF输出

参考 «让fastreport3.x支持中文pdf的输出»一文,确实可以支持中文.但是发现两个问题:

2.用adobe acrobat或者adobe reader打开时提示rebuild,关闭时提示save 【程序编程相关:后台调用外部程序的完美实现(Delphi

1.只能在adobe reader下打开,在foxit reader下空白. 【推荐阅读:利用VFI提高Delphi程序的重用性

修改后的tfrxpdffont.savetostream替换原来的即可. 【扩展信息:读书笔记:Delphi5开发人员指南 第

研究了一下fastreport3.14与3.07的源代码,发现关于字体这部分重新调整了.在3.07下,每个type0的字体有三个obj表示,而在3.14下只用两个obj(把fontdescriptor放进实际字体中去了).3.14中源代码中有个小bug,漏掉了实际字体obj的ref(原frxpdffile.pas的985行与986行之间).foxit reader应该是严格按照ref去找obj的,找不到obj,所以显示不出来.adobe reader应该不是按ref找的,能够正常显示汉字,但是它会重新ref,所以提示rebuild.

镶入字体还不行.有时间再说.3.15的说明中有说增强了pdf导出的功能,期待中.

procedure tfrxpdffont.savetostream(stream: tstream);

var

  s: string;

  b: tbitmap;

  pm: ^outlinetextmetric;

  fontname: string;

  i: cardinal;

  pfont: pchar;

  firstchar, lastchar: integer;

  memstream: tmemorystream;

  memstream1: tmemorystream;

  pwidths: pabc;

  charset: tfontcharset;

  // support dbcs font name encoding

  function encodefontname(afontname: string): string;

  var

    s: string;

    index, len: integer;

  begin

    // add begin by ijia 2004.12.20

    // 修正在简体系统下繁体字体名的问题

    // 只提供 mingliu, pmingliu --> 细明体, 新细明体的修正

    s:=uppercase(afontname);

    if copy(s, 1, 7)=mingliu then

      afontname:=细明体;

    if copy(s, 1, 8)=pmingliu then

      afontname:=新细明体;

    // add end

    s := ;

    len := length(afontname);

    index := 0;

    while index < len do

    begin

      index := index + 1;

      if byte(afontname[index]) > $7f then

        s := s + # + inttohex(byte(afontname[index]), 2)

      else

        s := s + afontname[index];

    end;

    result := s;

  end;

begin

  inherited savetostream(stream);

  b := tbitmap.create;

  b.canvas.font.assign(font);

  b.canvas.font.pixelsperinch := 96;

  b.canvas.font.size := 750;

  i := getoutlinetextmetrics(b.canvas.handle, 0, nil);

  getmem(pm, i);

  try

    try

      getoutlinetextmetrics(b.canvas.handle, i, pm);

      firstchar := ord(pm.otmtextmetrics.tmfirstchar);

      lastchar := ord(pm.otmtextmetrics.tmlastchar);

      fontname := stringreplace(font.name, , #20, [rfreplaceall]);

      s := ;

      if fsbold in font.style then

        s := s + bold;

      if fsitalic in font.style then

        s := s + italic;

      if s <> then

        fontname := fontname + , + s;

      charset := pm.otmtextmetrics.tmcharset;

      fontname := encodefontname(fontname);

      parent.xrefadd(stream);

      writeln(stream, inttostr(index + parent.fstartfonts) + 0 obj);

      writeln(stream, <<);

      writeln(stream, /type /font);

      writeln(stream, /name /f + inttostr(index - 1));

      writeln(stream, /basefont / + fontname);

      // add by ijia 2004.12.20

      //if charset <> chinesebig5_charset then


...   下一页
    摘要: delphi的rss开源项目正式启动了! 第一次讨论主要确定了开发工具为delphi2005 upd3(d9) ,推荐用delphi9.03 for win32精简版。待决定的问题为本项目的名称,包括中文名和英文名。 现有成员(排名不分先后),及联系方式: 我不是谁 [1314300] mosane#163.com 在水一方 [109465298] 理想 [8196685] shonhen#qq......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE