This class handles the process of creating an ePUB out of a bloom book. The process has two stages, corresponding to the way our UI displays a preview and then allows the user to save. We 'stage' the ePUB by generating all the files into a temporary folder. Then, if the user says to save, we actually zip them into an ePUB.
Inheritance: IDisposable
Example #1
0
 internal void PrepareToStageEpub()
 {
     if (_epubMaker != null)
     {
         //it has state that we don't want to reuse, so make a new one
         _epubMaker.Dispose();
         _epubMaker = null;
     }
     _epubMaker = new EpubMaker(_thumbNailer, _isoloator);
     _epubMaker.Book = BookSelection.CurrentSelection;
     _epubMaker.Unpaginated = true; // Enhance: UI?
 }
Example #2
0
        public void Dispose()
        {
            if (RobustFile.Exists(PdfFilePath))
            {
                try
                {
                    RobustFile.Delete(PdfFilePath);
                }
                catch (Exception)
                {

                }
            }
            if (_epubMaker != null)
            {
                _epubMaker.Dispose();
                _epubMaker = null;
            }

            GC.SuppressFinalize(this);
        }