public override void Flush()
        {
            if (IsFlushed())
            {
                return;
            }
            EnsureUnderlyingObjectHasIndirectReference();
            if (((Type3Font)GetFontProgram()).GetNumberOfGlyphs() < 1)
            {
                throw new PdfException("No glyphs defined for type3 font.");
            }
            PdfDictionary charProcs = new PdfDictionary();

            for (int i = 0; i < 256; i++)
            {
                if (fontEncoding.CanDecode(i))
                {
                    Type3Glyph glyph = GetType3Glyph(fontEncoding.GetUnicode(i));
                    if (glyph != null)
                    {
                        charProcs.Put(new PdfName(fontEncoding.GetDifference(i)), glyph.GetContentStream());
                        glyph.GetContentStream().Flush();
                    }
                }
            }
            GetPdfObject().Put(PdfName.CharProcs, charProcs);
            GetPdfObject().Put(PdfName.FontMatrix, new PdfArray(GetFontMatrix()));
            GetPdfObject().Put(PdfName.FontBBox, new PdfArray(fontProgram.GetFontMetrics().GetBbox()));
            String fontName = fontProgram.GetFontNames().GetFontName();

            base.FlushFontData(fontName, PdfName.Type3);
            //BaseFont is not listed as key in Type 3 font specification.
            GetPdfObject().Remove(PdfName.BaseFont);
            base.Flush();
        }
        public override void Flush()
        {
            if (((Type3FontProgram)GetFontProgram()).GetGlyphsCount() < 1)
            {
                throw new PdfException("no.glyphs.defined.fo r.type3.font");
            }
            PdfDictionary charProcs = new PdfDictionary();

            for (int i = 0; i < 256; i++)
            {
                if (fontEncoding.CanDecode(i))
                {
                    Type3Glyph glyph = GetType3Glyph(fontEncoding.GetUnicode(i));
                    charProcs.Put(new PdfName(fontEncoding.GetDifference(i)), glyph.GetContentStream());
                    glyph.GetContentStream().Flush();
                }
            }
            GetPdfObject().Put(PdfName.CharProcs, charProcs);
            GetPdfObject().Put(PdfName.FontMatrix, new PdfArray(GetFontMatrix()));
            GetPdfObject().Put(PdfName.FontBBox, new PdfArray(fontProgram.GetFontMetrics().GetBbox()));
            base.FlushFontData(null, PdfName.Type3);
            base.Flush();
        }