Document

DocumentBase.Document property

Hämtar denna instans.

public override DocumentBase Document { get; }

Exempel

Visar hur man skapar ett enkelt dokument.

Document doc = new Document();

// Nya dokumentobjekt levereras som standard med den minimala uppsättningen noder
// krävs för att börja lägga till innehåll som text och former: ett avsnitt, en brödtext och ett stycke.
doc.AppendChild(new Section(doc))
    .AppendChild(new Body(doc))
    .AppendChild(new Paragraph(doc))
    .AppendChild(new Run(doc, "Hello world!"));

Se även