LEADTOOLS Support
Document
Document SDK Questions
How to: Convert from PDF to any raster image using .NET
While some posts in this topic are more current, this topic was posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Thursday, July 17, 2008 4:31:23 AM(UTC)
Groups: Guests
Posts: 3,022
Was thanked: 2 time(s) in 2 post(s)
The following C# code works with different versions of LEADTOOLS (with minor changes) and converts a PDF page into a JPEG image:
=================================================================
void PdfToJPEG(string inputPdf, string outputJpeg)
{
Leadtools.Codecs.RasterCodecs LeadCodecs = new RasterCodecs();
Leadtools.RasterImage LeadBitmap = LeadCodecs.Load(inputPdf);
LeadCodecs.Save(LeadBitmap, outputJpeg, RasterImageFormat.Jpeg411, 24);
}
=================================================================
The code can be easily changed to save any other type of images such as PNG, BMP, TIFF or Exif.
It can also be modified to convert multiple pages by putting calls to Load(.., pageNumber,...) and Save() inside a loop.
#2
Posted
:
Thursday, June 10, 2021 10:08:38 AM(UTC)
Groups: Administrators
Posts: 27
Was thanked: 1 time(s) in 1 post(s)
LEADTOOLS Support
Document
Document SDK Questions
How to: Convert from PDF to any raster image using .NET
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.