Page 1 of 1

PDF to Image using GflAx: Image generated is incomplete

Posted: Fri Apr 23, 2010 2:38 am
by missChex13
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:

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);
            }
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!

Re: PDF to Image using GflAx: Image generated is incomplete

Posted: Sun Apr 25, 2010 2:19 pm
by missChex13
Anyone there? :)

Re: PDF to Image using GflAx: Image generated is incomplete

Posted: Tue Dec 28, 2010 11:37 am
by fonzie1860
Hi,

I'm facing the same problem. No hints what could cause this error?

thx, Axel

Re: PDF to Image using GflAx: Image generated is incomplete

Posted: Tue Dec 28, 2010 1:53 pm
by xnview
Which version of ghostscript do you use?

Re: PDF to Image using GflAx: Image generated is incomplete

Posted: Tue Dec 28, 2010 3:37 pm
by fonzie1860
Pierre,

thanks for the relpy. I tried it with Ghostscipt 9.00 and 8.71. With both versions the same result.

Axel

Re: PDF to Image using GflAx: Image generated is incomplete

Posted: Tue Dec 28, 2010 4:06 pm
by fonzie1860
Tried further Version 8.63 and 8.60. With version 8.60 i get the same result, with 8.63 no image is generated.

Axel

Re: PDF to Image using GflAx: Image generated is incomplete

Posted: Tue Dec 28, 2010 4:30 pm
by xnview
could you send me the pdf?

Re: PDF to Image using GflAx: Image generated is incomplete

Posted: Tue Dec 28, 2010 4:58 pm
by fonzie1860
Hello Pierre,

I did some more testing, you are right, it's a problem with my test pdf (I'll send you,it's too big to attach) . With other pdfs it works perfect. Thanks for your help.

Axel