PDF to Image using GflAx: Image generated is incomplete
Posted: Fri Apr 23, 2010 2:38 am
Hi all! I'm a bit new to using GflAx, and I'm using it for a project in C#. For that project, I need to generate thumbnail of the first page of a PDF file. This is the main code I used:
I modified the code I got from this site: http://homeofcox-cs.blogspot.com/2008/1 ... ormat.html.
The PDF I'm trying to generate thumbnails from is kind of like a Powerpoint presentation in PDF format, so the pages are kind of horizontal. However, the pic I generate is vertical and the image itself is not complete. Here is a link to that image: http://i42.tinypic.com/4ub0jm.jpg.
I've tried using the LoadThumbnail() method to no avail.
Thanks in advance!
Code: Select all
string file = "C:\\Users\\me\\Desktop\\PDFtest\\mouse.pdf";
string image = "C:\\Users\\me\\Desktop\\PDFtest\\omg.jpg";
try
{
GflAx.GflAxClass g = new GflAx.GflAxClass();
g.EpsDpi = 150;
g.LoadBitmap(file);
g.SaveFormat = GflAx.AX_SaveFormats.AX_JPEG;
g.SaveBitmap(image);
}
catch (Exception ex)
{
Console.WriteLine("Error: "+ex);
}
The PDF I'm trying to generate thumbnails from is kind of like a Powerpoint presentation in PDF format, so the pages are kind of horizontal. However, the pic I generate is vertical and the image itself is not complete. Here is a link to that image: http://i42.tinypic.com/4ub0jm.jpg.
I've tried using the LoadThumbnail() method to no avail.
Thanks in advance!