Пример #1
0
		public void SaveDocument(MobiDocument document, string saveFilePath)
		{

			using (var fs = File.OpenWrite(saveFilePath))
			{
				document.Write(fs, saveFilePath);
			}
		}
Пример #2
0
		public MobiDocument LoadDocument(string filePath)
		{

			var document = new MobiDocument(filePath);

			using (var fs = new FileStream(filePath, FileMode.Open, FileAccess.Read))
			{
				document.PdbHeader = new PdbHeader(fs);
				document.MobiHeader = new MobiHeader(fs, document.PdbHeader.MobiHeaderSize);
			}

			return document;
		}