Moonsoft Software Solutions

Customize pdf styling

Started 4 Dec 2014 · 1 reply

  1. moon_1892
    Is there a way to fine-tune the styling/css of the pdf output without filling the layout with a bunch of inline styles?
  2. Moonsoft support
    Hello,

    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

    Regards,

Still stuck?

Customers with an active license can open a support ticket.

Log in to open a ticket