Skip to content

Commit

Permalink
Merge pull request #41 from SyncfusionExamples/PdfToImageSample
Browse files Browse the repository at this point in the history
Need to add playground for pdftoimage converter for crossplatform in UG documentation
  • Loading branch information
Deepak1799 authored Aug 23, 2024
2 parents 4da81df + 561dd88 commit 5671983
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,17 @@ public static void Main(string[] args)
//Convert PDF to Image.
Stream outputStream = imageConverter.Convert(0, false, false);

//Rewind the stream position to the beginning before copying.
outputStream.Position = 0;

//Create file stream.
using (FileStream outputFileStream = new FileStream(Path.GetFullPath(@"Output/Output.jpeg"), FileMode.Create, FileAccess.ReadWrite))
{
//Save the image to file stream.
inputStream.CopyTo(outputFileStream);
outputStream.CopyTo(outputFileStream);
}
//Dispose the imageConverter
imageConverter.Dispose();
}
}
}

0 comments on commit 5671983

Please sign in to comment.