Exemple #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));
                }
            }
        }
Exemple #2
0
        /// <summary>
        /// Returns a System.String that represents the current Bytescout.PDF.ColorRGB.
        /// </summary>
        /// <returns cref="string" href="http://msdn.microsoft.com/en-us/library/system.string.aspx">A System.String that represents the current Bytescout.PDF.ColorRGB.</returns>
        public override string ToString()
        {
            string member = StringUtility.GetString(_r * 1.0f / 255) + ' ' +
                            StringUtility.GetString(_g * 1.0f / 255) + ' ' +
                            StringUtility.GetString(_b * 1.0f / 255);

            return(member);
        }
Exemple #3
0
        /// <summary>
        /// Returns a System.String that represents the current Bytescout.PDF.ColorCMYK.
        /// </summary>
        /// <returns cref="string" href="http://msdn.microsoft.com/en-us/library/system.string.aspx">A System.String that represents the current Bytescout.PDF.ColorCMYK.</returns>
        public override string ToString()
        {
            string member = StringUtility.GetString(_c * 1.0f / 255) + ' ' +
                            StringUtility.GetString(_m * 1.0f / 255) + ' ' +
                            StringUtility.GetString(_y * 1.0f / 255) + ' ' +
                            StringUtility.GetString(_k * 1.0f / 255);

            return(member);
        }
Exemple #4
0
 /// <summary>
 /// Returns a System.String that represents the current Bytescout.PDF.ColorGray.
 /// </summary>
 /// <returns cref="string" href="http://msdn.microsoft.com/en-us/library/system.string.aspx">A System.String that represents the current Bytescout.PDF.ColorGray.</returns>
 public override string ToString()
 {
     return(StringUtility.GetString(_g * 1.0f / 255));
 }