/// <summary> /// Initialize instance /// </summary> public DocumentWriter() { Info = new Hashtable(); DebugMode = true; CollectionInfo = true; ColorTable = new ColorTable(); ListOverrideTable = new ListOverrideTable(); ListTable = new ListTable(); FontTable = new Table(); ColorTable.CheckValueExistWhenAdd = true; }
/// <summary> /// Initialize instance from a file /// </summary> /// <param name="fileName"></param> public DocumentWriter(string fileName) { Info = new Hashtable(); DebugMode = true; CollectionInfo = true; ColorTable = new ColorTable(); ListOverrideTable = new ListOverrideTable(); ListTable = new ListTable(); FontTable = new Table(); ColorTable.CheckValueExistWhenAdd = true; // ReSharper disable once DoNotCallOverridableMethodsInConstructor Open(fileName); }
/// <summary> /// initialize instance /// </summary> public DomDocument() { DefaultRowHeight = 400; FooterDistance = 720; HeaderDistance = 720; BottomMargin = 1440; RightMargin = 1800; TopMargin = 1440; LeftMargin = 1800; PaperHeight = 15840; PaperWidth = 12240; Info = new DocumentInfo(); ListOverrideTable = new ListOverrideTable(); ListTable = new ListTable(); ColorTable = new ColorTable(); FontTable = new Table(); ChangeTimesNewRoman = false; Generator = null; LeadingChars = null; FollowingChars = null; OwnerDocument = this; }
/// <summary> /// Clone object /// </summary> /// <returns>new object</returns> public Table Clone() { var table = new Table(); foreach (Font item in this) { var newItem = item.Clone(); table.List.Add(newItem); } return table; }
/// <summary> /// Initialize instance from a stream /// </summary> /// <param name="stream"></param> public DocumentWriter(Stream stream) { Info = new Hashtable(); DebugMode = true; CollectionInfo = true; ColorTable = new ColorTable(); ListOverrideTable = new ListOverrideTable(); ListTable = new ListTable(); FontTable = new Table(); ColorTable.CheckValueExistWhenAdd = true; var writer = new StreamWriter(stream, Encoding.ASCII); // ReSharper disable once DoNotCallOverridableMethodsInConstructor Open(writer); }