Cannot load PDF

Discussions on GFL SDK, the graphic library for reading and writing graphic files

Moderators: XnTriq, xnview

Post Reply
hansellh
Posts: 2
Joined: Mon Feb 09, 2009 11:49 am

Cannot load PDF

Post by hansellh » Mon Feb 09, 2009 11:53 am

Hi Guys,

I'm receiving an "Unknown Format" error when the code gets to the following LoadBitmap line

I am running ghostscript 8.60, and i've so far attempted to use glax 2.2, 2.7 and 2.90. I've attempted to load three different PDFs, all of which open fine in Adobe, however I don't seem to be able to get them to load here.

Code: Select all

        internal static void Generate(string pdfFile, string imageFile)
        {
            log4net.LogManager.GetLogger("Thumbnailer").InfoFormat("Creating thumbnail {0} for {1}", imageFile, pdfFile);

            GflAx.GflAxClass g = new GflAx.GflAxClass();
            g.EpsDpi = 72;
            g.Page = 1;
            g.LoadBitmap(pdfFile);           
            g.SaveFormat = GflAx.AX_SaveFormats.AX_JPEG;
            g.SaveBitmap(imageFile);
            g = null;

            log4net.LogManager.GetLogger("Thumbnailer").InfoFormat("Created thumbnail {0} for {1}", imageFile, pdfFile);
        }
Is there something I am missing here or something I can do to fix this?

Thanks
Heath

User avatar
xnview
Author of XnView
Posts: 31607
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Cannot load PDF

Post by xnview » Mon Feb 09, 2009 1:09 pm

And xnview can load them? Do you have tried with AFPL version of ghostscript?
Pierre.

hansellh
Posts: 2
Joined: Mon Feb 09, 2009 11:49 am

Post by hansellh » Mon Feb 09, 2009 1:14 pm

XNView can load the pdfs fine. I do get a multiple page warning, but they are opened fine. They also save ok as jpegs from XNView

Thanks

User avatar
xnview
Author of XnView
Posts: 31607
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Post by xnview » Mon Feb 09, 2009 1:44 pm

Strange, perhaps could you send me the pdf to test?
Pierre.

Post Reply