iTextSharp增加CIDFont支持的另类实现方法(也许灵活性更大些)

在《 为iTextSharp增加CID-keyed 字体(简称CIDFont)支持,让你在没有中文(CJK)TrueType字体(.TTF,.TTC)环境下一样完美显示中文(CJK)》一文中介绍的方法是把所有(或者想要的)CIDFont和Cmap嵌入到iTextSharp中,这时只要留心就会发现,iText的体积翻倍了,而且如果有了新的CIDFont,你还要重新编译iTextSharp,有没有别的解决办法呢?
 下面介绍的就是不使用iTextSharp的嵌入资源的方式,而是根据需要从文件中直接读取(当然你也可以把所需资源嵌入到你的程序中,不是iTextSharp中),解决办法当然还是从上文提到的三个方法(函数)动手了,那就是修改CJKFont.cs类,下面就把我修改好的贴在下面,有兴趣的自己研究吧,有什么好的建议也望不吝赐教。
ContractedBlock.gif ExpandedBlockStart.gif CJKFont.cs
None.gifusing System;
None.gif
using System.IO;
None.gif
using System.Text;
None.gif
using System.Collections;
None.gif
using System.util;
None.gif
ExpandedBlockStart.gifContractedBlock.gif
/**//*
InBlock.gif * $Id: CJKFont.cs,v 1.1 2005/03/15 21:07:01 geraldhenson Exp $
InBlock.gif * $Name:  $
InBlock.gif *
InBlock.gif * Copyright 2000, 2001, 2002 by Paulo Soares.
InBlock.gif *
InBlock.gif * The contents of this file are subject to the Mozilla Public License Version 1.1
InBlock.gif * (the "License"); you may not use this file except in compliance with the License.
InBlock.gif * You may obtain a copy of the License at 
http://www.mozilla.org/MPL/
InBlock.gif *
InBlock.gif * Software distributed under the License is distributed on an "AS IS" basis,
InBlock.gif * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
InBlock.gif * for the specific language governing rights and limitations under the License.
InBlock.gif *
InBlock.gif * The Original Code is 'iText, a free JAVA-PDF library'.
InBlock.gif *
InBlock.gif * The Initial Developer of the Original Code is Bruno Lowagie. Portions created by
InBlock.gif * the Initial Developer are Copyright (C) 1999, 2000, 2001, 2002 by Bruno Lowagie.
InBlock.gif * All Rights Reserved.
InBlock.gif * Co-Developer of the code is Paulo Soares. Portions created by the Co-Developer
InBlock.gif * are Copyright (C) 2000, 2001, 2002 by Paulo Soares. All Rights Reserved.
InBlock.gif *
InBlock.gif * Contributor(s): all the names of the contributors are added in the source code
InBlock.gif * where applicable.
InBlock.gif *
InBlock.gif * Alternatively, the contents of this file may be used under the terms of the
InBlock.gif * LGPL license (the "GNU LIBRARY GENERAL PUBLIC LICENSE"), in which case the
InBlock.gif * provisions of LGPL are applicable instead of those above.  If you wish to
InBlock.gif * allow use of your version of this file only under the terms of the LGPL
InBlock.gif * License and not to allow others to use your version of this file under
InBlock.gif * the MPL, indicate your decision by deleting the provisions above and
InBlock.gif * replace them with the notice and other provisions required by the LGPL.
InBlock.gif * If you do not delete the provisions above, a recipient may use your version
InBlock.gif * of this file under either the MPL or the GNU LIBRARY GENERAL PUBLIC LICENSE.
InBlock.gif *
InBlock.gif * This library is free software; you can redistribute it and/or modify it
InBlock.gif * under the terms of the MPL as stated above or under the terms of the GNU
InBlock.gif * Library General Public License as published by the Free Software Foundation;
InBlock.gif * either version 2 of the License, or any later version.
InBlock.gif *
InBlock.gif * This library is distributed in the hope that it will be useful, but WITHOUT
InBlock.gif * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
InBlock.gif * FOR A PARTICULAR PURPOSE. See the GNU Library general Public License for more
InBlock.gif * details.
InBlock.gif *
InBlock.gif * If you didn't download this code from the following link, you should check if
InBlock.gif * you aren't using an obsolete version:
InBlock.gif * 
http://www.lowagie.com/iText/
ExpandedBlockEnd.gif 
*/

