cancel
Showing results for 
Search instead for 
Did you mean: 

Unity API - StoreNewDocument

AJ_Croteau
Champ on-the-rise
Champ on-the-rise

I'm trying to store a new document into the OnBase system through the Unity API. I'm using a memory stream to write the file to and passing that to the CreatePageData method along with an extension, however, once i call the StoreNewDocument method and using PageData and Document Property objects, i get an exception thrown from the Unity API that the Stream is empty...

Anybody else experience this issue?

AJ

3 REPLIES 3

Sriram_Seshadri
Champ in-the-making
Champ in-the-making

After writing to the MemoryStream did you reset the Position to 0? If not, that is the issue.

Yes, that fixed it. Thank you very much... Easiest thing in the world to forget...

AJ

That worked for me too. In my case I was getting the next error: Error code: (-7). Image was not recognized as a format the library can decompress.