Support Article
HTMLToPDF activity does not apply external CSS styles
SA-3659
Summary
When using the HTMLToPDF activity, the PDF is generated but no styles or formatting is applied.
Error Messages
None
Steps to Reproduce
1. Generate HTML markup that references external stylesheets.
2. Send markup to HTMLtoPDF activity.
3. View PDF output.
Root Cause
The root cause of this problem is in a third-party product integrated with PRPC. This is a known limitation of the library PRPC uses for HTML to PDF (PD4ML).
Some PRPC layouts (such as Dynamic Layouts) use inline-block CSS and this issue will occur because PD4ML does not support certain advanced CSS features.
Resolution
Either using different layouts (such as Free Layout) or dircetly referencing the CSS within the HTML rule (and not via a <link> tag) have been used to work around this limitation in the PD4ML library.
Published January 31, 2016 - 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.