Skip to content

Latest commit

 

History

History
29 lines (21 loc) · 641 Bytes

Images.md

File metadata and controls

29 lines (21 loc) · 641 Bytes

Images

Shows how to use images in MigraDocCore documents.

Code

/// <summary>
/// Creates an absolutely minimalistic document.
/// </summary>
static Document CreateDocument()
{
    // Create a new MigraDocCore document
    Document document = new Document();
    
    // Add a section to the document
    Section section = document.AddSection();
    
    // Add a paragraph to the section
    Paragraph paragraph = section.AddParagraph();
    
    // Add some text to the paragraph
    paragraph.AddFormattedText("Hello, World!", TextFormat.Italic);
    section.AddImage("../../SomeImage.png");
    
    return document;
}