Support Article
Generated PDF does not have correct format
SA-91724
Summary
HTMLToPDF activity is used to generate a PDF from existing sections which use the skin component created in the application skin. The generated PDF file does not retrieve the skin that is rendered in the user interface.
Error Messages
Not Applicable
Steps to Reproduce
- Create a custom skin in the Application skin.
- Apply the custom skin format in the section content.
- Generate the PDF using the HTMLToPDF activity.
Root Cause
A defect in Pegasystems’ code or rules.
The pd4ml library has rendering issues with inline format for grids.
Resolution
Perform the following local-change:
- Add the pdfselect CSS format in a dynamic layout container inline dynamic layouts.
- Apply the below CSS styles for PDF,
<style>
.layout-content-inline.pdfselect > .content-item.content-field,
.layout-content-inline.pdfselect > .content-item.content-label,
.layout-content-inline.pdfselect > .content-item.content-layout,
.layout-content-inline_grid_double > .content-item.content-sub_section {
display: inline-block!important;
width: 33.33%!important;
margin: 0px 7.0px 7.0px 0px!important;
padding: 0px!important;
white-space: nowrap!important;
vertical-align: top!important;
}
.layout-content-polaris_8px_vertical > .content-item.content-field,
.layout-content-polaris_8px_vertical > .content-item.content-label,
.layout-content-polaris_8px_vertical > .content-item.content-layout,
.layout-content-polaris_8px_vertical > .content-item.content-sub_section {
display: inline-block!important;
width:1%!important;
margin: 0px 7.0px 7.0px 0px!important;
padding: 0px!important;
white-space: nowrap!important;
vertical-align: top!important;
}
</style>
Published April 3, 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.