Latest GdPicture won't open very large PDFs

Discussions about PDF management.
Post Reply
User avatar
ryancole11
Posts: 21
Joined: Fri May 21, 2010 7:19 pm

Latest GdPicture won't open very large PDFs

Post by ryancole11 » Wed Jul 25, 2012 10:49 pm

I'm trying to simply open and print the page count of a very large PDF. The PDF is about 2.5GB in size, because of the number of embedded attachments that it contains. I've specified not to load it in memory, but I still cannot print the number of pages in the document. If I try to print the page count, it just returns zero. If I try to loop over the embedded documents, and delete them, it says there are no embedded documents.

Here is my code:

Code: Select all

using System;
using System.Collections.Generic;
using GdPicture9;

namespace GdPicture9Test
{
    class Program
    {
        static void Main(string[] args)
        {
            // register license key
            LicenseManager licenserManager = new LicenseManager();
            if (!licenserManager.RegisterKEY("xxx"))
                return;

            // open the pdf
            GdPicturePDF pdf = new GdPicturePDF();
            pdf.LoadFromFile(@"c:\users\ryan\desktop\foo.pdf", false);

            for (int x = 0; x < pdf.GetEmbeddedFileCount(); x++)
            {
                // huh?
                byte[] what = new byte[1];

                // del
                pdf.DeleteEmbeddedFile(x, ref what);
            }

            // close the pdf
            pdf.CloseDocument();
        }
    }
}

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: Latest GdPicture won't open very large PDFs

Post by Loïc » Thu Jul 26, 2012 9:59 am

Hello,

You should be able to open any size PDF with GdPicture.
What is the return value of LoadFromFile() ?
Are you able to open the document in Adobe Reader ?

Kind regards,

Loïc

User avatar
ryancole11
Posts: 21
Joined: Fri May 21, 2010 7:19 pm

Re: Latest GdPicture won't open very large PDFs

Post by ryancole11 » Thu Jul 26, 2012 4:53 pm

Hmm. The return code is "PdfCanNotOpenFile". It opens just fine with Adobe Reader, though. I'd send it to you but it's 2.5GB, so that's not an option.

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: Latest GdPicture won't open very large PDFs

Post by Loïc » Thu Jul 26, 2012 4:59 pm

Do you have the same problem in 32-bit & 64-bit mode ?

User avatar
ryancole11
Posts: 21
Joined: Fri May 21, 2010 7:19 pm

Re: Latest GdPicture won't open very large PDFs

Post by ryancole11 » Thu Jul 26, 2012 5:06 pm

I had initially been testing in 32-bit build mode, but I just tested it in 64-bit build mode and I receive the same error.

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: Latest GdPicture won't open very large PDFs

Post by Loïc » Thu Jul 26, 2012 5:08 pm

ok, so I really need the PDF to investigate.
You can contact us through https://www.gdpicture.com/support/getting-support-from-our-team and we will send you information to transfer the file.

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: Latest GdPicture won't open very large PDFs

Post by Loïc » Sun Jul 29, 2012 3:11 pm

Please ignore my previous reply. We've been able to reproduce the issue that is fixed for the next minor release.

Kind regards,

Loïc

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests