Print Page | Close Window

Very large PDF file cannot be loaded

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: I need help - I can help
Forum Description: Problems and solutions while programming with the Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=1000
Printed Date: 27 Jan 26 at 2:20PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Very large PDF file cannot be loaded
Posted By: JanN
Subject: Very large PDF file cannot be loaded
Date Posted: 06 Jan 09 at 8:28AM
Hi!

First of all a Happy New Year to you all!


It's been a while since my last post here. But now it's time again.

I came across problems with very large PDF files. The reason seems to be somewhere in memory allocation. LoadFromFile throws an OutOfMemory exception although there's plenty of memory available. The "magical border" seems to be 512 MB.

I use the current version 6.0.4.6.


I have created and uploaded a sample file with 40000 pages (73 MB):

http://www.upload24.de/files/40000.zip -> only 2,5 MB!


Has anyone encountered this problem before? Is the limit of 512 MB standard? Does one of the developers have an idea?

Thanks in advance.



Replies:
Posted By: Ingo
Date Posted: 07 Jan 09 at 6:06AM
Hi JanN!
Nothing read from you for a long time... ;-)
Happy New Year to you!
It's the function
function TPDFDocument.LoadFromFile(const FileName: QPDFString): Boolean;
The file is read into a stream at
FS := TQPDFFileStream.Create(FileName, fmOpenRead or fmShareDenyWrite);

Perhaps it's enough to allocate memory before with "GetMem" ...
Anyway there should be a smooth behavior and it should be framed with a try-except-end ;-)

Oh... what's that? Writing here i've load your testfile and with our last source version it could be loaded completely (160008 embedded objects!!!). Please contact me directly at
ingo [dot] schmoekel [at] gmx [dot] de

Cheers, Ingo




Posted By: JanN
Date Posted: 09 Jan 09 at 5:56AM
Hi!

We have found out that loading the pdf file only seems to work. QuickPdf returns with no error. But when calling PageCount the result is 0. SaveToFile also doesn't work.

I really need a solution for this. Can anyone help?

I already thought of splitting the pdf file using another tool and afterwards process the parts using QuickPdf. But that's not really a solution, isn't it.


Posted By: Ingo
Date Posted: 09 Jan 09 at 7:15AM
You have the sources...
Why not setting a breakpoint on function PageCount?
I fear that the object wasn't built correct and that there are no data for pages? Is it always the same creator/producer?

Cheers, Ingo


Posted By: ixm7
Date Posted: 05 Feb 09 at 11:33AM
Hi JanN,

I believe Marian solved that issue for me several months ago. You may want to contact him.

Cheers,
- Ido



Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk