TextBuilder.AppendParagraph

TextBuilder.AppendParagraph metodu

Pdf sayfasına metin paragrafı ekler.

public void AppendParagraph(TextParagraph textParagraph)
ParametreTürAçıklama
textParagraphTextParagraphMetin paragrafı nesnesi.

Örnekler

Örnek, metin paragrafı nesnesi oluşturmayı ve bunu Pdf sayfasına eklemeyi gösterir.

Document doc = new Document(inFile);

Page page = (Page)doc.Pages[1];

// create text paragraph
TextParagraph paragraph = new TextParagraph();
           
// set the paragraph rectangle
paragraph.Rectangle = new Rectangle(100, 600, 200, 700);

// set word wrapping options
paragraph.FormattingOptions.WrapMode = TextFormattingOptions.WordWrapMode.ByWords;

// append string lines
paragraph.AppendLine("the quick brown fox jumps over the lazy dog");
paragraph.AppendLine("line2");
paragraph.AppendLine("line3");

// append the paragraph to the Pdf page with the TextBuilder
TextBuilder textBuilder = new TextBuilder(page);
textBuilder.AppendParagraph(paragraph);

// save Pdf document
doc.Save(outFile);

Ayrıca Bakınız