iTextSharp.text.pdf.CMapAwareDocumentFont.Decode C# (CSharp) Метод

Decode() публичный Метод

public Decode ( byte cidbytes, int offset, int len ) : String
cidbytes byte
offset int
len int
Результат String
        public String Decode(byte[] cidbytes, int offset, int len)
        {
            StringBuilder sb = new StringBuilder();
            if (toUnicodeCmap == null && byteCid != null) {
                CMapSequence seq = new CMapSequence(cidbytes, offset, len);
                String cid = byteCid.DecodeSequence(seq);
                foreach (char ca in cid) {
                    int c = cidUni.Lookup(ca);
                    if (c > 0)
                        sb.Append(Utilities.ConvertFromUtf32(c));
                }
            }
            else {
                for (int i = offset; i < offset + len; i++){
                    String rslt = DecodeSingleCID(cidbytes, i, 1);
                    if (rslt == null && i < offset + len - 1){
                        rslt = DecodeSingleCID(cidbytes, i, 2);
                        i++;
                    }
                    if (rslt != null)
                        sb.Append(rslt);
                }
            }
            return sb.ToString();
        }