| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
SharpPlot Tutorials General Tutorials Chart Samples Style Examples SharpLeaf Tutorials Document Layout Tutorials Text Flow Tutorials Table Tutorials Visual Glossaries SharpPlot Reference SharpPlot Class SharpPlot Properties SharpPlot Methods SharpPlot Structures SharpPlot Enumerations PageMap Class SharpLeaf Properties SharpLeaf Methods Table Class Table Properties Table Methods SharpLeaf Structures FontType Structure ParagraphStyle Structure BoxStyle Structure SharpLeaf Enumerations DocumentLayout Classes DocumentLayout Class PageLayout Class PageElement Abstract Class Frame : PageElement Class TextBlock : PageElement Class ImageBlock : PageElement Class Box : PageElement Class Rule : PageElement Class Common Reference Document Class VectorMath Class DbUtil Class Download Release Notes Licensing |
SharpLeaf Reference > SharpLeaf Class SharpLeaf ClassThe SharpLeaf class allows the creation of automated reports. public class SharpLeaf ExampleA SharpLeaf report is generally accomplished in 3 phases:
para = "Here's a dummy paragraph of text. As the qualifier suggests its content is "+ "not particularly interesting, but it still reaches its goal of being long "+ "enough to take up more than one line."; // Define document layouts page = new PageLayout(PaperSize.Landscape(PaperSize.A5)); page.Add(new Frame("Main",36,36,-36,-36)); // Half-inch margin all around invisible frame layout = new DocumentLayout(page); // Define paragraph styles body = new ParagraphStyle(); body.IndentFirst = 36; body.SpaceAfter = -1; // Equivalent of one empty line of text after each paragraph title = body.Clone(); // take a deep copy title.Font = new FontType("Garamond",15,FontStyle.Bold,Color.Navy); title.SpaceBefore = -2; // Leave room before a title - unless at top of frame title.BookmarkLevel = 1; // Automatically bookmark titles at top level // Start flowing lf = new SharpLeaf(layout); lf.AddParagraphs("First title",title); lf.AddParagraphs(new string[]{para,para},body); lf.AddParagraphs("Second title",title); lf.AddParagraphs(new string[]{para,para,para},body); // Render lf.SavePdf("myreport.pdf",PdfMode.ShowOutlines); Have a look at the SharpLeaf tutorials for more examples.
SharpLeaf Instance Properties
SharpLeaf Methods
See alsoSharpLeaf Tutorials | Text Flow Tutorials RequirementsNamespace: Causeway Assembly: SharpPlot (in sharpplot.dll) |