CalcBuilder Forum

Customize pdf styling

User moon_1892 2014-12-04 22:55:31

Is there a way to fine-tune the styling/css of the pdf output without filling the layout with a bunch of inline styles?

Moonsoft support 2014-12-05 11:14:54


PDF library is able to handle classes and import css files. By default, if you enable 'import boostrap' in your calculator, JOOMLA/modules/mod_calcbuilder/assets/css/default.css is imported, so you could add your classes there.
In order to add new css files, you can edit JOOMLA/components/com_calcbuilder/views/calcbuilder/tmpl/pdf.php file, copy any of the css import lines and create your own:

$stylesheet = file_get_contents ( JURI::base () . 'modules/mod_calcbuilder/assets/css/YOUROWN.css' );
$mpdf->WriteHTML ( $stylesheet, 1 );

placing them at line 34


List Manager

Build different lists for your site

Buy now!
Support/development 40 hours

With the peace of mind of having a professional team at your service (20% discount)

Buy now!