None.gif
ExpandedBlockStart.gifContractedBlock.gif
namespace iTextSharp.text.pdf dot.gif{
InBlock.gif
ExpandedSubBlockStart.gifContractedSubBlock.gif
/**//**
InBlock.gif * Creates a CJK font compatible with the fonts in the Adobe Asian font Pack.
InBlock.gif *
InBlock.gif * @author  Paulo Soares (psoares@consiste.pt)
ExpandedSubBlockEnd.gif 
*/

InBlock.gif
ExpandedSubBlockStart.gifContractedSubBlock.gif
public class CJKFont : BaseFont dot.gif{
ExpandedSubBlockStart.gifContractedSubBlock.gif    
/**//** The encoding used in the PDF document for CJK fonts
ExpandedSubBlockEnd.gif     
*/

InBlock.gif    
internal const string CJK_ENCODING = "UTF-16BE";
InBlock.gif    
private const int FIRST = 0;
InBlock.gif    
private const int BRACKET = 1;
InBlock.gif    
private const int SERIAL = 2;
InBlock.gif    
private const int V1Y = 880;
InBlock.gif        
InBlock.gif    
internal static Properties cjkFonts = new Properties();
InBlock.gif    
internal static Properties cjkEncodings = new Properties();
InBlock.gif    
internal static Hashtable allCMaps = Hashtable.Synchronized(new Hashtable());
InBlock.gif    
internal static Hashtable allFonts = Hashtable.Synchronized(new Hashtable());
InBlock.gif    
private static bool propertiesLoaded = false;
InBlock.gif    
ExpandedSubBlockStart.gifContractedSubBlock.gif    
/**//** The font name */
InBlock.gif    
private string fontName;
ExpandedSubBlockStart.gifContractedSubBlock.gif    
/**//** The style modifier */
InBlock.gif    
private string style = "";
ExpandedSubBlockStart.gifContractedSubBlock.gif    
/**//** The CMap name associated with this font */
InBlock.gif    
private string CMap;
InBlock.gif    
InBlock.gif    
private bool cidDirect = false;
InBlock.gif    
InBlock.gif    
private char[] translationMap;
InBlock.gif    
private IntHashtable vMetrics;
InBlock.gif    
private IntHashtable hMetrics;
InBlock.gif    
private Hashtable fontDesc;
InBlock.gif    
private bool vertical = false;
InBlock.gif    
InBlock.gif
ContractedSubBlock.gifExpandedSubBlockStart.gif    
新增方法#region 新增方法
InBlock.gif    
public static void LoadProperties(string CJK_RESOURCE_PATH) 
ExpandedSubBlockStart.gifContractedSubBlock.gif    
dot.gif{
InBlock.gif        
if (propertiesLoaded)
InBlock.gif            
return;
InBlock.gif        
lock (allFonts) 
ExpandedSubBlockStart.gifContractedSubBlock.gif        
dot.gif{
InBlock.gif            
if (propertiesLoaded)
InBlock.gif                
return;
InBlock.gif            
try 
ExpandedSubBlockStart.gifContractedSubBlock.gif            
dot.gif{
InBlock.gif                Stream isp
=new FileStream(CJK_RESOURCE_PATH + "cjkfonts.properties",FileMode.Open);
InBlock.gif                
InBlock.gif                
//Stream isp = GetResourceStream(resource_path + "cjkfonts.properties");
InBlock.gif
                cjkFonts.Load(isp);
InBlock.gif                isp.Close();
InBlock.gif                
//isp = GetResourceStream(resource_path + "cjkencodings.properties");
InBlock.gif
                isp=new FileStream(CJK_RESOURCE_PATH + "cjkencodings.properties",FileMode.Open);
InBlock.gif                cjkEncodings.Load(isp);
InBlock.gif                isp.Close();
InBlock.gif                propertiesLoaded 
= true;
ExpandedSubBlockEnd.gif            }

InBlock.gif            
catch (Exception ex)
ExpandedSubBlockStart.gifContractedSubBlock.gif            
dot.gif{
InBlock.gif                
throw;
ExpandedSubBlockEnd.gif            }

InBlock.gif            
ExpandedSubBlockEnd.gif        }

ExpandedSubBlockEnd.gif    }

InBlock.gif
InBlock.gif
InBlock.gif    
public static void AddCMap(string CJK_RESOURCE_PATH,string name) 
ExpandedSubBlockStart.gifContractedSubBlock.gif    
dot.gif{
InBlock.gif        
if (allCMaps.ContainsKey(name))
InBlock.gif            
return;
InBlock.gif        
string key=name;
InBlock.gif        Stream istr 
= null;
InBlock.gif        
try 
ExpandedSubBlockStart.gifContractedSubBlock.gif        
dot.gif{
InBlock.gif            name 
= name + ".cmap";
InBlock.gif            
//istr = GetResourceStream(RESOURCE_PATH + name);
InBlock.gif
            istr=new FileStream(CJK_RESOURCE_PATH + name,FileMode.Open);
InBlock.gif            
char[] c = new char[0x10000];
InBlock.gif            
for (int k = 0; k < 0x10000++k)
InBlock.gif                c[k] 
= (char)((istr.ReadByte() << 8+ istr.ReadByte());
InBlock.gif            
InBlock.gif            allCMaps.Add(key,c);
ExpandedSubBlockEnd.gif        }

InBlock.gif        
catch (Exception ex)
ExpandedSubBlockStart.gifContractedSubBlock.gif        
dot.gif{
InBlock.gif            
throw;
ExpandedSubBlockEnd.gif        }

InBlock.gif        
finally 
ExpandedSubBlockStart.gifContractedSubBlock.gif        
dot.gif{
ExpandedSubBlockStart.gifContractedSubBlock.gif            
trydot.gif{istr.Close();}
ExpandedSubBlockStart.gifContractedSubBlock.gif            
catchdot.gif{}
ExpandedSubBlockEnd.gif        }

ExpandedSubBlockEnd.gif    }
 
InBlock.gif
InBlock.gif
InBlock.gif    
public static void AddFontProperties(string CJK_RESOURCE_PATH,String name) 
ExpandedSubBlockStart.gifContractedSubBlock.gif    
dot.gif{
InBlock.gif        
if (allFonts.ContainsKey(name))
InBlock.gif            
return;
InBlock.gif        
string fontName=name;
InBlock.gif        
try 
ExpandedSubBlockStart.gifContractedSubBlock.gif        
dot.gif{
InBlock.gif            name 
+= ".properties";
InBlock.gif            Stream isp 
= new FileStream(CJK_RESOURCE_PATH + name,FileMode.Open);
InBlock.gif            Properties p 
= new Properties();
InBlock.gif            p.Load(isp);
InBlock.gif            isp.Close();
InBlock.gif            IntHashtable W 
= CreateMetric(p["W"]);
InBlock.gif            p.Remove(
"W");
InBlock.gif            IntHashtable W2 
= CreateMetric(p["W2"]);
InBlock.gif            p.Remove(
"W2");
InBlock.gif            Hashtable map 
= new Hashtable();
InBlock.gif            
foreach (string key in p) 
ExpandedSubBlockStart.gifContractedSubBlock.gif            
dot.gif{
InBlock.gif                map[key] 
= p[key];
ExpandedSubBlockEnd.gif            }

InBlock.gif            map[
"W"= W;
InBlock.gif            map[
"W2"= W2;
InBlock.gif            allFonts.Add(fontName,map);
ExpandedSubBlockEnd.gif        }

InBlock.gif        
catch (Exception ex)
ExpandedSubBlockStart.gifContractedSubBlock.gif        
dot.gif{
InBlock.gif            
throw;
ExpandedSubBlockEnd.gif        }

ExpandedSubBlockEnd.gif    }

ExpandedSubBlockEnd.gif    
#endregion

InBlock.gif
InBlock.gif    
private static void LoadProperties() 
ExpandedSubBlockStart.gifContractedSubBlock.gif    
dot.gif{
InBlock.gif        
if (propertiesLoaded)
InBlock.gif            
return;
ExpandedSubBlockStart.gifContractedSubBlock.gif        
lock (allFonts) dot.gif{
InBlock.gif            
if (propertiesLoaded)
InBlock.gif                
return;
ExpandedSubBlockStart.gifContractedSubBlock.gif            
try dot.gif{
InBlock.gif                Stream isp 
= GetResourceStream(RESOURCE_PATH + "cjkfonts.properties");
InBlock.gif                cjkFonts.Load(isp);
InBlock.gif                isp.Close();
InBlock.gif                isp 
= GetResourceStream(RESOURCE_PATH + "cjkencodings.properties");
InBlock.gif                cjkEncodings.Load(isp);
InBlock.gif                isp.Close();
ExpandedSubBlockEnd.gif            }

ExpandedSubBlockStart.gifContractedSubBlock.gif            
catch dot.gif{
InBlock.gif                cjkFonts 
= new Properties();
InBlock.gif                cjkEncodings 
= new Properties();
ExpandedSubBlockEnd.gif            }

InBlock.gif            propertiesLoaded 
= true;
ExpandedSubBlockEnd.gif        }

ExpandedSubBlockEnd.gif    }

InBlock.gif    
InBlock.gif
InBlock.gif
ExpandedSubBlockStart.gifContractedSubBlock.gif    
/**//** Creates a CJK font.
InBlock.gif     * @param fontName the name of the font
InBlock.gif     * @param enc the encoding of the font
InBlock.gif     * @param emb always <CODE>false</CODE>. CJK font and not embedded
InBlock.gif     * @throws DocumentException on error
InBlock.gif     * @throws IOException on error
ExpandedSubBlockEnd.gif     
*/

ExpandedSubBlockStart.gifContractedSubBlock.gif    
internal CJKFont(string fontName, string enc, bool emb) dot.gif{
InBlock.gif        LoadProperties();
InBlock.gif        
this.FontType = FONT_TYPE_CJK;
InBlock.gif        
string nameBase = GetBaseName(fontName);
InBlock.gif        
if (!IsCJKFont(nameBase, enc))
InBlock.gif            
throw new DocumentException("Font '" + fontName + "' with '" + enc + "' encoding is not a CJK font.");
ExpandedSubBlockStart.gifContractedSubBlock.gif        
if (nameBase.Length < fontName.Length) dot.gif{
InBlock.gif            style 
= fontName.Substring(nameBase.Length);
InBlock.gif            fontName 
= nameBase;
ExpandedSubBlockEnd.gif        }

InBlock.gif        
this.fontName = fontName;
InBlock.gif        encoding 
= CJK_ENCODING;
InBlock.gif        vertical 
= enc.EndsWith("V");
InBlock.gif        CMap 
= enc;
ExpandedSubBlockStart.gifContractedSubBlock.gif        
if (enc.StartsWith("Identity-")) dot.gif{
InBlock.gif            cidDirect 
= true;
InBlock.gif            
string s = cjkFonts[fontName];
InBlock.gif            s 
= s.Substring(0, s.IndexOf('_'));
InBlock.gif            
char[] c = (char[])allCMaps[s];
ExpandedSubBlockStart.gifContractedSubBlock.gif            
if (c == nulldot.gif{
InBlock.gif                c 
= ReadCMap(s);
InBlock.gif                
if (c == null)
InBlock.gif                    
throw new DocumentException("The cmap " + s + " does not exist as a resource.");
InBlock.gif                c[CID_NEWLINE] 
= '\n';
InBlock.gif                allCMaps.Add(s, c);
ExpandedSubBlockEnd.gif            }

InBlock.gif            translationMap 
= c;
ExpandedSubBlockEnd.gif        }

ExpandedSubBlockStart.gifContractedSubBlock.gif        
else dot.gif{
InBlock.gif            
char[] c = (char[])allCMaps[enc];
ExpandedSubBlockStart.gifContractedSubBlock.gif            
if (c == nulldot.gif{
InBlock.gif                
string s = cjkEncodings[enc];
InBlock.gif                
if (s == null)
InBlock.gif                    
throw new DocumentException("The resource cjkencodings.properties does not contain the encoding " + enc);
InBlock.gif                StringTokenizer tk 
= new StringTokenizer(s);
InBlock.gif                
string nt = tk.NextToken();
InBlock.gif                c 
= (char[])allCMaps[nt];
ExpandedSubBlockStart.gifContractedSubBlock.gif                
if (c == nulldot.gif{
InBlock.gif                    c 
= ReadCMap(nt);
InBlock.gif                    allCMaps.Add(nt, c);
ExpandedSubBlockEnd.gif                }

ExpandedSubBlockStart.gifContractedSubBlock.gif                
if (tk.HasMoreTokens()) dot.gif{
InBlock.gif                    
string nt2 = tk.NextToken();
InBlock.gif                    
char[] m2 = ReadCMap(nt2);
ExpandedSubBlockStart.gifContractedSubBlock.gif                    
for (int k = 0; k < 0x10000++k) dot.gif{
InBlock.gif                        
if (m2[k] == 0)
InBlock.gif                            m2[k] 
= c[k];
ExpandedSubBlockEnd.gif                    }

InBlock.gif                    allCMaps.Add(enc, m2);
InBlock.gif                    c 
= m2;
ExpandedSubBlockEnd.gif                }

ExpandedSubBlockEnd.gif            }

InBlock.gif            translationMap 
= c;
ExpandedSubBlockEnd.gif        }

InBlock.gif        fontDesc 
= (Hashtable)allFonts[fontName];
ExpandedSubBlockStart.gifContractedSubBlock.gif        
if (fontDesc == nulldot.gif{
InBlock.gif            fontDesc 
= ReadFontProperties(fontName);
InBlock.gif            allFonts.Add(fontName, fontDesc);
ExpandedSubBlockEnd.gif        }

InBlock.gif        hMetrics 
= (IntHashtable)fontDesc["W"];
InBlock.gif        vMetrics 
= (IntHashtable)fontDesc["W2"];
ExpandedSubBlockEnd.gif    }

InBlock.gif    
InBlock.gif
ExpandedSubBlockStart.gifContractedSubBlock.gif    
/**//** Checks if its a valid CJK font.
InBlock.gif     * @param fontName the font name
InBlock.gif     * @param enc the encoding
InBlock.gif     * @return <CODE>true</CODE> if it is CJK font
ExpandedSubBlockEnd.gif     
*/

ExpandedSubBlockStart.gifContractedSubBlock.gif    
public static bool IsCJKFont(string fontName, string enc) dot.gif{
InBlock.gif        LoadProperties();
InBlock.gif        
string encodings = cjkFonts[fontName];
InBlock.gif        
return (encodings != null && (enc.Equals("Identity-H"|| enc.Equals("Identity-V"|| encodings.IndexOf("_" + enc + "_">= 0));
ExpandedSubBlockEnd.gif    }

InBlock.gif        
ExpandedSubBlockStart.gifContractedSubBlock.gif    
public override int GetWidth(string text) dot.gif{
InBlock.gif        
int total = 0;
ExpandedSubBlockStart.gifContractedSubBlock.gif        
for (int k = 0; k < text.Length; ++k) dot.gif{
InBlock.gif            
int c = text[k];
InBlock.gif            
if (!cidDirect)
InBlock.gif                c 
= translationMap[c];
InBlock.gif            
int v;
InBlock.gif            
if (vertical)
InBlock.gif                v 
= vMetrics[c];
InBlock.gif            
else
InBlock.gif                v 
= hMetrics[c];
InBlock.gif            
if (v > 0)
InBlock.gif                total 
+= v;
InBlock.gif            
else
InBlock.gif                total 
+= 1000;
ExpandedSubBlockEnd.gif        }

InBlock.gif        
return total;
ExpandedSubBlockEnd.gif    }

InBlock.gif    
ExpandedSubBlockStart.gifContractedSubBlock.gif    
internal override int GetRawWidth(int c, string name) dot.gif{
InBlock.gif        
return 0;
ExpandedSubBlockEnd.gif    }

ExpandedSubBlockStart.gifContractedSubBlock.gif    
public override int GetKerning(char char1, char char2) dot.gif{
InBlock.gif        
return 0;
ExpandedSubBlockEnd.gif    }

InBlock.gif
ExpandedSubBlockStart.gifContractedSubBlock.gif    
private PdfDictionary GetFontDescriptor() dot.gif{
InBlock.gif        PdfDictionary dic 
= new PdfDictionary(PdfName.FONTDESCRIPTOR);
InBlock.gif        dic.Put(PdfName.ASCENT, 
new PdfLiteral((String)fontDesc["Ascent"]));
InBlock.gif        dic.Put(PdfName.CAPHEIGHT, 
new PdfLiteral((String)fontDesc["CapHeight"]));
InBlock.gif        dic.Put(PdfName.DESCENT, 
new PdfLiteral((String)fontDesc["Descent"]));
InBlock.gif        dic.Put(PdfName.FLAGS, 
new PdfLiteral((String)fontDesc["Flags"]));
InBlock.gif        dic.Put(PdfName.FONTBBOX, 
new PdfLiteral((String)fontDesc["FontBBox"]));
InBlock.gif        dic.Put(PdfName.FONTNAME, 
new PdfName(fontName + style));
InBlock.gif        dic.Put(PdfName.ITALICANGLE, 
new PdfLiteral((String)fontDesc["ItalicAngle"]));
InBlock.gif        dic.Put(PdfName.STEMV, 
new PdfLiteral((String)fontDesc["StemV"]));
InBlock.gif        PdfDictionary pdic 
= new PdfDictionary();
InBlock.gif        pdic.Put(PdfName.PANOSE, 
new PdfString((String)fontDesc["Panose"], null));
InBlock.gif        dic.Put(PdfName.STYLE, pdic);
InBlock.gif        
return dic;
ExpandedSubBlockEnd.gif    }

InBlock.gif    
ExpandedSubBlockStart.gifContractedSubBlock.gif    
private PdfDictionary GetCIDFont(PdfIndirectReference fontDescriptor, IntHashtable cjkTag) dot.gif{
InBlock.gif        PdfDictionary dic 
= new PdfDictionary(PdfName.FONT);
InBlock.gif        dic.Put(PdfName.SUBTYPE, PdfName.CIDFONTTYPE0);
InBlock.gif        dic.Put(PdfName.BASEFONT, 
new PdfName(fontName + style));
InBlock.gif        dic.Put(PdfName.FONTDESCRIPTOR, fontDescriptor);
InBlock.gif        
int[] keys = cjkTag.ToOrderedKeys();
InBlock.gif        
string w = ConvertToHCIDMetrics(keys, hMetrics);
InBlock.gif        
if (w != null)
InBlock.gif            dic.Put(PdfName.W, 
new PdfLiteral(w));
ExpandedSubBlockStart.gifContractedSubBlock.gif        
if (vertical) dot.gif{
InBlock.gif            w 
= ConvertToVCIDMetrics(keys, vMetrics, hMetrics);;
InBlock.gif            
if (w != null)
InBlock.gif                dic.Put(PdfName.W2, 
new PdfLiteral(w));
ExpandedSubBlockEnd.gif        }

InBlock.gif        
else
InBlock.gif            dic.Put(PdfName.DW, 
new PdfNumber(1000));
InBlock.gif        PdfDictionary cdic 
= new PdfDictionary();
InBlock.gif        cdic.Put(PdfName.REGISTRY, 
new PdfString((string)fontDesc["Registry"], null));
InBlock.gif        cdic.Put(PdfName.ORDERING, 
new PdfString((string)fontDesc["Ordering"], null));
InBlock.gif        cdic.Put(PdfName.SUPPLEMENT, 
new PdfLiteral((string)fontDesc["Supplement"]));
InBlock.gif        dic.Put(PdfName.CIDSYSTEMINFO, cdic);
InBlock.gif        
return dic;
ExpandedSubBlockEnd.gif    }

InBlock.gif    
ExpandedSubBlockStart.gifContractedSubBlock.gif    
private PdfDictionary GetFontBaseType(PdfIndirectReference CIDFont) dot.gif{
InBlock.gif        PdfDictionary dic 
= new PdfDictionary(PdfName.FONT);
InBlock.gif        dic.Put(PdfName.SUBTYPE, PdfName.TYPE0);
InBlock.gif        
string name = fontName;
InBlock.gif        
if (style.Length > 0)
InBlock.gif            name 
+= "-" + style.Substring(1);
InBlock.gif        name 
+= "-" + CMap;
InBlock.gif        dic.Put(PdfName.BASEFONT, 
new PdfName(name));
InBlock.gif        dic.Put(PdfName.ENCODING, 
new PdfName(CMap));
InBlock.gif        dic.Put(PdfName.DESCENDANTFONTS, 
new PdfArray(CIDFont));
InBlock.gif        
return dic;
ExpandedSubBlockEnd.gif    }

InBlock.gif    
ExpandedSubBlockStart.gifContractedSubBlock.gif    
internal override void WriteFont(PdfWriter writer, PdfIndirectReference piref, Object[] parms) dot.gif{
InBlock.gif        IntHashtable cjkTag 
= (IntHashtable)parms[0];
InBlock.gif        PdfIndirectReference ind_font 
= null;
InBlock.gif        PdfObject pobj 
= null;
InBlock.gif        PdfIndirectObject obj 
= null;
InBlock.gif        pobj 
= GetFontDescriptor();
ExpandedSubBlockStart.gifContractedSubBlock.gif        
if (pobj != null)dot.gif{
InBlock.gif            obj 
= writer.AddToBody(pobj);
InBlock.gif            ind_font 
= obj.IndirectReference;
ExpandedSubBlockEnd.gif        }

InBlock.gif        pobj 
= GetCIDFont(ind_font, cjkTag);
ExpandedSubBlockStart.gifContractedSubBlock.gif        
if (pobj != null)dot.gif{
InBlock.gif            obj 
= writer.AddToBody(pobj);
InBlock.gif            ind_font 
= obj.IndirectReference;
ExpandedSubBlockEnd.gif        }

InBlock.gif        pobj 
= GetFontBaseType(ind_font);
InBlock.gif        writer.AddToBody(pobj, piref);
ExpandedSubBlockEnd.gif    }

InBlock.gif    
ExpandedSubBlockStart.gifContractedSubBlock.gif    
private float GetDescNumber(string name) dot.gif{
InBlock.gif        
return int.Parse((string)fontDesc[name]);
ExpandedSubBlockEnd.gif    }

InBlock.gif    
ExpandedSubBlockStart.gifContractedSubBlock.gif    
private float GetBBox(int idx) dot.gif{
InBlock.gif        
string s = (string)fontDesc["FontBBox"];
InBlock.gif        StringTokenizer tk 
= new StringTokenizer(s, " []\r\n\t\f");
InBlock.gif        
string ret = tk.NextToken();
InBlock.gif        
for (int k = 0; k < idx; ++k)
InBlock.gif            ret 
= tk.NextToken();
InBlock.gif        
return int.Parse(ret);
ExpandedSubBlockEnd.gif    }

InBlock.gif    
ExpandedSubBlockStart.gifContractedSubBlock.gif    
/**//** Gets the font parameter identified by <CODE>key</CODE>. Valid values
InBlock.gif     * for <CODE>key</CODE> are <CODE>ASCENT</CODE>, <CODE>CAPHEIGHT</CODE>, <CODE>DESCENT</CODE>
InBlock.gif     * and <CODE>ITALICANGLE</CODE>.
InBlock.gif     * @param key the parameter to be extracted
InBlock.gif     * @param fontSize the font size in points
InBlock.gif     * @return the parameter in points
ExpandedSubBlockEnd.gif     
*/

ExpandedSubBlockStart.gifContractedSubBlock.gif    
public override float GetFontDescriptor(int key, float fontSize) dot.gif{
ExpandedSubBlockStart.gifContractedSubBlock.gif        
switch (key) dot.gif{
InBlock.gif            
case AWT_ASCENT:
InBlock.gif            
case ASCENT:
InBlock.gif                
return GetDescNumber("Ascent"* fontSize / 1000;
InBlock.gif            
case CAPHEIGHT:
InBlock.gif                
return GetDescNumber("CapHeight"* fontSize / 1000;
InBlock.gif            
case AWT_DESCENT:
InBlock.gif            
case DESCENT:
InBlock.gif                
return GetDescNumber("Descent"* fontSize / 1000;
InBlock.gif            
case ITALICANGLE:
InBlock.gif                
return GetDescNumber("ItalicAngle");
InBlock.gif            
case BBOXLLX:
InBlock.gif                
return fontSize * GetBBox(0/ 1000;
InBlock.gif            
case BBOXLLY:
InBlock.gif                
return fontSize * GetBBox(1/ 1000;
InBlock.gif            
case BBOXURX:
InBlock.gif                
return fontSize * GetBBox(2/ 1000;
InBlock.gif            
case BBOXURY:
InBlock.gif                
return fontSize * GetBBox(3/ 1000;
InBlock.gif            
case AWT_LEADING:
InBlock.gif                
return 0;
InBlock.gif            
case AWT_MAXADVANCE:
InBlock.gif                
return fontSize * (GetBBox(2- GetBBox(0)) / 1000;
ExpandedSubBlockEnd.gif        }

InBlock.gif        
return 0;
ExpandedSubBlockEnd.gif    }

InBlock.gif    
ExpandedSubBlockStart.gifContractedSubBlock.gif    
public override string PostscriptFontName dot.gif{
ExpandedSubBlockStart.gifContractedSubBlock.gif        
get dot.gif{
InBlock.gif            
return fontName;
ExpandedSubBlockEnd.gif        }

ExpandedSubBlockStart.gifContractedSubBlock.gif        
set dot.gif{
InBlock.gif            fontName 
= value;
ExpandedSubBlockEnd.gif        }

ExpandedSubBlockEnd.gif    }

InBlock.gif    
ExpandedSubBlockStart.gifContractedSubBlock.gif    
/**//** Gets the full name of the font. If it is a True Type font
InBlock.gif     * each array element will have {Platform ID, Platform Encoding ID,
InBlock.gif     * Language ID, font name}. The interpretation of this values can be
InBlock.gif     * found in the Open Type specification, chapter 2, in the 'name' table.<br>
InBlock.gif     * For the other fonts the array has a single element with {"", "", "",
InBlock.gif     * font name}.
InBlock.gif     * @return the full name of the font
ExpandedSubBlockEnd.gif     
*/

ExpandedSubBlockStart.gifContractedSubBlock.gif    
public override string[][] FullFontName dot.gif{
ExpandedSubBlockStart.gifContractedSubBlock.gif        
get dot.gif{
ExpandedSubBlockStart.gifContractedSubBlock.gif            
return new string[][]dot.gif{new string[] dot.gif{"""""", fontName}};
ExpandedSubBlockEnd.gif        }

ExpandedSubBlockEnd.gif    }

InBlock.gif    
ExpandedSubBlockStart.gifContractedSubBlock.gif    
/**//** Gets the family name of the font. If it is a True Type font
InBlock.gif     * each array element will have {Platform ID, Platform Encoding ID,
InBlock.gif     * Language ID, font name}. The interpretation of this values can be
InBlock.gif     * found in the Open Type specification, chapter 2, in the 'name' table.<br>
InBlock.gif     * For the other fonts the array has a single element with {"", "", "",
InBlock.gif     * font name}.
InBlock.gif     * @return the family name of the font
ExpandedSubBlockEnd.gif     
*/

ExpandedSubBlockStart.gifContractedSubBlock.gif    
public override string[][] FamilyFontName dot.gif{
ExpandedSubBlockStart.gifContractedSubBlock.gif        
get dot.gif{
InBlock.gif            
return this.FullFontName;
ExpandedSubBlockEnd.gif        }

ExpandedSubBlockEnd.gif    }
  
InBlock.gif
ExpandedSubBlockStart.gifContractedSubBlock.gif    
internal static char[] ReadCMap(string name) dot.gif{
InBlock.gif        Stream istr 
= null;
ExpandedSubBlockStart.gifContractedSubBlock.gif        
try dot.gif{
InBlock.gif            name 
= name + ".cmap";
InBlock.gif            istr 
= GetResourceStream(RESOURCE_PATH + name);
InBlock.gif            
char[] c = new char[0x10000];
InBlock.gif            
for (int k = 0; k < 0x10000++k)
InBlock.gif                c[k] 
= (char)((istr.ReadByte() << 8+ istr.ReadByte());
InBlock.gif            
return c;
ExpandedSubBlockEnd.gif        }

ExpandedSubBlockStart.gifContractedSubBlock.gif        
catch dot.gif{
InBlock.gif            
// empty on purpose
ExpandedSubBlockEnd.gif
        }

ExpandedSubBlockStart.gifContractedSubBlock.gif        
finally dot.gif{
ExpandedSubBlockStart.gifContractedSubBlock.gif            
trydot.gif{istr.Close();}catchdot.gif{}
ExpandedSubBlockEnd.gif        }

InBlock.gif
InBlock.gif        
return null;
ExpandedSubBlockEnd.gif    }

InBlock.gif    
ExpandedSubBlockStart.gifContractedSubBlock.gif    
internal static IntHashtable CreateMetric(string s) dot.gif{
InBlock.gif        IntHashtable h 
= new IntHashtable();
InBlock.gif        StringTokenizer tk 
= new StringTokenizer(s);
ExpandedSubBlockStart.gifContractedSubBlock.gif        
while (tk.HasMoreTokens()) dot.gif{
InBlock.gif            
int n1 = int.Parse(tk.NextToken());
InBlock.gif            h[n1] 
= int.Parse(tk.NextToken());
ExpandedSubBlockEnd.gif        }

InBlock.gif        
return h;
ExpandedSubBlockEnd.gif    }

InBlock.gif    
ExpandedSubBlockStart.gifContractedSubBlock.gif    
internal static string ConvertToHCIDMetrics(int[] keys, IntHashtable h) dot.gif{
InBlock.gif        
if (keys.Length == 0)
InBlock.gif            
return null;
InBlock.gif        
int lastCid = 0;
InBlock.gif        
int lastValue = 0;
InBlock.gif        
int start;
ExpandedSubBlockStart.gifContractedSubBlock.gif        
for (start = 0; start < keys.Length; ++start) dot.gif{
InBlock.gif            lastCid 
= keys[start];
InBlock.gif            lastValue 
= h[lastCid];
ExpandedSubBlockStart.gifContractedSubBlock.gif            
if (lastValue != 0dot.gif{
InBlock.gif                
++start;
InBlock.gif                
break;
ExpandedSubBlockEnd.gif            }

ExpandedSubBlockEnd.gif        }

InBlock.gif        
if (lastValue == 0)
InBlock.gif            
return null;
InBlock.gif        StringBuilder buf 
= new StringBuilder();
InBlock.gif        buf.Append(
'[');
InBlock.gif        buf.Append(lastCid);
InBlock.gif        
int state = FIRST;
ExpandedSubBlockStart.gifContractedSubBlock.gif        
for (int k = start; k < keys.Length; ++k) dot.gif{
InBlock.gif            
int cid = keys[k];
InBlock.gif            
int value = h[cid];
InBlock.gif            
if (value == 0)
InBlock.gif                
continue;
ExpandedSubBlockStart.gifContractedSubBlock.gif            
switch (state) dot.gif{
ExpandedSubBlockStart.gifContractedSubBlock.gif                
case FIRST: dot.gif{
ExpandedSubBlockStart.gifContractedSubBlock.gif                    
if (cid == lastCid + 1 && value == lastValue) dot.gif{
InBlock.gif                        state 
= SERIAL;
ExpandedSubBlockEnd.gif                    }

ExpandedSubBlockStart.gifContractedSubBlock.gif                    
else if (cid == lastCid + 1dot.gif{
InBlock.gif                        state 
= BRACKET;
InBlock.gif                        buf.Append(
'[').Append(lastValue);
ExpandedSubBlockEnd.gif                    }

ExpandedSubBlockStart.gifContractedSubBlock.gif                    
else dot.gif{
InBlock.gif                        buf.Append(
'[').Append(lastValue).Append(']').Append(cid);
ExpandedSubBlockEnd.gif                    }

InBlock.gif                    
break;
ExpandedSubBlockEnd.gif                }

ExpandedSubBlockStart.gifContractedSubBlock.gif                
case BRACKET: dot.gif{
ExpandedSubBlockStart.gifContractedSubBlock.gif                    
if (cid == lastCid + 1 && value == lastValue) dot.gif{
InBlock.gif                        state 
= SERIAL;
InBlock.gif                        buf.Append(
']').Append(lastCid);
ExpandedSubBlockEnd.gif                    }

ExpandedSubBlockStart.gifContractedSubBlock.gif                    
else if (cid == lastCid + 1dot.gif{
InBlock.gif                        buf.Append(
' ').Append(lastValue);
ExpandedSubBlockEnd.gif                    }

ExpandedSubBlockStart.gifContractedSubBlock.gif                    
else dot.gif{
InBlock.gif                        state 
= FIRST;
InBlock.gif                        buf.Append(
' ').Append(lastValue).Append(']').Append(cid);
ExpandedSubBlockEnd.gif                    }

InBlock.gif                    
break;
ExpandedSubBlockEnd.gif                }

ExpandedSubBlockStart.gifContractedSubBlock.gif                
case SERIAL: dot.gif{
ExpandedSubBlockStart.gifContractedSubBlock.gif                    
if (cid != lastCid + 1 || value != lastValue) dot.gif{
InBlock.gif                        buf.Append(
' ').Append(lastCid).Append(' ').Append(lastValue).Append(' ').Append(cid);
InBlock.gif                        state 
= FIRST;
ExpandedSubBlockEnd.gif                    }

InBlock.gif                    
break;
ExpandedSubBlockEnd.gif                }

ExpandedSubBlockEnd.gif            }

InBlock.gif            lastValue 
= value;
InBlock.gif            lastCid 
= cid;
ExpandedSubBlockEnd.gif        }

ExpandedSubBlockStart.gifContractedSubBlock.gif        
switch (state) dot.gif{
ExpandedSubBlockStart.gifContractedSubBlock.gif            
case FIRST: dot.gif{
InBlock.gif                buf.Append(
'[').Append(lastValue).Append("]]");
InBlock.gif                
break;
ExpandedSubBlockEnd.gif            }

ExpandedSubBlockStart.gifContractedSubBlock.gif            
case BRACKET: dot.gif{
InBlock.gif                buf.Append(
' ').Append(lastValue).Append("]]");
InBlock.gif                
break;
ExpandedSubBlockEnd.gif            }

ExpandedSubBlockStart.gifContractedSubBlock.gif            
case SERIAL: dot.gif{
InBlock.gif                buf.Append(
' ').Append(lastCid).Append(' ').Append(lastValue).Append(']');
InBlock.gif                
break;
ExpandedSubBlockEnd.gif            }

ExpandedSubBlockEnd.gif        }

InBlock.gif        
return buf.ToString();
ExpandedSubBlockEnd.gif    }

InBlock.gif    
ExpandedSubBlockStart.gifContractedSubBlock.gif    
internal static string ConvertToVCIDMetrics(int[] keys, IntHashtable v, IntHashtable h) dot.gif{
InBlock.gif        
if (keys.Length == 0)
InBlock.gif            
return null;
InBlock.gif        
int lastCid = 0;
InBlock.gif        
int lastValue = 0;
InBlock.gif        
int lastHValue = 0;
InBlock.gif        
int start;
ExpandedSubBlockStart.gifContractedSubBlock.gif        
for (start = 0; start < keys.Length; ++start) dot.gif{
InBlock.gif            lastCid 
= keys[start];
InBlock.gif            lastValue 
= v[lastCid];
ExpandedSubBlockStart.gifContractedSubBlock.gif            
if (lastValue != 0dot.gif{
InBlock.gif                
++start;
InBlock.gif                
break;
ExpandedSubBlockEnd.gif            }

InBlock.gif            
else
InBlock.gif                lastHValue 
= h[lastCid];
ExpandedSubBlockEnd.gif        }

InBlock.gif        
if (lastValue == 0)
InBlock.gif            
return null;
InBlock.gif        
if (lastHValue == 0)
InBlock.gif            lastHValue 
= 1000;
InBlock.gif        StringBuilder buf 
= new StringBuilder();
InBlock.gif        buf.Append(
'[');
InBlock.gif        buf.Append(lastCid);
InBlock.gif        
int state = FIRST;
ExpandedSubBlockStart.gifContractedSubBlock.gif        
for (int k = start; k < keys.Length; ++k) dot.gif{
InBlock.gif            
int cid = keys[k];
InBlock.gif            
int value = v[cid];
InBlock.gif            
if (value == 0)
InBlock.gif                
continue;
InBlock.gif            
int hValue = h[lastCid];
InBlock.gif            
if (hValue == 0)
InBlock.gif                hValue 
= 1000;
ExpandedSubBlockStart.gifContractedSubBlock.gif            
switch (state) dot.gif{
ExpandedSubBlockStart.gifContractedSubBlock.gif                
case FIRST: dot.gif{
ExpandedSubBlockStart.gifContractedSubBlock.gif                    
if (cid == lastCid + 1 && value == lastValue && hValue == lastHValue) dot.gif{
InBlock.gif                        state 
= SERIAL;
ExpandedSubBlockEnd.gif                    }

ExpandedSubBlockStart.gifContractedSubBlock.gif                    
else dot.gif{
InBlock.gif                        buf.Append(
' ').Append(lastCid).Append(' ').Append(-lastValue).Append(' ').Append(lastHValue / 2).Append(' ').Append(V1Y).Append(' ').Append(cid);
ExpandedSubBlockEnd.gif                    }

InBlock.gif                    
break;
ExpandedSubBlockEnd.gif                }

ExpandedSubBlockStart.gifContractedSubBlock.gif                
case SERIAL: dot.gif{
ExpandedSubBlockStart.gifContractedSubBlock.gif                    
if (cid != lastCid + 1 || value != lastValue || hValue != lastHValue) dot.gif{
InBlock.gif                        buf.Append(
' ').Append(lastCid).Append(' ').Append(-lastValue).Append(' ').Append(lastHValue / 2).Append(' ').Append(V1Y).Append(' ').Append(cid);
InBlock.gif                        state 
= FIRST;
ExpandedSubBlockEnd.gif                    }

InBlock.gif                    
break;
ExpandedSubBlockEnd.gif                }

ExpandedSubBlockEnd.gif            }

InBlock.gif            lastValue 
= value;
InBlock.gif            lastCid 
= cid;
InBlock.gif            lastHValue 
= hValue;
ExpandedSubBlockEnd.gif        }

InBlock.gif        buf.Append(
' ').Append(lastCid).Append(' ').Append(-lastValue).Append(' ').Append(lastHValue / 2).Append(' ').Append(V1Y).Append(" ]");
InBlock.gif        
return buf.ToString();
ExpandedSubBlockEnd.gif    }

InBlock.gif    
ExpandedSubBlockStart.gifContractedSubBlock.gif    
internal static Hashtable ReadFontProperties(String name) dot.gif{
ExpandedSubBlockStart.gifContractedSubBlock.gif        
try dot.gif{
InBlock.gif            name 
+= ".properties";
InBlock.gif            Stream isp 
= GetResourceStream(RESOURCE_PATH + name);
InBlock.gif            Properties p 
= new Properties();
InBlock.gif            p.Load(isp);
InBlock.gif            isp.Close();
InBlock.gif            IntHashtable W 
= CreateMetric(p["W"]);
InBlock.gif            p.Remove(
"W");
InBlock.gif            IntHashtable W2 
= CreateMetric(p["W2"]);
InBlock.gif            p.Remove(
"W2");
InBlock.gif            Hashtable map 
= new Hashtable();
ExpandedSubBlockStart.gifContractedSubBlock.gif            
foreach (string key in p) dot.gif{
InBlock.gif                map[key] 
= p[key];
ExpandedSubBlockEnd.gif            }

InBlock.gif            map[
"W"= W;
InBlock.gif            map[
"W2"= W2;
InBlock.gif            
return map;
ExpandedSubBlockEnd.gif        }

ExpandedSubBlockStart.gifContractedSubBlock.gif        
catch dot.gif{
InBlock.gif            
// empty on purpose
ExpandedSubBlockEnd.gif
        }

InBlock.gif        
return null;
ExpandedSubBlockEnd.gif    }

InBlock.gif
ExpandedSubBlockStart.gifContractedSubBlock.gif    
public override char GetUnicodeEquivalent(char c) dot.gif{
InBlock.gif        
if (cidDirect)
InBlock.gif            
return translationMap[c];
InBlock.gif        
return c;
ExpandedSubBlockEnd.gif    }

InBlock.gif    
ExpandedSubBlockStart.gifContractedSubBlock.gif    
public override char GetCidCode(char c) dot.gif{
InBlock.gif        
if (cidDirect)
InBlock.gif            
return c;
InBlock.gif        
return translationMap[c];
ExpandedSubBlockEnd.gif    }

InBlock.gif
ExpandedSubBlockStart.gifContractedSubBlock.gif    
public override bool HasKernPairs() dot.gif{
InBlock.gif        
return false;
ExpandedSubBlockEnd.gif    }

InBlock.gif
ExpandedSubBlockStart.gifContractedSubBlock.gif    
public override bool CharExists(char c) dot.gif{
InBlock.gif        
return translationMap[c] != 0;
ExpandedSubBlockEnd.gif    }

InBlock.gif
ExpandedSubBlockStart.gifContractedSubBlock.gif    
public override bool SetCharAdvance(char c, int advance) dot.gif{
InBlock.gif        
return false;
ExpandedSubBlockEnd.gif    }

InBlock.gif
ExpandedSubBlockStart.gifContractedSubBlock.gif    
public override bool SetKerning(char char1, char char2, int kern) dot.gif{
InBlock.gif        
return false;
ExpandedSubBlockEnd.gif    }

InBlock.gif
ExpandedSubBlockStart.gifContractedSubBlock.gif    
public override int[] GetCharBBox(char c) dot.gif{
InBlock.gif        
return null;
ExpandedSubBlockEnd.gif    }

InBlock.gif
ExpandedSubBlockStart.gifContractedSubBlock.gif    
protected override int[] GetRawCharBBox(int c, String name) dot.gif{
InBlock.gif        
return null;
ExpandedSubBlockEnd.gif    }

ExpandedSubBlockEnd.gif}

ExpandedBlockEnd.gif}

主要是增加了三个public的方法,方便在程序中调用,还有CJKFont类由internal改为public

调用的例子:
ContractedBlock.gif ExpandedBlockStart.gif Demo
None.gifusing System;
None.gif
using iTextSharp.text;
None.gif
using iTextSharp.text.pdf;
None.gif
using System.IO;
None.gif
None.gif
namespace cjk
ExpandedBlockStart.gifContractedBlock.gif
dot.gif{
ExpandedSubBlockStart.gifContractedSubBlock.gif    
/**//// <summary>
InBlock.gif    
/// Class1 的摘要说明。
ExpandedSubBlockEnd.gif    
/// </summary>

InBlock.gif    class Class1
ExpandedSubBlockStart.gifContractedSubBlock.gif    
dot.gif{
InBlock.gif
InBlock.gif        
private static string CJK_RESOURCE_PATH=@"E:\java\cjkfonts\";
ExpandedSubBlockStart.gifContractedSubBlock.gif        
/**//// <summary>
InBlock.gif        
/// 应用程序的主入口点。
ExpandedSubBlockEnd.gif        
/// </summary>

InBlock.gif        [STAThread]
InBlock.gif        
static void Main(string[] args)
ExpandedSubBlockStart.gifContractedSubBlock.gif        
dot.gif{
InBlock.gif            Console.WriteLine(
"Japanese characters.");
InBlock.gif
InBlock.gif            Document document 
= new Document();
InBlock.gif            Document.Compress 
= false;
InBlock.gif            
try 
ExpandedSubBlockStart.gifContractedSubBlock.gif            
dot.gif{
InBlock.gif                PdfWriter.GetInstance(document, 
new FileStream(@"E:\java\Japanese.pdf",FileMode.Create));
InBlock.gif                document.Open();
InBlock.gif
InBlock.gif
InBlock.gif                CJKFont.LoadProperties(CJK_RESOURCE_PATH);
InBlock.gif                CJKFont.AddCMap(CJK_RESOURCE_PATH,
"UniJIS-UCS2-H");
InBlock.gif                CJKFont.AddFontProperties(CJK_RESOURCE_PATH,
"HeiseiMin-W3");
InBlock.gif                CJKFont.AddCMap(CJK_RESOURCE_PATH,
"UniGB-UCS2-H");
InBlock.gif                CJKFont.AddFontProperties(CJK_RESOURCE_PATH,
"STSong-Light");
InBlock.gif
InBlock.gif                BaseFont bf 
= BaseFont.CreateFont("STSong-Light","UniGB-UCS2-H",BaseFont.NOT_EMBEDDED); 
InBlock.gif                BaseFont baseFont 
= BaseFont.CreateFont("HeiseiMin-W3""UniJIS-UCS2-H", BaseFont.NOT_EMBEDDED);
InBlock.gif                
InBlock.gif                Font font 
= new Font(baseFont, 12, Font.NORMAL);
InBlock.gif                Font font1
=new Font(bf,12,Font.NORMAL);
InBlock.gif                document.Add(
new Paragraph("顽石",font1));
InBlock.gif                document.Add(
new Paragraph("偙傫偵偪偼!", font));
ExpandedSubBlockEnd.gif            }

InBlock.gif            
catch (Exception ee)
ExpandedSubBlockStart.gifContractedSubBlock.gif            
dot.gif{
InBlock.gif                Console.WriteLine(ee.Message);
ExpandedSubBlockEnd.gif            }

InBlock.gif            document.Close();
InBlock.gif
ExpandedSubBlockEnd.gif        }

ExpandedSubBlockEnd.gif    }

ExpandedBlockEnd.gif}

None.gif
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值