document.location.href = 'data:application/pdf;base64,' +data;
which opens the file in a new window (it works in all browsers except IE as it has url restrictions) and the file is not downloadable in all browsers. IE is the primary browser for testing my application so this is a big issue.
Here is the question I asked in stackoverflow for byte conversion and display of pdf in the webpage, that got answered, for additional info:
I have done my best in searching for the solution but couldn't able to find one yet. Please help. I will be thankful.