MergePDF is diaplayed in Unreadable format
User have a scenario in their application, where by selecting the required documents and share via service and receive a single merge document.
The received document is converted into PDF and displayed on screen.
The above scenario is working fine in Internet Explorer, whereas the same is not working in Chrome and Firefox browsers.
In Chrome and Firefox browsers, the merge PDF is displayed as an unreadable format.
Steps to Reproduce
1. Create a button. On button click show the popup window with required documents and share via service and receive a single merge document.
2. Run the Activity for downloading the merged document.
3. Write the logic for converting byte array to PDF.
File name with ".pdf" extension is missing hence the issue occurred.
User appended the ".pdf" to the filename resolves the issue.
Perform the following local-change:
1.Add below code snippet in step 7 of Activity : DownloadSelectedMRTDocument.
byte ByteArray= Base64Util.decodeToByteArray(inputStream);
String FileName=fileName + ".pdf";
2. Save the Activity and Run.
0% found this useful