Exemplo n.º 1
0
        public void TestRenderParagraph()
        {
            var localName  = "test_multi_pages.docx";
            var remoteName = "TestRenderParagraph.docx";
            var fullName   = Path.Combine(this.dataFolder, remoteName);

            this.StorageApi.PutCreate(fullName, null, null, File.ReadAllBytes(BaseTestContext.GetDataDir(BaseTestContext.CommonFolder) + localName));

            var request = new RenderParagraphRequest(remoteName, "png", 0, this.dataFolder);
            var actual  = this.WordsApi.RenderParagraph(request);

            Assert.IsTrue(actual.Length > 0, "Error has occured while paragraph rendering");
        }
        public void TestRenderParagraphWithoutNodePath()
        {
            string remoteFileName = "TestRenderParagraphWithoutNodePath.docx";

            this.UploadFileToStorage(
                remoteDataFolder + "/" + remoteFileName,
                null,
                null,
                File.ReadAllBytes(LocalTestDataFolder + localFile)
                );

            var request = new RenderParagraphRequest(
                name: remoteFileName,
                format: "png",
                index: 0,
                folder: remoteDataFolder
                );
            var actual = this.WordsApi.RenderParagraph(request);
        }