Please use https://stackoverflow.com/questions/tagged/mpdf for all your general questions or troubleshooting!
For contributing here, please see the guideline: https://github.com/mpdf/mpdf/blob/development/.github/CONTRIBUTING.md
Why is border-radius property not working when used on
mPDF Drupal module
PHP 5
<?php
$html='<table><tr><td style="background-color:black;padding:10px;border-radius:10px;">TEST</td></tr></table>';
if($downloadType == 'server'){
variable_set('pdf_using_mpdf_pdf_save_option', 2);
$filename = $surveyDetail->title . '_' . time();
pdf_using_mpdf_api($html, $filename);
$filename = $filename . '.pdf';
$filePath = 'sites/default/files/pdf_using_mpdf/' . $filename;
$attachment = array(
'filecontent' => file_get_contents($filePath),
'filename' => $filename,
'filemime' => 'application/pdf',
);
return $attachment;
}else{
variable_set('pdf_using_mpdf_pdf_save_option', 1);
pdf_using_mpdf_api($html, $surveyDetail->title);
}
?>
I guess it is using mPDF version 6
Code is at: http://cgit.drupalcode.org/PDF_using_mPDF/
The export happens in http://cgit.drupalcode.org/PDF_using_mPDF/tree/pdf_using_mpdf.module
Is this property listed as supported for tables in https://mpdf.github.io/css-stylesheets/supported-css.html ?
Border radius is not supported on table-related elements. See supported css link above.
It seems that border-radius is supported on <div> tags but even if I create a div inside a <td> html and then assign inline CSS for border-radius to that <div> in <td> then too it is not working. Is there any workaround for this? I have to use the table and cannot remove it.
Not that I know of. There is a limited CSS support for all elements inside tables.
Most helpful comment
It seems that border-radius is supported on
<div>tags but even if I create a div inside a<td>html and then assign inline CSS for border-radius to that<div>in<td>then too it is not working. Is there any workaround for this? I have to use the table and cannot remove it.