It seems that Adobe is not very good at releasing memory and consequently it builds up to a point where it crashes. I have bypassed this problem my keeping an eye on the memory in my programme and then resetting everything when it reaches a peak. Here is an example of what I am doing:
'---------- CHECK MEMORY (LOOP) -----------
'Search for 'Acrobat' process
Processes = Process.GetProcessesByName("Acrobat")
For Each Instance In Processes
MemUsage = Format(CLng(Instance.WorkingSet64), "#,##0") & " Bytes"
'If Memory running at higher than 100MB then close down all acrobat applications and restart to flush memory.
If Instance.WorkingSet64 > "100000000" Then
JSO = Nothing
SourceDocument = New AcroPDDoc
TargetDocument = New AcroPDDoc
> It seems that Adobe is not very good at releasing memory and consequently it builds up to a point where it crashes.
Well, not really true at all. What version are you using? 9 has some of the best memory management ever released in an Adobe product, and I have systems where 8.x was routinely open for days at a time and never had any memory problems.
Really, that's all you allow it? What if you have to insert and remove pages between two 150MB documents? Open a document with embedded video? Open a PDF Portfolio? You don't allow your users to do any of this?
>Really, that's all you allow it? What if you have to insert and remove pages between two 150MB documents?
Acrobat certainly should not need to load all of a PDF into memory. I
can't believe it is that sloppy. The code base dates back to when 16
MB was a lot, and it could handle 2 GB files in those days.
> Acrobat certainly should not need to load all of a PDF into memory.
I don't believe that it does. But some operations, like inserting many pages between large documents or copying pages with a lot of rich content between documents, can certainly consume more than 100MB (depending on the size of the content). I can't believe that 100MB should be a hard limit unless you're very certain of the type of content and operations your users would be performing.
> can certainly consume more than 100MB
Indeed, and I have seen a pathological case where it reached 2 GB and
Hi There, my goodness there is a lot about this all over the net.
I am using Acrobat Professional 7 and *none* of the solutions in the fast few days have worked for me.
Everytime I try to optimise a pdf via the menu, the program crashes, it starts to and the I get
"The instruction at 0x2d864aa2 refernced memory at 0x00000008. The memory could not be read"
and then when I look at the error reporting - the Modname is not what everyone else is reporting - the plugin, my Modname is: acrobat.dll.
Optimising works via batch processing though?!
What I *eventually found* is this:
In the program itself, go to
Advanced--> PDF Optimizer. In the left pane, select 'Discard Objects' and UNTICK 'Discard all alternative images'
Yay, up and running again
I hope this helps someone else out there!