diff --git a/PDF-to-image/.NET/PDFPage-to-Image/PDFPage-to-Image/Program.cs b/PDF-to-image/.NET/PDFPage-to-Image/PDFPage-to-Image/Program.cs index 28813df..85986c5 100644 --- a/PDF-to-image/.NET/PDFPage-to-Image/PDFPage-to-Image/Program.cs +++ b/PDF-to-image/.NET/PDFPage-to-Image/PDFPage-to-Image/Program.cs @@ -12,14 +12,15 @@ public static void Main(string[] args) PdfToImageConverter imageConverter = new PdfToImageConverter(); //Load the PDF document as a stream - FileStream inputStream = new FileStream("../../../Data/Input.pdf", FileMode.Open, FileAccess.ReadWrite); + FileStream inputStream = new FileStream(Path.GetFullPath(@"Data/Input.pdf"), FileMode.Open, FileAccess.ReadWrite); + imageConverter.Load(inputStream); //Convert PDF to Image. Stream outputStream = imageConverter.Convert(0, false, false); //Create file stream. - using (FileStream outputFileStream = new FileStream(Path.GetFullPath(@"../../../Output/Output.jpeg"), FileMode.Create, FileAccess.ReadWrite)) + using (FileStream outputFileStream = new FileStream(Path.GetFullPath(@"Output/Output.jpeg"), FileMode.Create, FileAccess.ReadWrite)) { //Save the image to file stream. inputStream.CopyTo(outputFileStream);