I am encountering random corruptions of PDF files when they are saved to a BLOB field in ArcMap 10.2.1 and then reconciled and posted to an Oracle database. The corrupted files can be opened after the save occurs, but not after the reconcile and post. Adobe Acrobat states that there is an error and the file can't be read. The file's size is also smaller, for example a 125 KB file is only 60 KB after the reconcile and post process.
The corruption occurs at random. Initially we believed it to be tied to ESRI's standard Attachment Manager and possibly the Attachment Manager ArcObjects as well. Our client found though that the corruption also occurs when just using an IRow.Store to save the PDFs to the BLOB field--as long as the reconcile and post occurs it does not appear to matter how the value is stored initially. The problem was discovered when a client was using a custom Attachment Manager that I had written using the IAttachmentManager and ITableAttachments ArcObjects. After further testing, we were able to identify these traits:
1. PDFs are affected, image files (JPG, PNG, etc) are not.
2. The corruption does not occur in file geodatabases (not surprising since there is no reconcile and post)
3. The corruption is apparently random. We identified 5 "problem" PDFs that would reliably corrupt after every reconcile and post. These PDFs were used for two days for testing and on the third day they no longer suffered corruption issues and could be reconciled and posted with no issue.
4. The act of storing the value and then saving the edits results in a complete PDF. I checked the file size before and after it was written to the BLOB field and the size remained the same. Only after the reconcile and post did the file size shrink.
Has anyone else encountered this or does anyone have a possible solution?