protected override void ConvertContent(FB2File fb2File, IEpubFile epubFile)
 {
     var epubFileV3 = epubFile as EPubFileV3;
     if (epubFileV3 == null)
     {
         throw new ArrayTypeMismatchException(string.Format("Invalid ePub object type passed, expected EPubFileV3, got {0}",epubFile.GetType()));
     }
     _referencesManager.FlatStructure = Settings.CommonSettings.FlatStructure;
     _referencesManager.SetConversionSettings(Settings.V3Settings);
     PassHeaderDataFromFb2ToEpub(fb2File,epubFile.BookInformation);
     var titlePage = new TitlePageFileV3(epubFileV3.BookInformation);
     StructureManager.AddTitlePage(titlePage);
     PassCoverImageFromFB2(fb2File.TitleInfo.Cover, epubFileV3);
     ConvertAnnotation(fb2File.TitleInfo, epubFileV3);
     SetupCSS(epubFileV3);
     SetupFonts(epubFileV3);
     PassTextFromFb2ToEpub(fb2File);
     PassFb2InfoToEpub(fb2File);
     PassImagesDataFromFb2ToEpub(epubFileV3, fb2File);
     AddAboutInformation(epubFileV3);
     UpdateInternalLinks(fb2File);
 }
Exemple #2
0
        protected override void ConvertContent(FB2File fb2File, IEpubFile epubFile)
        {
            var epubFileV3 = epubFile as EPubFileV3;

            if (epubFileV3 == null)
            {
                throw new ArrayTypeMismatchException(string.Format("Invalid ePub object type passed, expected EPubFileV3, got {0}", epubFile.GetType()));
            }
            _referencesManager.FlatStructure = Settings.CommonSettings.FlatStructure;
            _referencesManager.SetConversionSettings(Settings.V3Settings);
            PassHeaderDataFromFb2ToEpub(fb2File, epubFile.BookInformation);
            var titlePage = new TitlePageFileV3(epubFileV3.BookInformation);

            StructureManager.AddTitlePage(titlePage);
            PassCoverImageFromFB2(fb2File.TitleInfo.Cover, epubFileV3);
            ConvertAnnotation(fb2File.TitleInfo, epubFileV3);
            SetupCSS(epubFileV3);
            SetupFonts(epubFileV3);
            PassTextFromFb2ToEpub(fb2File);
            PassFb2InfoToEpub(fb2File);
            PassImagesDataFromFb2ToEpub(epubFileV3, fb2File);
            AddAboutInformation(epubFileV3);
            UpdateInternalLinks(fb2File);
        }