Rowspan break table on a document
Meaning of page-break-before?
Multi Column causes issues with
It looks to me that using multiple columns is implemented similar to a table (which also will cause the styles of <div> etc. to break)
The results are similar, but not identical to the us of tables. But both will cause <div> elements with border styles (rounded etc..., and also padding, margins etc.) to display properly or at all.
My first question is: Is there a specific reason why mpdf can not support styles of <div> elements in tables (or multiple columns for that matter)?
Using a <div> or <span> is very common to get a specific style to a certain part of the document.
Second Question: If I want to use use elements with rounded corners, and other styles regarding borders inside a multicolum document or inside tables, is there any solution for this?
How to set the image resolution for the whole document?
How to get a multibyte language character in the TOC?
But I cant get Chines in the table of contents in my PHP this:
<tocentry lang='.$row['langcode'].' content=".$tocname.'" />
gives me boxes at the TOC when Chinese is entered.
'<tocentry content="<span lang='.$row['langcode'].'>'.$tocname.'</span>" />';
also fails
I'm thinking I may need to hack your code!
I've had a quick look at 'tocontents.php' - any advice where the best place to do this is?
Thanks
E-mail a PDF file
Float with Div
Is there way that would could use float in div with in columns. if it is not there how could we implement this.
thanks and regards,
Imran Khan
Generating pdf is too slow
Subscript Problem
mpdf is not subscript the Zero "0". please help.
Footer all pages
Used Version: mPFD 6.0
Problem: Footer appears only in the
last page of the PDF file generated by mPDF.
How am I making this: Using
setHTMLFooter method to create the footer, with an HTML content as
parameter.
Example:
$htmlFooter
'<table
class=tbl_footer width=1000>' .
'<tr>'.
"<td
align=left>ID: {$param['ID']}</td>
<td align=center>{$order}</td>
<td align=right>{$page}</td>".
'</tr>'.
'<tr>'.
"<td
align=left>{$filters}</td>
<td align=left></td> <td
align=right>Usuário:{$userName}</td>".
'</tr>'.
'</table>';
$mpdf
= new
mPDF('c',$this->_papel,0,'',15,15,40,16,5,5,'P');
$mpdf->SetHTMLHeader(“HTML
header”);
$mpdf->WriteHTML(“HTML
body”,2)
$mpdf->SetHTMLFooter($htmlFooter);
$mpdf->Output($this->name);
What procedure can I use to generate
footer in all the pages of the PDF document using setHTMLFooter
method in mPDF 6.0?
Feature Request: Border-radius on spans
I was wanting to see if it is possible to implement a border-radius for spans.
Ie:
<?php
$prob = '
<span style="border-radius:20px; border:thin solid black;">ho</span>
';
include_once($_SERVER['DOCUMENT_ROOT']."/mpdf60/mpdf.php");
$mpdf=new mPDF();
$mpdf->WriteHTML($prob);
$mpdf->Output();
?>
Lists inside tables don't render disc/bullet counters properly
// require_once 'lib/mpdf5/mpdf.php';
require_once 'lib/mpdf6/mpdf.php';
// Initialize PDF.
$pdf = new mPDF('c','LETTER',0,'',12.7,12.7,12.7,12.7);
$body = '';
$body .= '<div>';
$body .= '<ul>';
$body .= '<li>Test 1</li>';
$body .= '<li>Test 2</li>';
$body .= '<li>Test 3</li>';
$body .= '</ul>';
$body .= '</div>';
$body .= '<table>';
$body .= '<tr>';
$body .= '<td>';
$body .= '<ul>';
$body .= '<li>Test 1</li>';
$body .= '<li>Test 2</li>';
$body .= '<li>Test 3</li>';
$body .= '</ul>';
$body .= '</td>';
$body .= '</tr>';
$body .= '</table>';
$pdf->WriteHTML($body,2);
$fileName = 'Test-List-Report.pdf';
$pdf->Output($fileName, 'I');
The top list comes out formatted correctly, with a standard disc/bullet character used as the list counter (demonstrating the character is available in the font), but the list inside the table uses hyphens instead, as seen in this image:

I'm not sure why the code for displaying lists inside tables is handling the printing of counters differently from the base list rendering code, but there seems to be some sort of issue with character selection in the former that doesn't exist in the latter.
Does anyone know of a solution or workaround for getting list counters to render properly in tables?
src path in via variable
using php variable in HTML entry
$html = ' <div> $pieces </div> ';
Layout Problem
SVG illegal manipulation with layers
Fieldset - Legend has wrong fonttype
sorry a smal issue, when inside a frameset is a tag with monotyp font, in this case class="mono", the legend get the same font.
This is only if there is some conent in the pre tag. If it is empty the font is arial. It is not the pre tag because when I change it to a span it have the same problem.
Do you have any idea?
Greetings
Frank
<div class="grid-66 mobile-grid-100 tablet-grid-100">
<fieldset class="sec">
<legend>Karosserie-Prüfung</legend>
<b style="margin-right: 10px;">Status</b> <span class="fakeinput mark_1">in Ordnung</span>
<br><div class="fakeinput"><pre class="mono"></pre></div>
</fieldset>
<br>
<fieldset class="sec">
<legend>Wartung laut DSR</legend>
<div>
<b style="margin-right: 10px;">Status</b> <span class="fakeinput mark_1">in Ordnung</span>
<br><div class="fakeinput"><pre class="mono">22.07.2015 6 km | Übergabe-Inspektion</pre></div>
</div>
</fieldset>
</div>
Bugfix for external special links (mailto, fax, tel, ..)
if (substr($path,0,7) == "mailto:") { return; }
into:
if(preg_match('@^(mailto|tel|fax):.*@iu', $path)) { return; }
or like:
if(preg_match('@^(mailto|tel|fax|http|https|ftp|ftps):.*@iu', $path)) { return; }
Is this the offical mpdf repository?
https://github.com/mpdf/mpdf
Auto print on tablet/phone popups
tags with 0 as value not displaying.
This does NOT happen in 5.7, only in 6.0
<?php
$prob = 'hi<b>0</b><b>1</b>';
include_once($_SERVER['DOCUMENT_ROOT']."/mpdf60/mpdf.php");
$mpdf=new mPDF();
$mpdf->WriteHTML($prob);
$mpdf->Output();
?>
This can be fixed by modifying line 21646 and adding the bit in green.
// Remove empty items // mPDF 6
for($i=$array_size-1; $i > 0; $i--) {
if (empty($arrayaux[$i][0]) && $arrayaux[$i][0]!=='0' && $arrayaux[$i][16]!=='0' && empty($arrayaux[$i][7])) {
unset($arrayaux[$i]);
}
}