Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Monday, June 8, 2015 11:30:28 AM(UTC)
jdmcfadden

Groups: Registered
Posts: 1


When converting large (225+ pages) PDF files to TIF files, I get an exception "You have exceeded the amount of memory allowed for RasterImage allocations. RasterDefaults::MemoryThreshold::MaximumGlobalRasterImageMemory". In googling for an answer, I came across this thread that discusses loading and saving the PDF one page at a time. I'm using code such as the attached, which I do understand is not paging through the PDF. Is there an example available of how best to manage the large PDFs. This code, BTW, runs in a Windows service; it is not a web service code nor does it run behnd a UI.

Thanks.

Jim McFadden
 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Tuesday, June 9, 2015 5:00:45 AM(UTC)

Daoud  
Daoud

Groups: Registered
Posts: 256


Jim,
There are not attachments in your post. Please don't use "Preview" option when uploading attachments as that will cause the attachments to be lost.

MaximumGlobalRasterImageMemory puts a limit of how much memory can the RasterImage object use. This prevents it from eating all the available memory.
The memory needed for loading a PDF page depends on the PDF physical size, BitsPerPixel and DPI.

In cases of large PDFs, you can load portions of the PDF (For example 20 pages each time). You can use RasterCodecs.Load() overload that enables you to load selected pages from the PDF and do the loading in loops.

If you have a lot of RAM and you don't want to load the PDF in portions, make your service 64-bit and increase the value of MaximumGlobalRasterImageMemory.
    
For an example on how to load the PDF in portions, see the following link:
http://support.leadtools.com/CS/forums/29161/ShowPost.aspx#42269  

If you need more help, please let me know.

 
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.075 seconds.