File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
PDF-to-image/.NET/PDFPage-to-Image/PDFPage-to-Image Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -12,14 +12,15 @@ public static void Main(string[] args)
12
12
PdfToImageConverter imageConverter = new PdfToImageConverter ( ) ;
13
13
14
14
//Load the PDF document as a stream
15
- FileStream inputStream = new FileStream ( "../../../Data/Input.pdf" , FileMode . Open , FileAccess . ReadWrite ) ;
15
+ FileStream inputStream = new FileStream ( Path . GetFullPath ( @"Data/Input.pdf" ) , FileMode . Open , FileAccess . ReadWrite ) ;
16
+
16
17
imageConverter . Load ( inputStream ) ;
17
18
18
19
//Convert PDF to Image.
19
20
Stream outputStream = imageConverter . Convert ( 0 , false , false ) ;
20
21
21
22
//Create file stream.
22
- using ( FileStream outputFileStream = new FileStream ( Path . GetFullPath ( @"../../../ Output/Output.jpeg" ) , FileMode . Create , FileAccess . ReadWrite ) )
23
+ using ( FileStream outputFileStream = new FileStream ( Path . GetFullPath ( @"Output/Output.jpeg" ) , FileMode . Create , FileAccess . ReadWrite ) )
23
24
{
24
25
//Save the image to file stream.
25
26
inputStream . CopyTo ( outputFileStream ) ;
You can’t perform that action at this time.
0 commit comments