iTextSharp.text.pdf.hyphenation.HyphenationTree.LoadSimplePatterns C# (CSharp) Method

LoadSimplePatterns() public method

public LoadSimplePatterns ( Stream stream ) : void
stream Stream
return void
        public void LoadSimplePatterns(Stream stream)
        {
            SimplePatternParser pp = new SimplePatternParser();
            ivalues = new TernaryTree();

            pp.Parse(stream, this);

            // patterns/values should be now in the tree
            // let's optimize a bit
            TrimToSize();
            vspace.TrimToSize();
            classmap.TrimToSize();

            // get rid of the auxiliary map
            ivalues = null;
        }

Usage Example

コード例 #1
0
 /**
  * @param key
  * @return a hyphenation tree
  */
 public static HyphenationTree GetResourceHyphenationTree(String key)
 {
     try {
         Stream stream = BaseFont.GetResourceStream(defaultHyphLocation + key + ".xml");
         if (stream == null && key.Length > 2)
         {
             stream = BaseFont.GetResourceStream(defaultHyphLocation + key.Substring(0, 2) + ".xml");
         }
         if (stream == null)
         {
             return(null);
         }
         HyphenationTree hTree = new HyphenationTree();
         hTree.LoadSimplePatterns(stream);
         return(hTree);
     }
     catch {
         return(null);
     }
 }
All Usage Examples Of iTextSharp.text.pdf.hyphenation.HyphenationTree::LoadSimplePatterns