public static void Run()
        {
            var configuration = new Configuration(Common.MyAppSid, Common.MyAppKey);
            var apiInstance   = new PagesApi(configuration);

            try
            {
                var fileInfo = new FileInfo
                {
                    FilePath = "Pdf/ten-pages.pdf"
                };

                var options = new RotateOptions
                {
                    FileInfo   = fileInfo,
                    OutputPath = "Output/rotate-pages.pdf",
                    Pages      = new List <int?> {
                        2, 4
                    },
                    Mode = RotateOptions.ModeEnum.Rotate90
                };
                var request = new RotateRequest(options);

                var response = apiInstance.Rotate(request);

                Console.WriteLine("Output file path: " + response.Path);
            }
            catch (Exception e)
            {
                Console.WriteLine("Exception while calling api: " + e.Message);
            }
        }
Example #2
0
 public async Task <ActionResult <Picture> > Rotate([FromRoute] string id, [FromBody] RotateRequest req) =>
 await ModifyPictureAndSaveForUser(id, pic => _modifier.Rotate(pic, req.Angle));