本文整理汇总了C#中iTextSharp.text.rtf.document.RtfDocument.GetDocumentHeader方法的典型用法代码示例。如果您正苦于以下问题:C# RtfDocument.GetDocumentHeader方法的具体用法?C# RtfDocument.GetDocumentHeader怎么用?C# RtfDocument.GetDocumentHeader使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类iTextSharp.text.rtf.document.RtfDocument
的用法示例。
在下文中一共展示了RtfDocument.GetDocumentHeader方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SetRtfDocument
/**
* Sets the RtfDocument this RtfFont belongs to
*
* @param doc The RtfDocument to use
*/
public void SetRtfDocument(RtfDocument doc) {
this.document = doc;
if (document != null) {
this.fontNumber = document.GetDocumentHeader().GetFontNumber(this);
}
if (this.color != null) {
this.color.SetRtfDocument(this.document);
}
}
示例2: RtfFont
/**
* Constructs a RtfFont from a com.lowagie.text.Font
* @param doc The RtfDocument this font appears in
* @param font The Font to use as a base
*/
public RtfFont(RtfDocument doc, Font font) {
this.document = doc;
if (font != null) {
if (font is RtfFont) {
this.fontName = ((RtfFont) font).GetFontName();
this.charset = ((RtfFont) font).GetCharset();
} else {
SetToDefaultFamily(font.Familyname);
}
if (font.BaseFont != null) {
String[][] fontNames = font.BaseFont.FullFontName;
for (int i = 0; i < fontNames.Length; i++) {
if (fontNames[i][2].Equals("0")) {
this.fontName = fontNames[i][3];
break;
} else if (fontNames[i][2].Equals("1033") || fontNames[i][2].Equals("")) {
this.fontName = fontNames[i][3];
}
}
}
Size = font.Size;
SetStyle(font.Style);
Color = font.Color;
if(document != null) {
this.fontNumber = document.GetDocumentHeader().GetFontNumber(this);
}
}
if (Util.EqualsIgnoreCase(this.fontName, "unknown")) {
return;
}
if (document != null) {
SetRtfDocument(document);
}
}