The only way I have found to indent paragraphs in the PDF letters I am producing with CiviCRM and DOMPDF, is to add (manually in the code) a class attribute to the HTML <p>
tag as in <p class="indent">
and to put next line into the www/wp-content/plugins/civicrm/civicrm/css/print.css
file:
.indent {
margin-left: 8cm;
}
This works, but since print.css
is overwritten at each update of CiviCRM, I am asking for a better solution, not loosing the settings at each update.
I tried to develop an extension called pdfstyle
having an extra CSS file pdfstyle.css
in its top directory, which is referred by the smarty statement
{crmStyle ext=pdfstyle file=pdfstyle.css}
which is poorly documented, by the way, as far as I have found. The styles defined in this way are not applied to the PDF output. I tried also to enclose the CSS statements in pdfstyle.css
into a statement @media print
with the same lack of results. I have no idea on how to go further.