Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Thursday, July 17, 2008 4:31:23 AM(UTC)

Adam Boulad  
Guest

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.
 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Thursday, June 10, 2021 10:08:38 AM(UTC)
BonzoFestoon

Groups: Administrators
Posts: 27

Was thanked: 1 time(s) in 1 post(s)

We created a v21 blog post that includes code to convert PDF to JPG and other image formats in C#, VB, and Java.
Gabriel Smith
LEAD Technologies, Inc.

LEAD Logo
 
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.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.046 seconds.