Support Article
PDF does not reflect the changes in the Compact styles CSS
SA-82410
Summary
Changes made to the Compact styles PDF do not reflect on the generated PDF.
Error Messages
Not Applicable
Steps to Reproduce
- Update pyCompactStylesforPDF CSS to include the below code,
BODY{
padding:15px;
margin:30px;
font-family: OpenSans, sans-serif;
font-size: 14px;
background-image:none;
background-color:#FFF;
border: 5px solid #6094BA;
}
- Generate the PDF using pyAttachAsPDF which invokes the HTMLToPDF. Verify the generated PDF.
Root Cause
A third-party product issue.
The PD4ML does not consider the very first CSS entry and instead picks the second CSS entry onwards.
Resolution
Perform the following local-change:
Add a dummy Selector or Tag as first tag on the pyCompactStylesforPDF.css.
Published August 19, 2019 - 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.