1

I am having a problem using the PrintImage function of the ActivePDF C# library. When I use it to try to place a .gif image on the PDF I receive this error message:

Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

I am able to use the PrintJPEG and PrintTIFF image functions without any problem. Has anyone run into this problem before?

1 Answer 1

0

Is that image coming from a picturebox or similar control? If that's the case, then that control has a lock on that image (I ran into the same situation while trying to serialize an object that contained an image from an inkpicture control). You would need to copy the image before placing it in your pdf document.

2
  • The picture is uploaded via a FileUpload control on a web form. I am able to upload jpg/tif and use them, just not anything that uses the generic PrintImage.
    – Rick
    May 5, 2009 at 15:08
  • If that's the case, then sorry, I'm not really sure what the problem could be. It still sounds like something has a lock on the image but I wouldn't know where to go from here. May 5, 2009 at 15:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.