Ejemplo n.º 1
0
 /// <summary>
 /// Gets the resource name of the specified font within this page.
 /// </summary>
 internal string GetFontName(XFont font, out PdfFont pdfFont)
 {
     pdfFont = _document.FontTable.GetFont(font);
     Debug.Assert(pdfFont != null);
     string name = Resources.AddFont(pdfFont);
     return name;
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Gets the resource name of the specified font data within this form XObject.
        /// </summary>
        internal string GetFontName(string idName, byte[] fontData, out PdfFont pdfFont)
        {
            pdfFont = _document.FontTable.GetFont(idName, fontData);
            Debug.Assert(pdfFont != null);
            string name = Resources.AddFont(pdfFont);

            return(name);
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Tries to get the resource name of the specified font data within this page.
 /// Returns null if no such font exists.
 /// </summary>
 internal string TryGetFontName(string idName, out PdfFont pdfFont)
 {
     pdfFont = _document.FontTable.TryGetFont(idName);
     string name = null;
     if (pdfFont != null)
         name = Resources.AddFont(pdfFont);
     return name;
 }
Ejemplo n.º 4
0
        /// <summary>
        /// Gets the resource name of the specified font within this page.
        /// </summary>
        public string GetFontName(XFont font, out PdfFont pdfFont)
        {
            pdfFont = this.document.FontTable.GetFont(font);
            Debug.Assert(pdfFont != null);
            string name = Resources.AddFont(pdfFont);

            return(name);
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Gets the resource name of the specified font within this form.
        /// </summary>
        internal string GetFontName(XFont font, out PdfFont pdfFont)
        {
            Debug.Assert(IsTemplate, "This function is for form templates only.");
            pdfFont = _document.FontTable.GetFont(font);
            Debug.Assert(pdfFont != null);
            string name = Resources.AddFont(pdfFont);

            return(name);
        }
Ejemplo n.º 6
0
 /// <summary>
 /// Gets the resource name of the specified font data within this page.
 /// </summary>
 internal string GetFontName(string idName, byte[] fontData, out PdfFont pdfFont)
 {
     pdfFont = _document.FontTable.GetFont(idName, fontData);
     //pdfFont = new PdfType0Font(Owner, idName, fontData);
     //pdfFont.Document = _document;
     Debug.Assert(pdfFont != null);
     string name = Resources.AddFont(pdfFont);
     return name;
 }
Ejemplo n.º 7
0
        /// <summary>
        /// Gets the resource name of the specified font data within this form.
        /// </summary>
        internal string GetFontName(string idName, byte[] fontData, out PdfFont pdfFont)
        {
            Debug.Assert(IsTemplate, "This function is for form templates only.");
            pdfFont = _document.FontTable.GetFont(idName, fontData);
            //pdfFont = new PdfType0Font(Owner, idName, fontData);
            //pdfFont.Document = _document;
            Debug.Assert(pdfFont != null);
            string name = Resources.AddFont(pdfFont);

            return(name);
        }
Ejemplo n.º 8
0
        /// <summary>
        /// Tries to get the resource name of the specified font data within this page.
        /// Returns null if no such font exists.
        /// </summary>
        public string TryGetFontName(string idName, out PdfFont pdfFont)
        {
            pdfFont = this.document.FontTable.TryGetFont(idName);
            string name = null;

            if (pdfFont != null)
            {
                name = Resources.AddFont(pdfFont);
            }
            return(name);
        }
Ejemplo n.º 9
0
        public void SetFontName(XFont font)
        {
            if (AddedFonts == null)
            {
                AddedFonts = new Dictionary <string, PdfFont>();
            }
            PdfFont pdfFont = _document.FontTable.GetFont(font);
            string  name    = Resources.AddFont(pdfFont);

            AddedFonts.Add(name, pdfFont);
        }
Ejemplo n.º 10
0
        /// <summary>
        /// Tries to get the resource name of the specified font data within this form.
        /// Returns null if no such font exists.
        /// </summary>
        internal string TryGetFontName(string idName, out PdfFont pdfFont)
        {
            Debug.Assert(IsTemplate, "This function is for form templates only.");
            pdfFont = _document.FontTable.TryGetFont(idName);
            string name = null;

            if (pdfFont != null)
            {
                name = Resources.AddFont(pdfFont);
            }
            return(name);
        }
Ejemplo n.º 11
0
        /// <summary>
        /// Gets the resource name of the specified font within this page.
        /// </summary>
        internal string GetFontName(XFont font, out PdfFont pdfFont)
        {
            pdfFont = _document.FontTable.GetFont(font);
            Debug.Assert(pdfFont != null);
            if (font.FromDocument && !String.IsNullOrEmpty(font.DocumentFontName))
            {
                return(font.DocumentFontName);
            }
            string name = Resources.AddFont(pdfFont);

            return(name);
        }
Ejemplo n.º 12
0
        /// <summary>
        /// Gets the resource name of the specified font within this form.
        /// </summary>
        internal string GetFontName(XFont font, out PdfFont pdfFont)
        {
            Debug.Assert(IsTemplate, "This function is for form templates only.");
            pdfFont = _document.FontTable.GetFont(font);
            Debug.Assert(pdfFont != null);
            if (font.FromDocument && !String.IsNullOrEmpty(font.DocumentFontName))
            {
                return(font.DocumentFontName);
            }
            string name = Resources.AddFont(pdfFont);

            return(name);
        }
Ejemplo n.º 13
0
        /// <summary>
        /// Gets the resource name of the specified font within this form.
        /// </summary>
        internal string GetFontName(XFont font, out PdfFont pdfFont)
        {
            Debug.Assert(IsTemplate, "This function is for form templates only.");
            string name = GetFontNameFromResources(font.FamilyName, font.Bold, font.Italic);

            if (string.IsNullOrEmpty(name)) //sure go ahead and try your broken embedding
            {
                pdfFont = _document.FontTable.GetFont(font);
                Debug.Assert(pdfFont != null);
                name = Resources.AddFont(pdfFont);
            }
            else
            {
                pdfFont = GetFontFromResources(font);
                Debug.Assert(pdfFont != null);
            }
            return(name);
        }