Comments (6)
If that's actually a full php example, you need to mark it as code so it doesn't get interpreted:
``` code here ```
from mpdf.
Si en realidad se trata de un ejemplo completo de PHP, debes marcarlo como código para que no se interprete:
<p><b style="font-size: 0.73rem;"><u><br></u></b></p><p><b style="font-size: 0.73rem;"><u><br></u></b></p><p><b style="font-size: 0.73rem;"><u>test</u></b><br></p><table border="0" cellpadding="0" cellspacing="0" width="662" style="width: 498pt;">
<colgroup><col width="63" style="mso-width-source:userset;mso-width-alt:2304;width:47pt">
<col width="64" span="5" style="width:48pt">
<col width="57" style="mso-width-source:userset;mso-width-alt:2084;width:43pt">
<col width="74" span="3" style="mso-width-source:userset;mso-width-alt:2706;
width:56pt">
</colgroup><tbody><tr height="20" style="mso-height-source:userset;height:15.6pt">
<td colspan="10" height="20" class="xl69" width="662" style="height:15.6pt;
width:498pt">1. Entrega del servicio 1.</td>
</tr>
<tr height="20" style="height:15.0pt">
<td colspan="10" height="20" class="xl69" width="662" style="height:15.0pt;
width:498pt">2. Entrega del servicio 2.</td>
</tr>
<tr height="20" style="height:15.0pt">
<td colspan="10" height="20" class="xl69" width="662" style="height:15.0pt;
width:498pt">3. Entrega del servicio 3</td>
</tr>
<tr height="20" style="height:15.0pt">
<td colspan="10" height="20" class="xl70" width="662" style="height:15.0pt;
width:498pt">- titulo</td>
</tr>
<tr height="20" style="height:15.0pt">
<td colspan="10" height="20" class="xl70" width="662" style="height:15.0pt;
width:498pt">- requerimiento 1</td>
</tr>
<tr height="20" style="height:15.0pt">
<td colspan="10" height="20" class="xl70" width="662" style="height:15.0pt;
width:498pt">- requerimiento 2</td>
</tr>
<tr height="20" style="height:15.0pt">
<td height="20" class="xl66" colspan="10" style="height:15.0pt;mso-ignore:colspan">- requerimiento 3</td>
</tr>
<tr height="18" style="mso-height-source:userset;height:14.1pt">
<td height="18" class="xl65" width="63" style="height:14.1pt;width:47pt"><br></td><td class="xl65" width="64" style="width:48pt"></td><td class="xl65" width="64" style="width:48pt"></td><td class="xl65" width="64" style="width:48pt"></td><td class="xl65" width="64" style="width:48pt"></td><td class="xl65" width="64" style="width:48pt"></td><td class="xl65" width="57" style="width:43pt"></td><td class="xl65" width="74" style="width:56pt"></td><td class="xl65" width="74" style="width:56pt"></td><td class="xl65" width="74" style="width:56pt"></td></tr>
<tr height="20" style="height:15.0pt">
</tr>
<tr height="19" style="mso-height-source:userset;height:14.45pt">
</tr></tbody></table><p><br></p><p style="text-align: center; "><b>TEST TEST TEST.</b></p><p style="text-align: center; "><b><br></b></p>
ready
from mpdf.
Can you make a minimal example including php?
Also, that html is not really valid, but it looks like it's coming from a Microsoft product, so that's not really surprising.
from mpdf.
Here is the example: It appears that removing the init_set commands allows for a preview, but this was not the case with older versions. Additionally, the format looks completely different. Finally, it still points to an undefined variable in the MPDF class.
<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
require_once '../../lib/vendor/autoload.php';
$mpdf = new \Mpdf\Mpdf();
$html = '<p><u><br></u></p><p><u><br></u></p><p><u>Notas importantes respecto al servicio</u><br></p><table border="0" cellpadding="0" cellspacing="0" width="662" style="width: 498pt;"><br />
<br />
<br />
<br />
<br />
<tbody><tr height="20" style="mso-height-source:userset;height:15.6pt"><br />
<td colspan="10" height="20" class="xl69" width="662" style="height:15.6pt;<br />
width:498pt">1. Entrega del servicio: a coordinar.</td><br />
</tr><br />
<tr height="20" style="height:15.0pt"><br />
<td colspan="10" height="20" class="xl69" width="662" style="height:15.0pt;<br />
width:498pt">2. Los trabajos están cotizados para ejecutarse de lunes a<br />
viernes en horario de 08:30 a 17:30 hrs.</td><br />
</tr><br />
<tr height="20" style="height:15.0pt"><br />
<td colspan="10" height="20" class="xl69" width="662" style="height:15.0pt;<br />
width:498pt">3. Por parte del cliente:</td><br />
</tr><br />
<tr height="20" style="height:15.0pt"><br />
<td colspan="10" height="20" class="xl70" width="662" style="height:15.0pt;<br />
width:498pt">- Estacionamiento para nuestro camión o vehículo de laboratorio.</td><br />
</tr><br />
<tr height="20" style="height:15.0pt"><br />
<td colspan="10" height="20" class="xl70" width="662" style="height:15.0pt;<br />
width:498pt">- Contar con los servicios de higiene básicos (baño, agua<br />
potable) para nuestros técnicos.</td><br />
</tr><br />
<tr height="20" style="height:15.0pt"><br />
<td colspan="10" height="20" class="xl70" width="662" style="height:15.0pt;<br />
width:498pt">- Disponibilidad total de la(s) balanza(s).</td><br />
</tr><br />
<tr height="20" style="height:15.0pt"><br />
<td height="20" class="xl66" colspan="10" style="height:15.0pt;mso-ignore:colspan">-<br />
Tener grúa horquilla para el traslado de masas patrones y operario de ésta,<br />
en el caso de plataformas.</td><br />
</tr><br />
<tr height="18" style="mso-height-source:userset;height:14.1pt"><br />
<td height="18" class="xl65" width="63" style="height:14.1pt;width:47pt"><br></td><td class="xl65" width="64" style="width:48pt"></td><td class="xl65" width="64" style="width:48pt"></td><td class="xl65" width="64" style="width:48pt"></td><td class="xl65" width="64" style="width:48pt"></td><td class="xl65" width="64" style="width:48pt"></td><td class="xl65" width="57" style="width:43pt"></td><td class="xl65" width="74" style="width:56pt"></td><td class="xl65" width="74" style="width:56pt"></td><td class="xl65" width="74" style="width:56pt"></td></tr><br />
<tr height="20" style="height:15.0pt"><br />
</tr><br />
<tr height="19" style="mso-height-source:userset;height:14.45pt"><br />
</tr></tbody></table><p><br></p><p style="text-align: center; ">EN EL CASO EVENTUAL QUE EL EQUIPO NO SUPERE LAS PRUEBAS DE CALIBRACIÓN, ESTO NO ES RESPONSABILIDAD DEL LABORATORIO DE METROLOGiA COVERY S.A. Y LOS TRABAJOS SERÁN FACTURADOS DE ACUERDO A LOS VALORES COTIZADOS.</p><p style="text-align: center; "><br></p>';
$mpdf->writeHTML($html);
$mpdf->Output('test.pdf', 'I');
from mpdf.
Can you make a minimal example? It appears to be something with the <br>
tag, so find out which one it is.
from mpdf.
Your line breaks in the "full" example code between <table
and <tbody
or between tr
tags don't make sense. You even have br
tags inside other HTML tag parameters. Use well-formed HTML and the error should not appear (as it does not with your previous HTML code examples).
Closing as "unable to reproduce", can reopen with more concise code example previewing the error.
from mpdf.
Related Issues (20)
- Quickfix for color containing CSS variable is bad
- Hyphenation of words with hyphens not as expected HOT 3
- Add security reporting feature to the repo HOT 1
- There are some bugs related to border-collapse and padding and border with tables HOT 3
- Mpdf.php (#16141): Trying to access array offset on value of type null HOT 10
- Adding text to existing PDF file, can not move pdf file
- converting a .xlsx file to .pdf not retain the specified print area
- Undefined array key "VALUE" HOT 1
- htmlpagefooter element does not respect z-index HOT 4
- Error in pdf generation - Invalid argument supplied for foreach()
- Document structure is invalid or damaged HOT 6
- Getting Fatal error sometimes with the ColorConverter HOT 2
- Attribute value truncated when containing double quote character and using single quote delimiter
- Nesting a table inside a tfoot element results in "Trying to access array offset on null"
- PDF/A : endobj is missing EOL-Marker
- ArrayAccess::offsetSet()" might add "void" as a native return type
- Error while trying to save pdf to a folder. HOT 1
- Write HTML - NOTICE Uninitialized string offset - XXXX on Otl.php HOT 1
- Subsequent calls to Output() of pdf with images are missing images in 2++ data HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mpdf.