Content of pdf not loading after applying custom content type
I am using alfresco 5.1.1 EA, when I am upload any document so by default it's type is going to changed. I have created many types in my custom content model. So, when I upload any document, associated custom types is allocated to that document.
But, at the same time when I will open that document, content of that document is not loaded, I have attached screen shot or the same.
But, when I will remove my code for applying custom content type to document, then document is loaded successfully.
I have checked also my code, there is no problem in my code.
I got stuck over here.
Can anyone tell me, what is the problem, why this problem occurred. Please answer me as soon as possible.