HTML To PDF conversion takes long time when a custom section used

Hello All - We have a functionality to generate a PDF document and attach to the case. We use the OOTB rule pxCreatePDF in the process. The PDF generation was implemented for multiple screens with custom section rules. One of the section was configured to show the list of case attachments (which uses a Data Page to display the file names). The PDF generation is not happening on time when the screen with the attachments list is displayed where as the pdf generation for other screens works good.

On analysis, we could see PEGA using an open API to convert the stream to pdf in HTMLToPDF activity which takes longer duration than expected for PDF generation.

This happens sporadic in production. Not replicable in Dev or in Testing environments.

Have anyone faced this issue, if yes, could you please share how to solve this.

Log content:

at com.pega.pegarules.integration.engine.internal.util.PDFUtilsImpl.invokePD4ML(PDFUtilsImpl.java:240)
at com.pega.pegarules.integration.engine.internal.util.PDFUtilsImpl.generatePDF(PDFUtilsImpl.java:171)
at com.pega.pegarules.integration.engine.internal.util.PDFUtilsImpl.generatePDF(PDFUtilsImpl.java:193)
at com.pegarules.generated.activity.ra_action_htmltopdf_6f21429218308b1870939b586f71bf9d.step9_circum0(ra_action_htmltopdf_6f21429218308b1870939b586f71bf9d.java:736)
at com.pegarules.generated.activity.ra_action_htmltopdf_6f21429218308b1870939b586f71bf9d.perform(ra_action_htmltopdf_6f21429218308b1870939b586f71bf9d.java:213)
at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:2855)
at com.pega.pegarules.session.internal.mgmt.Executable.invokeActivity(Executable.java:11470)
at com.pegarules.generated.activity.ra_action_pyattachaspdf_a7743fd2c51eca1a1cbb3e940ddc5d93.step6_circum0(ra_action_pyattachaspdf_a7743fd2c51eca1a1cbb3e940ddc5d93.java:524)
at com.pegarules.generated.activity.ra_action_pyattachaspdf_a7743fd2c51eca1a1cbb3e940ddc5d93.perform(ra_action_pyattachaspdf_a7743fd2c51eca1a1cbb3e940ddc5d93.java:162)

@KrishnakanthT3527 It is not idea to use heavy customization for generating pdfs, customizations are supported to some extent , u can extend css etc., If there are heavy customizations need to use third party tools , in the form of a service.

Hi @KrishnakanthT3527,

We also faced same issue, we handled by moving this pdf generation to spin off flow, to happen the generation parallel approach.

Thanks.

We have not used any customized UI elements part from the Section rule and Table configuration within the section. We tried to refer couple of articles and reached out to PEGA as well. As we didn’t any satisfactory answers, we have moved the PDF generation to asynchronous process by adding a new sub-flow with wait shape and SLA. This solved the issue by not impacting the users.

@vinay kumar karumanchi We have not used any customized UI elements part from the Section rule and Table configuration within the section.

@DhanasekarC0202 Thanks, we implemented async process in the flow by ding a wait and sla.