Support Article
PDF generates with incorrect format
SA-96027
Summary
User generates a PDF file using the out-of-the-box HTMLToPDF activity for an HTML rule which contains the Inline grid triple dynamic layout with borders. However, the grid format and borders are not applied in the PDF generated.Error Messages
Not Applicable
Steps to Reproduce
- Create a section with Inline grid triple dynamic layouts with borders
- Include the section inside the HTML rule
- Create an activity to generate the PDF file using the out-of-the-box HTMLToPDF activity
Root Cause
A defect in Pegasystems’ code or rules. An issue with the PD4ML library.
Resolution
Perform the following local-change:
- Add the below code to the respective HTML rule used for the generation of the PDF file:
<style>
/* For Inline grid triple */
.layout-content-inline_grid_triple > .content-item.content-field,
.layout-content-inline_grid_triple > .content-item.content-label,
.layout-content-inline_grid_triple > .content-item.content-layout,
.layout-content-inline_grid_triple > .content-item.content-sub_section {
display: inline-block !important;
width: 33.28% !important;
margin: 0.0px 0 7.0px 0px !important;
padding: 0 7.0px 0 0.0px !important;
white-space: normal !important;
vertical-align: top !important;
}
</style>
- Search for the Cascading Style Sheets (CSS) code for the dynamic layout border using browser developer tools
- Add the Cascading Style Sheets (CSS) code to pyCompactStylesForPDF.css
Published July 17, 2020 - Updated December 2, 2021
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.