Esempio n. 1
0
        public void HtmlGetPagesTest()
        {
            var file = TestFiles.FourPagesDocx;

            var request = new HtmlGetPagesRequest
            {
                FileName     = file.FileName,
                ResourcePath = null,
                IgnoreResourcePathInResources = null,
                EmbedResources    = null,
                StartPageNumber   = null,
                CountPages        = null,
                Password          = null,
                RenderComments    = null,
                RenderHiddenPages = null,
                DefaultFontName   = null,
                FontsFolder       = null,
                Folder            = file.Folder,
                Storage           = null,
            };

            var response = ViewerApi.HtmlGetPages(request);

            Assert.AreEqual("four-pages.docx", response.FileName);
            Assert.AreEqual("words\\docx", response.Folder);
            Assert.AreEqual(4, response.Pages.Count);
        }
        private HtmlPageCollection GetPageCollection(TestFile file)
        {
            var request = new HtmlGetPagesRequest
            {
                FileName     = file.FileName,
                ResourcePath = null,
                IgnoreResourcePathInResources = null,
                EmbedResources    = false,
                StartPageNumber   = null,
                CountPages        = null,
                Password          = null,
                RenderComments    = null,
                RenderHiddenPages = null,
                DefaultFontName   = null,
                FontsFolder       = null,
                Folder            = file.Folder,
                Storage           = null,
            };

            return(ViewerApi.HtmlGetPages(request));
        }