Example #1
0
        public void TestGetImageWithFormat()
        {
            PdfApi target = new PdfApi(APIKEY, APPSID, BASEPATH);
            StorageApi storageApi = new StorageApi(APIKEY, APPSID, BASEPATH);

            string name = "Lenovo_Tablet_2_Datasheet.pdf";
            int? pageNumber = 1;
            int? imageNumber = 1;
            string format = "jpeg";
            int? width = 0;
            int? height = 0;
            string storage = null;
            string folder = null;

            storageApi.PutCreate(name, null, null, System.IO.File.ReadAllBytes("\\temp\\pdf\\resources\\" + name));

            Com.Aspose.PDF.Model.ResponseMessage actual;
            actual = target.GetImageWithFormat(name, pageNumber, imageNumber, format, width, height, storage, folder);

            Assert.AreNotEqual(null, actual);
            Assert.IsInstanceOfType(new Com.Aspose.PDF.Model.ResponseMessage(), actual.GetType());
        }