public RtfDocument(PaperSize paper, PaperOrientation orientation, Lcid lcid) { _paper = paper; _orientation = orientation; _margins = new Margins(); if (_orientation == PaperOrientation.Portrait) { _margins[Direction.Top] = DefaultValue.MarginSmall; _margins[Direction.Right] = DefaultValue.MarginLarge; _margins[Direction.Bottom] = DefaultValue.MarginSmall; _margins[Direction.Left] = DefaultValue.MarginLarge; } else // landscape { _margins[Direction.Top] = DefaultValue.MarginLarge; _margins[Direction.Right] = DefaultValue.MarginSmall; _margins[Direction.Bottom] = DefaultValue.MarginLarge; _margins[Direction.Left] = DefaultValue.MarginSmall; } _lcid = lcid; _fontTable = new List <string>(); _fontTable.Add(DefaultValue.Font); // default font _colorTable = new List <Color>(); _colorTable.Add(new Color()); // default color _header = null; _footer = null; }
public RtfDocument(PaperSize paper, PaperOrientation orientation, Lcid lcid) { _paper = paper; _orientation = orientation; _margins = new Margins(); if (_orientation == PaperOrientation.Portrait) { _margins[Direction.Top] = DefaultValue.MarginSmall; _margins[Direction.Right] = DefaultValue.MarginLarge; _margins[Direction.Bottom] = DefaultValue.MarginSmall; _margins[Direction.Left] = DefaultValue.MarginLarge; } else { // landscape _margins[Direction.Top] = DefaultValue.MarginLarge; _margins[Direction.Right] = DefaultValue.MarginSmall; _margins[Direction.Bottom] = DefaultValue.MarginLarge; _margins[Direction.Left] = DefaultValue.MarginSmall; } _lcid = lcid; _fontTable = new List<string>(); _fontTable.Add(DefaultValue.Font); // default font _colorTable = new List<Color>(); _colorTable.Add(new Color()); // default color _header = null; _footer = null; }