Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

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.

Error Messages

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.

Root Cause

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";
String Response=tools.sendFile(ByteArray,FileName,false,null,false);
catch(Exception e)

2. Save the Activity and Run.

Published December 4, 2017 - Updated October 8, 2020

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us