5
Answers

Creating jpeg image file

Photo of Sukaskha

Sukaskha

7y
862
1
Hi, 
Are there any libraries available who can convert my portable document format to image format in c#? Please share sample code or some links. Thanks in advance. 

Answers (5)

2
Photo of Shweta Lodha
19 48.6k 4.2m 7y
Yes, there are few libraries available. you can have a look at:
https://social.msdn.microsoft.com/Forums/en-US/efb56ede-c588-4ac0-97cd-3a54205a885d/how-to-convert-pdf-to-jpeg-through-c?forum=csharpgeneral 
Accepted
2
Photo of Debasis Saha
Tech Writer 67.8k 33.7m 7y
Check the below link -
 
https://sautinsoft.com/blog/?p=489
 
Hope this will help you.
 
 
1
Photo of Leon D
493 2.7k 387 7y
Hi Sukaskha,
 
Convert PDF document to jpeg along with other image formats is fairly simple with Spire.PDF library. You can get Spire.Pdf.dll from NuGet(https://www.nuget.org/packages/Spire.PDF/) and then refer to the following articles:
 
https://www.e-iceblue.com/Tutorials/Spire.PDF/Spire.PDF-Program-Guide/Convert-PDF-Page-to-Image-with-Specified-Resolution.html
 
https://www.e-iceblue.com/Tutorials/Spire.PDF/Spire.PDF-Program-Guide/Convert-PDF-Page-to-Image-with-C-code.html 
 
 
1
Photo of Sukaskha
NA 113 21.7k 7y
Thanks Shweta. I'll check.
0
Photo of Mohamed Abedallah
NA 852 142 7y
There are plenty of libraries that allow you to convert PDF files to JPEG or image formats.
With LEADTOOLS you can do it with three lines of code:
  1. RasterCodecs _codecs = new RasterCodecs();  
  2. RasterImage _img = _codecs.Load(@"C:\Users\Public\Documents\LEADTOOLS Images\leadtools.pdf");  
  3. _codecs.Save(_img, @"C:\Users\Public\Documents\LEADTOOLS Images\leadtools.JPG", RasterImageFormat.Jpeg411, 24); 
It also supports wide set of file formats and sub-formats not only JPG. For more information see this page:
https://www.leadtools.com/help/leadtools/v20/main/api/summary-of-all-supported-image-file-formats.html