Page 1 of 1

Problems loading a PDF

Posted: Wed Aug 05, 2009 9:35 am
by Anders
Hello all!

I am using GflAx 2.82 with C# to convert a PDF into a PNG file using the code at the end of this post. Exactly the same code works for converting a jpg to a png. But dealing with a pdf, the program gets stuck at the g.LoadBitmap(file) command. No error message appears. I tried it with different pdfs from different sources (thanks to google). Ghostscript 8.70 is installed.

Anyone encountered a similar problem?

Code: Select all

public static void PDFtoPNG()
            String file = "test.pdf";
            String image = "test.png";

                GflAx.GflAxClass g = new GflAx.GflAxClass();
                g.EpsDpi = 72;
                g.Page = 1;
                g.Page = 1;
                g.SaveFormat = GflAx.AX_SaveFormats.AX_PNG;
            catch (Exception ex)
                Console.WriteLine("GflAx error: " + ex.Message);

Re: Problems loading a PDF

Posted: Mon Aug 10, 2009 12:05 pm
by xnview
No problem to load it in XnView?