public IActionResult PageDetail(int page = 1) { var result = ExampleOne.ConvertPDFToImageByPage("git.pdf", page); var filePath = $"/images/output{page}.png"; System.IO.File.WriteAllBytes(_webHost.WebRootPath + filePath, result); ViewBag.Path = filePath; return(View()); }
public IActionResult Index() { var result = ExampleOne.ConvertPDFToImage("git.pdf"); List <string> path = new List <string>(); for (int i = 0; i < result.Count; i++) { var filePath = $"/images/output{i}.png"; System.IO.File.WriteAllBytes(_webHost.WebRootPath + filePath, result[i]); path.Add(filePath); } ViewBag.Path = path; return(View()); }
static void Main(string[] args) { // My examples ExampleOne.SetUp(); // Module 6 - Grouping and Aggregating // Mod6.SetUp(); // Module 5 - Filtering, Ordering & Projecting // CarSetup.CarProjectSetUp(); // Module 4 - Queries // var movieQueries = new MovieQueries(); // Module 3 //Employee employee = new Employee(); //employee.CreateEmployee(); // Module 2 //string path = @"C:\windows"; //LearningLinq.ShowLargeFilesWithoutLinq(path); //Console.WriteLine("***"); //LearningLinq.ShowLargeFilesWithLinq(path); }