public SetRtfDocument ( |
||
doc | ||
return | void |
/** * Imports a font. The font name is looked up in the RtfDocumentHeader and * then the mapping from original font number to actual font number is added. * * @param fontNr The original font number. * @param fontName The font name to look up. */ public void ImportFont(String fontNr, String fontName) { iTextSharp.text.rtf.style.RtfFont rtfFont = new iTextSharp.text.rtf.style.RtfFont(fontName); rtfFont.SetRtfDocument(this.rtfDoc); this.importFontMapping[fontNr] = this.rtfDoc.GetDocumentHeader().GetFontNumber(rtfFont).ToString(); }
/** * Imports a font. The font name is looked up in the RtfDocumentHeader and * then the mapping from original font number to actual font number is added. * * @param fontNr The original font number. * @param fontName The font name to look up. * @param charset The characterset to use for the font. */ public bool ImportFont(String fontNr, String fontName, String fontFamily, int charset) { RtfFont rtfFont = new RtfFont(fontName); if (charset>= 0) rtfFont.SetCharset(charset); if (fontFamily != null && fontFamily.Length > 0) rtfFont.SetFamily(fontFamily); rtfFont.SetRtfDocument(this.rtfDoc); this.importFontMapping[fontNr] = this.rtfDoc.GetDocumentHeader().GetFontNumber(rtfFont).ToString(); return true; }
/// <summary> /// Sets the RtfDocument this RtfElement belongs to /// </summary> /// <param name="doc">The RtfDocument to use</param> public void SetRtfDocument(RtfDocument doc) { Document = doc; _font.SetRtfDocument(Document); }
/** * Imports a font. The font name is looked up in the RtfDocumentHeader and * then the mapping from original font number to actual font number is added. * * @param fontNr The original font number. * @param fontName The font name to look up. */ public bool ImportFont(String fontNr, String fontName) { RtfFont rtfFont = new RtfFont(fontName); if (rtfFont != null){ rtfFont.SetRtfDocument(this.rtfDoc); this.importFontMapping[fontNr] = this.rtfDoc.GetDocumentHeader().GetFontNumber(rtfFont).ToString(); return true; } else { return false; } }
/** * Imports a font. The font name is looked up in the RtfDocumentHeader and * then the mapping from original font number to actual font number is added. * * @param fontNr The original font number. * @param fontName The font name to look up. */ public void ImportFont(String fontNr, String fontName) { iTextSharp.text.rtf.style.RtfFont rtfFont = new iTextSharp.text.rtf.style.RtfFont(fontName); rtfFont.SetRtfDocument(this.rtfDoc); this.importFontMapping[fontNr] = this.rtfDoc.GetDocumentHeader().GetFontNumber(rtfFont).ToString(); }