Support Article
Generated PDF contains error when JSP tag is passed to HTMLToPDF
SA-62327
Summary
Generated PDF contains an error message when a JSP tag is passed to the HTMLToPDF activity. This occurs when a HTML stream includes a Rule-HTML-Harness instance containing a JSP tag.
Error Messages
JavaScript Required.
We're sorry, but Pega7 doesn't work without JavaScript enabled. Please enable and refresh.
Steps to Reproduce
- Create a harness in GCSHarness and keep it blank
- Create a HTML rule and use the below HTML:
<% String harness = "GCSHarness";
tools.getStepPage().putString("pyTransientText",tools.getParamValue("SectionName"));
tools.putParamValue("skipPortalChrome",true);
%>
<pega:include type="Rule-HTML-Harness" name="<%= harness %>" />
<%
tools.putParamValue("skipPortalChrome","");
%>
- Use the Property-Set-HTML method in an activity and pass the HTMLStream name as the HTML rule name
- Use the HTML stream for PDF generation by calling the HTMLToPDF activity
Root Cause
In the Advanced tab of the harness, the 'Harness Usage' check box was not checked.
Resolution
Perform the following local-change:Navigate to the Advanced tab of the harness and check the 'Harness Usage' check box.
Published August 24, 2018 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.