コード例 #1
0
ファイル: PublishModel.cs プロジェクト: gmartin7/myBloomFork
        private SimulatedPageFile MakeFinalHtmlForPdfMaker()
        {
            if (_currentlyLoadedBook == null)
            {
                _currentlyLoadedBook = BookSelection.CurrentSelection;
            }
            PdfFilePath = GetPdfPath(Path.GetFileName(_currentlyLoadedBook.FolderPath));

            var orientationChanging = BookSelection.CurrentSelection.GetLayout().SizeAndOrientation.IsLandScape !=
                                      PageLayout.SizeAndOrientation.IsLandScape;
            var dom = BookSelection.CurrentSelection.GetDomForPrinting(BookletPortion, _currentBookCollectionSelection.CurrentSelection,
                                                                       _bookServer, orientationChanging, PageLayout);

            AddStylesheetClasses(dom.RawDom);

            PageLayout.UpdatePageSplitMode(dom.RawDom);
            if (_currentlyLoadedBook.FullBleed && !GetPrintingWithFullBleed())
            {
                ClipBookToRemoveFullBleed(dom);
            }

            XmlHtmlConverter.MakeXmlishTagsSafeForInterpretationAsHtml(dom.RawDom);
            dom.UseOriginalImages = true;             // don't want low-res images or transparency in PDF.
            return(BloomServer.MakeSimulatedPageFileInBookFolder(dom, source: BloomServer.SimulatedPageFileSource.Pub));
        }
コード例 #2
0
        private TempFile MakeFinalHtmlForPdfMaker()
        {
            PdfFilePath = GetPdfPath(Path.GetFileName(_currentlyLoadedBook.FolderPath));

            XmlDocument dom = BookSelection.CurrentSelection.GetDomForPrinting(BookletPortion, _currentBookCollectionSelection.CurrentSelection, _bookServer);

            HtmlDom.AddPublishClassToBody(dom);

            //we do this now becuase the publish ui allows the user to select a different layout for the pdf than what is in the book file
            SizeAndOrientation.UpdatePageSizeAndOrientationClasses(dom, PageLayout);
            PageLayout.UpdatePageSplitMode(dom);

            XmlHtmlConverter.MakeXmlishTagsSafeForInterpretationAsHtml(dom);
            return(BloomTemp.TempFileUtils.CreateHtm5FromXml(dom));
        }
コード例 #3
0
        private SimulatedPageFile MakeFinalHtmlForPdfMaker()
        {
            PdfFilePath = GetPdfPath(Path.GetFileName(_currentlyLoadedBook.FolderPath));

            var dom = BookSelection.CurrentSelection.GetDomForPrinting(BookletPortion, _currentBookCollectionSelection.CurrentSelection, _bookServer);

            AddStylesheetClasses(dom.RawDom);

            //we do this now becuase the publish ui allows the user to select a different layout for the pdf than what is in the book file
            SizeAndOrientation.UpdatePageSizeAndOrientationClasses(dom.RawDom, PageLayout);
            PageLayout.UpdatePageSplitMode(dom.RawDom);

            XmlHtmlConverter.MakeXmlishTagsSafeForInterpretationAsHtml(dom.RawDom);
            dom.UseOriginalImages = true;             // don't want low-res images or transparency in PDF.
            return(EnhancedImageServer.MakeSimulatedPageFileInBookFolder(dom));
        }
コード例 #4
0
        private SimulatedPageFile MakeFinalHtmlForPdfMaker()
        {
            PdfFilePath = GetPdfPath(Path.GetFileName(_currentlyLoadedBook.FolderPath));

            var dom = BookSelection.CurrentSelection.GetDomForPrinting(BookletPortion, _currentBookCollectionSelection.CurrentSelection, _bookServer);

            AddStylesheetClasses(dom.RawDom);

            //we do this now becuase the publish ui allows the user to select a different layout for the pdf than what is in the book file
            SizeAndOrientation.UpdatePageSizeAndOrientationClasses(dom.RawDom, PageLayout);

            if (BookSelection.CurrentSelection.GetLayout().SizeAndOrientation.IsLandScape !=
                PageLayout.SizeAndOrientation.IsLandScape)
            {
                // Need to update the xmatter in the print dom...it may use different images.
                // Make sure we do this AFTER setting PageOrientation in Dom.
                BookSelection.CurrentSelection.UpdateBrandingForCurrentOrientation(dom);
            }
            PageLayout.UpdatePageSplitMode(dom.RawDom);

            XmlHtmlConverter.MakeXmlishTagsSafeForInterpretationAsHtml(dom.RawDom);
            dom.UseOriginalImages = true;             // don't want low-res images or transparency in PDF.
            return(EnhancedImageServer.MakeSimulatedPageFileInBookFolder(dom, source: "pub"));
        }