Support Article

Screen refreshes repeatedly after generating a PDF document




The out-of-the-box Code-Pega-PDF.View activity is used to generate a PDF document of an eForm. However, the PDF document generates, but the screen refreshes repeatedly without going to the next screen. 


Error Messages


Not Applicable


Steps to Reproduce

  1. On click of a button, invoke a flow which does processing and then invokes the out-of-the-box 'GenerateEForm' activity to generate an eForm
  2. Invoke the out-of-the-box 'Code-Pega-PDF.View' activity to generate the PDF document

Root Cause

Customer forwards the flow which is not possible while downloading a PDF. Download of a file is handled by the View activity which uses the sendFile API method that considers download is the end of a transaction. The flow execution is stuck once the download starts.


An enhancement request, FDBK-31035, is created for consideration by Pega Product Management.

Alternatively, perform the following local-change:
  1. Save the PDFName and the PDFDocument on a Work page
  2. Configure the Download button to download PDF on the next screen



Published April 9, 2019 — Updated April 12, 2019

Have a question? Get answers now.

Visit the Pega Support Community to ask questions, engage in discussions, and help others.