// ReSharper restore MemberCanBePrivate.Global #endregion #region Constructors /// <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 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); }