Print to PDF - formatting with CSS/mpdf

Hi,

I’m having difficulty controlling the look of PDF pages created by the Print to PDF function.

The generated PDF bears little resemblance to the detail view/preview of the templates themselves.

It seems like the style sheet that the detail view is using is being lost in the process of converting to mPDF, and the only way to control the PDF page is with inline CSS within tinyMCE - which is not very manageable for controlling large and/or numerous PDF templates etc.

It wouldn’t be so bad if I the class and ID tags set in tinyMCE could be used, but it looks as though mPDF doesn’t support those tags, or at the least they are having no effect ?

What is the best way to manage the formatting of PDF templates?

Regards
Bungle

You’ll have to implement the styling in line, as due to a combination of TinyMCE and html purifier, any styles inside tags is stripped out.

You can use the MailChimp CSS Inliner Tool to implement your styles in-line so they work in SuiteCRM.

Thanks,

Will.

Thanks Will,

The link to the Inliner tool is helpful