Ejemplo n.º 1
0
        private void setTextAttributes()
        {
            if (Owner != null)
            {
                if (_font != null && _fontColor != null)
                {
                    string fnt = Owner.AddFontAcroForm(_font);
                    string tmp = '/' + fnt + ' ' + StringUtility.GetString(_font.Size) + " Tf " + _fontColor;
                    switch (_fontColor.Colorspace.N)
                    {
                    case 1:
                        tmp += " g";
                        break;

                    case 3:
                        tmp += " rg";
                        break;

                    case 4:
                        tmp += " k";
                        break;
                    }

                    Dictionary.AddItem("DA", new PDFString(System.Text.Encoding.ASCII.GetBytes(tmp), false));
                }
            }
        }