Max number of open Docs

PDF-XChange Viewer SDK for Developer's
(ActiveX and Simple DLL Versions)

Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange

moke@napconet.com
User
Posts: 60
Joined: Fri Oct 24, 2008 5:17 pm

Max number of open Docs

Post by moke@napconet.com »

Hi,
it seems the max # of open docs is 50 at one time. Is there a way to adjust this?

I can certainly understand why it might be a good idea to limit how many docs are open but I would prefer to be able to control this based on memory if possible.

Thanx
User avatar
Ivan - Tracker Software
Site Admin
Posts: 3586
Joined: Thu Jul 08, 2004 10:36 pm

Re: Max number of open Docs

Post by Ivan - Tracker Software »

Hi,

yes, there is such a limit, and it is OS dependant.

For each document we require a set of window handles, events, gdi resources etc. All of these resources are limited per process by the OS. During opening the file we detect if there are enough resources, and if not, we show an appropriate and corresponding message box.
PDF-XChange Co Ltd. (Project Director)

When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.
moke@napconet.com
User
Posts: 60
Joined: Fri Oct 24, 2008 5:17 pm

Re: Max number of open Docs

Post by moke@napconet.com »

Thank you, Ivan.

It would appear that this is dependent on # of files open rather that file size or # of pages. Am I to assume there is no adjustment possible?
moke@napconet.com
User
Posts: 60
Joined: Fri Oct 24, 2008 5:17 pm

Re: Max number of open Docs

Post by moke@napconet.com »

Could I get a little clarification on how the # of files allowed opened gets determined so I could notify the user a little more gracefully. Thx
User avatar
Lzcat - Tracker Supp
Site Admin
Posts: 677
Joined: Thu Jun 28, 2007 8:42 am

Re: Max number of open Docs

Post by Lzcat - Tracker Supp »

To open a PDF document we must use some memory (not a problem in most cases, especially for the 64-bit version), create some windows and other objects which use handles.

Each version of Windows has a limit - how many handles (and other resources) an application can use, so if an applicaton tries to use more - some window functions may fail and objects will be not created. When the Viewer was developed we tested how many documents it can open and found that in most cases this number is between 50 and 100 (dependant on document content - we use some additional handles to cache document fonts, images, etc). Finaly we decided that making such a limit (50 opened files, to have some free resources for instances when they will be needed) is much better than a failure at unpredictable times because system limit is reached.

The Next version (not build!) of the Viewer may extend this limit since the UI and many internal areas are being redesigned and will use less system resources (but the exact number of documets will be determined once we are in beta and are better able to test and monitor).

HTH.
Victor
Tracker Software
Project manager

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.