Print Page | Close Window

[Revisited] Memory Limitation Question

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=414
Printed Date: 22 Nov 24 at 1:25PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: [Revisited] Memory Limitation Question
Posted By: IanK
Subject: [Revisited] Memory Limitation Question
Date Posted: 17 May 06 at 9:40AM
This is a reprise of a question I asked last year, but to my embarrasement I can't remember the answer given then, or find it on search. So, as it looks like there've been a few developments since then anyway, I thought I'd cross my fingers and repeat it...

We have a program that uses QuickPDF to merge and bookmark a number (possibly a large number) of smallish PDF documents. The merging's done with MergeFiles and works fine for any number of documents, but the bookmarking requires the merged document to be loaded into memory and this can fail if things turn out to be too large.

The size limit above which the loading fails appears to be independent of actual memory installed on a PC, so presumably is determined by a hardcoded buffer size in the QuickPDF code.

As we have a non-source version (site licence) for QuickPDF I can't investigate this myself, so is anyone able to confirm whether this is the case? If so, does increasing the limit look like it'll be an easy thing to do?

If anyone wants to/can send me _just_ the relevant files or code fragments needed to look into this issue (don't want to turn into a pirate!) I'd be happy to do the investigation, and report back with the findings.



Replies:
Posted By: Wheeley
Date Posted: 17 May 06 at 4:41PM

If you break the bookmarking into stages of around 500 at a time it will work. I had the same issue you are having. I believe it is some memory leak with the bookmarking process. So here is what we did.

1. Load pdf
2. do 500 bookmarks
3. save and remove file from memory
4. start at 1 again

This will work. Using this process I was able to create a 32 MB pdf file created with 3000+ bookmarks.

Yes this is an extreame pdf, but sometimes things like this happen in the real word.

Give it a try
Wheeley



Posted By: IanK
Date Posted: 18 May 06 at 5:11AM
Thanks for the suggestion Wheeley, but I'm afraid this isn't applicable in my particular case.

For these the files are mid-100's of MB large, and are too big for KiSEDQuickPDF.LoadFromFile to load in the first place.

Ideally QuickPDF would start using virtual memory, so arbitrarily large files could be opened and bookmarked, but as things actually seem to be (a fixed upper limit on file size) I'd settle for simply increasing that upper limit to something more appropriate to present day 1GB+ systems.



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