本文整理汇总了C#中iTextSharp.text.Paragraph.Process方法的典型用法代码示例。如果您正苦于以下问题:C# Paragraph.Process方法的具体用法?C# Paragraph.Process怎么用?C# Paragraph.Process使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类iTextSharp.text.Paragraph
的用法示例。
在下文中一共展示了Paragraph.Process方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: WriteParagraph
/**
* Write the beginning of a new <code>Paragraph</code>
*
* @param paragraphElement The <code>Paragraph</code> to be written
* @param outp The <code>MemoryStream</code> to write to
*
* @throws IOException
*/
private void WriteParagraph(Paragraph paragraphElement, MemoryStream outp)
{
outp.WriteByte(escape);
outp.Write(paragraphDefaults, 0, paragraphDefaults.Length);
if (inTable) {
outp.WriteByte(escape);
outp.Write(RtfCell.cellInTable, 0, RtfCell.cellInTable.Length);
}
switch (paragraphElement.Alignment) {
case Element.ALIGN_LEFT:
outp.WriteByte(escape);
outp.Write(alignLeft, 0, alignLeft.Length);
break;
case Element.ALIGN_RIGHT:
outp.WriteByte(escape);
outp.Write(alignRight, 0, alignRight.Length);
break;
case Element.ALIGN_CENTER:
outp.WriteByte(escape);
outp.Write(alignCenter, 0, alignCenter.Length);
break;
case Element.ALIGN_JUSTIFIED:
case Element.ALIGN_JUSTIFIED_ALL:
outp.WriteByte(escape);
outp.Write(alignJustify, 0, alignJustify.Length);
break;
}
outp.WriteByte(escape);
outp.Write(listIndent, 0, listIndent.Length);
WriteInt(outp, (int) (paragraphElement.IndentationLeft * TWIPSFACTOR));
outp.WriteByte(escape);
outp.Write(rightIndent, 0, rightIndent.Length);
WriteInt(outp, (int) (paragraphElement.IndentationRight * TWIPSFACTOR));
foreach (Chunk ch in paragraphElement.Chunks) {
ch.Font = paragraphElement.Font.Difference(ch.Font);
}
MemoryStream save = content;
content = outp;
paragraphElement.Process(this);
content = save;
if (!inTable) {
outp.WriteByte(escape);
outp.Write(paragraph, 0, paragraph.Length);
}
}