打印本文 打印本文 关闭窗口 关闭窗口
Fastreport3.14的中文PDF输出
作者:武汉SEO闵涛  文章来源:敏韬网  点击数3533  更新时间:2009/4/23 18:26:28  文章录入:mintao  责任编辑:mintao
p;           WriteLn(Stream, ''''endobj'''');
            // Add by MagicDog
            Parent.XRefAdd(Stream);

            WriteLn(Stream, IntToStr(Index + 1 + Parent.FStartFonts) + '''' 0 obj'''');
            WriteLn(Stream, ''''<<'''');
            WriteLn(Stream, ''''/Type /Font'''');
            WriteLn(Stream, ''''/Subtype'''');
            WriteLn(Stream, ''''/CIDFontType2'''');
            WriteLn(Stream, ''''/BaseFont /'''' + EncodeFontName(FontName));
            WriteLn(Stream, ''''/WinCharSet 136'''');
            Write(Stream, ''''/FontDescriptor '''');
            WriteLn(Stream, ''''<<'''');
            WriteLn(Stream, ''''/Type /FontDescriptor'''');
            if Parent.FEmbedded then
              WriteLn(Stream, ''''/FontFile2 '''' + IntToStr(Index + 2 + Parent.FStartFonts) + '''' 0 R'''');
            WriteLn(Stream, ''''/FontName /'''' + EncodeFontName(FontName));
            WriteLn(Stream, ''''/Flags 7'''');
            WriteLn(Stream, ''''/FontBBox ['''' + IntToStr(pm^.otmrcFontBox.Left) + '''' '''' + IntToStr(pm^.otmrcFontBox.Bottom) + '''' '''' + IntToStr(pm^.otmrcFontBox.Right) + '''' '''' + IntToStr(pm^.otmrcFontBox.Top) + '''' ]'''');
            WriteLn(Stream, ''''/Style << /Panose <010502020300000000000000> >>'''');
            WriteLn(Stream, ''''/Ascent '''' + IntToStr(pm^.otmAscent));
            WriteLn(Stream, ''''/Descent '''' + IntToStr(pm^.otmDescent));
            WriteLn(Stream, ''''/CapHeight '''' + IntToStr(pm^.otmTextMetrics.tmHeight));
            WriteLn(Stream, ''''/StemV '''' + IntToStr(50 + Round(sqr(pm^.otmTextMetrics.tmWeight / 65))));
            WriteLn(Stream, ''''/ItalicAngle '''' + IntToStr(pm^.otmItalicAngle));
            WriteLn(Stream, ''''>>'''');
            WriteLn(Stream, ''''/CIDSystemInfo'''');
            WriteLn(Stream, ''''<<'''');
            WriteLn(Stream, ''''/Registry(Adobe)'''');
            WriteLn(Stream, ''''/Ordering(CNS1)'''');
            WriteLn(Stream, ''''/Supplement 0'''');
            WriteLn(Stream, ''''>>'''');
            WriteLn(Stream, ''''/DW 1000'''');
            WriteLn(Stream, ''''/W [1 95 500]'''');
            WriteLn(Stream, ''''>>'''');
            WriteLn(Stream, ''''endobj'''');
          end;

        // Add begin by ijia 2004.12.20
        GB2312_CHARSET: {134}
          begin
            WriteLn(Stream, ''''/DescendantFonts ['''' + IntToStr(Index + 1 + Parent.FStartFonts) + '''' 0 R]'''');
            WriteLn(Stream, ''''/Encoding /GB-EUC-H'''');
            WriteLn(Stream, ''''>>'''');
            WriteLn(Stream, ''''endobj'''');

            // Add by MagicDog
            Parent.XRefAdd(Stream);
            WriteLn(Stream, IntToStr(Index + 1 + Parent.FStartFonts) + '''' 0 obj'''');
            WriteLn(Stream, ''''<<'''');
            WriteLn(Stream, ''''/Type /Font'''');
            WriteLn(Stream, ''''/Subtype'''');
            WriteLn(Stream, ''''/CIDFontType2'''');
            WriteLn(Stream, ''''/BaseFont /'''' + EncodeFontName(FontName));
            WriteLn(Stream, ''''/WinCharSet 134'''');

            Write(Stream, ''''/FontDescriptor '''');
            WriteLn(Stream, ''''<<'''');
            WriteLn(Stream, ''''/Type /FontDescriptor'''');
            if Parent.FEmbedded then
              WriteLn(Stream, ''''/FontFile2 '''' + IntToStr(Index + 2 + Parent.FStartFonts) + '''' 0 R'''');
            WriteLn(Stream, ''''/FontName /'''' + EncodeFontName(FontName));
            WriteLn(Stream, ''''/Flags 6'''');
            WriteLn(Stream, ''''/FontBBox ['''' + IntToStr(pm^.otmrcFontBox.Left) + '''' '''' + IntToStr(pm^.otmrcFontBox.Bottom) + '''' '''' + IntToStr(pm^.otmrcFontBox.Right) + '''' '''' + IntToStr(pm^.otmrcFontBox.Top) + '''' ]'''');
            WriteLn(Stream, ''''/Style << /Panose <010502020400000000000000> >>'''');
            WriteLn(Stream, ''''/Ascent '''' + IntToStr(pm^.otmAscent));
            WriteLn(Stream, ''''/Descent '''' + IntToStr(pm^.otmDescent));
            WriteLn(Stream, ''''/CapHeight '''' + IntToStr(pm^.otmTextMetrics.tmHeight));
            WriteLn(Stream, ''''/StemV '''' + IntToStr(50 + Round(sqr(pm^.otmTextMetrics.tmWeight / 65))));
            WriteLn(Stream, ''''/ItalicAngle '''' + IntToStr(pm^.otmItalicAngle));
            WriteLn(Stream, ''''>>'''');
            WriteLn(Stream, ''''/CIDSystemInfo'''');
            WriteLn(Stream, ''''<<'''');
            WriteLn(Stream, ''''/Registry(Adobe)'''');
            WriteLn(Stream, ''''/Ordering(GB1)'''');
            WriteLn(Stream, ''''/Supplement 2'''');
            WriteLn(Stream, ''''>>'''');
            WriteLn(Stream, ''''/DW 1000'''');
            WriteLn(Stream, ''''/W [ 1 95 500 814 939 500 7712 [ 500 ] 7716 [ 500 ] ]'''');
            WriteLn(Stream, ''''>>'''');
            WriteLn(Stream, ''''endobj'''');
          end;
      // Add end

      end;

      // Add by ijia 2004.12.20
      //if Charset <> CHINESEBIG5_CHARSET then
      if not (Charset in [CHINESEBIG5_CHARSET, GB2312_CHARSET]) then
      begin
        WriteLn(Stream, ''''/FontDescriptor '''' + IntToStr(Index + 1 + Parent.FStartFonts) + '''' 0 R'''');

上一页  [1] [2] [3] [4]  下一页

打印本文 打印本文 关闭窗口 关闭窗口