Not able to calculate table cells sizes
I maintainer di solito rispondono entro 5 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 18/100
Direzione di ricerca
The payload names no source files, only the reproduction snippet: a five-column table with width: 100% passed to WriteHTML(). Run that snippet and check how the first column's width is computed compared with the others. Done means the columns are sized sensibly for the content and the rendered PDF shows the fix. The issue has been open 572 days with no reply and no linked pull request, so confirm the expected behaviour with maintainers first.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Guidelines
- I understand that if I fail to adhere to contribution guidelines and/or fail to provide all required details, this issue may be closed without review.
Description of the bug
The first column is getting weirdly wide. I was able to achieve that with just random English letters as well.
Here you can check the preview: https://ss.v-novicov.pro/2025/03/test.pdf
mPDF version
8.2.5
PHP Version and environment (server type, cli provider etc., enclosing libraries and their respective versions)
PHP 8.3.11
Reproducible PHP+CSS+HTML snippet suffering by the error
$mpdf = new \Mpdf\Mpdf(
array(
'margin_top' => 54,
'margin_bottom' => 34,
'margin_footer' => 10,
'margin_left' => 16,
'margin_right' => 16,
)
);
$mpdf->SetDefaultFontSize( 8 );
$mpdf->SetDefaultFont( 'helvetica' );
ob_start();
?>
<table style="width: 100%;">
<tr>
<td><b>Première mensualité rehaussée</b></td>
<td><b>Durée</b></td>
<td><b>Valeur résiduelle</b></td>
<td><b>Maintenance</b></td>
<td><b>Tarif mensuel*</b></td>
</tr>
<tr><td>5'000.00</td><td>12 Mois</td><td>CHF 5'000.00</td><td>Non</td><td>CHF 8'536.60 (11x)</td></tr><tr><td>0.00</td><td>48 Mois</td><td>CHF 0.00</td><td>Non</td><td>CHF 2'436.75 (48x)</td></tr><tr><td>0.00</td><td>48 Mois</td><td>CHF 0.00</td><td>CHF 100.00 / Mois</td><td>CHF 2'539.00 (48x)</td></tr>
</table>
<?php
$template = ob_get_clean();
$mpdf->WriteHTML( $template );
$mpdf->Output( 'test.pdf', \Mpdf\Output\Destination::STRING_RETURN ),
- Lingua principale
- PHP
- Stelle
- 4.7k
- Fork
- 1.1k
- Merge medio
- 6g 11h
- PR unite (30g)
- 4
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di mpdf/mpdf
-
SVG path arcs with an explicit zero radius throw DivisionByZeroErrorForse già presa @Syed-Shehroz-Sohail l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 5 giorni
-
Closing a column set with an image in it leaves the cursor below the page, wasting the rest of itAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 5 giorni
-
8.3: Local fallback for external stylesheets is inverted in CssLoader (basepathIsLocal check negated) — CSS silently dropped when remote fetch failsForse già presa @hemreduru l’ha presa 12 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 5 giorni
-
Tag/Td.php silently clears cell top/bottom borders when a row has a partial border (plus two warnings and a deprecation)Forse già presa @alizamani1616 l’ha presa 61 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 5 giorni
-
AdjustHTML() collapses multiple spaces inside quoted attribute values (src, href)Forse già presa @sornapudisuresh l’ha presa 130 giorni fa. Apertabug/fix help wanted HTML/CSS support
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
I maintainer di solito rispondono entro 5 giorni
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
-
sync-en
Difficoltà 1/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 2 giorni
-
Перевод устарел
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
follow-up
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno