I am trying to display the PDF file from apache tomcat using IBM Worklight. Using the following link Worklight Adapter getting pdf file from rest service, i converted the PDF file into Byte Array.
In the client side, the code is
var pdfText = decodeURIComponent(response.invocationResult.pdf);
var pdf = base64DecToArr(pdfText);
PDFJS.getDocument(pdf).then(iterate);
But i am unable to display the file. When running the following code on emulator, it is not displaying any error. When running the same code in chrome browser, Error: Invalid XRef stream header util.js:186 at error Warning: Unsupported feature "unknown" util.js:171 Warning: Unsupported feature "unknown" util.js:171 Warning: Indexing all PDF objects
I need to know how to display the [Object Uint8Array] as PDF.