internal override void UpdateFile() { string text = CreateHtmlTOC(); if (!string.IsNullOrEmpty(fileOutName) || !string.IsNullOrEmpty(text)) { fileOutStream = text.ToStream(); UpdateZip(); if (CreateTOCNeeded) { //We need to add the new file inside the spine and manifest and guide OpfDocument doc = new OpfDocument(); string file = Variables.OPFpath.Length == 0 ? fileOutName : fileOutName.Replace(Variables.OPFpath, ""); doc.AddTOCContentRef(file); doc.AddHtmlFile(file);//Will also add the spine option } Utils.NewFilename(); } }