Note that there are some explanatory texts on larger screens.

plurals
  1. POAbcpdf throwing System.ExecutionEngineException
    primarykey
    data
    text
    <p>I have the binary for several pdf files stored in a collection of Byte arrays.</p> <p>My goal is to concatenate them into a single .pdf file using abcpdf, then stream that newly created file to the Response object on a page of an ASP.Net website.</p> <p>Had been doing it like this:</p> <p>BEGIN LOOP ...</p> <pre><code>'Create a new Doc Dim doc As Doc = New Doc 'Read the binary of the current PDF doc.Read(bytes) 'Append to the master merged PDF doc _mergedPDFDoc.Append(Doc) </code></pre> <p>END LOOP</p> <p>Which was working fine 95% of the time. Every now and then however, creating a new Doc object would throw a System.ExecutionEngineException and crash the CLR. It didn't seem to be related to a large number of pdfs (sometimes would happen w/ only 2), or with large sized pdfs. It seemed almost completely random.</p> <p>This is a known bug in abcpdf described (not very well) here <a href="http://www.websupergoo.com/support.htm" rel="nofollow noreferrer">Item 6.24</a>. I came across <a href="https://stackoverflow.com/questions/176113/every-now-and-then-abcpdf-runs-out-of-memory/176143#176143">a helpful SO post</a> which suggested using a Using block for the abcpdf Doc object.</p> <p>So now I'm doing this:</p> <pre><code> Using doc As New Doc 'Read the binary of the current PDF doc.Read(bytes) 'Append to the master merged PDF doc _mergedPDFDoc.Append(doc) End Using </code></pre> <p>And I haven't seen the problem occur again yet, and have been pounding on a test version as best as I can to get it to.</p> <p>Has anyone had any similar experience with this error? Did this fix it?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload