Ejemplo n.º 1
0
        public void HtmlCreatePdfFileFromContentTest()
        {
            var file           = TestFiles.PasswordProtectedDocx;
            var pdfFileOptions = new PdfFileOptions
            {
                Password = file.Password
            };

            var request = new HtmlCreatePdfFileFromContentRequest
            {
                PdfFileOptions = this.SerializeObject(pdfFileOptions),
                File           = this.GetTestFileStream(file),
                FileName       = null,
                FontsFolder    = null,
                Folder         = FromContentFolder,
                Storage        = null,
            };

            var response = ViewerApi.HtmlCreatePdfFileFromContent(request);

            Assert.IsNotEmpty(response.FileName);
            Assert.IsNotEmpty(response.Folder);
            Assert.IsNotEmpty(response.PdfFileName);
        }