Hi, I used the snipet provided by this thread to print a html file, however, I have a nasty html file, with tables, and styles inside the table, and stuff like that:

Qt Code:
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2.  
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <HEAD>
  5. <meta name="tipo_contenido" content="text/html;" http-equiv="content-type" charset="utf-8">
  6. </HEAD>
  7. <table border="1" cellspacing="0" cellpadding="0" width="100%" style="font-size:12px;line-height:20px;">
  8. <tbody>
  9. <tr>
  10. <td valign="middle" align="left" width="40%" height="30">
  11. Nombre:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br/>
  12. Razon social:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br/>
  13. </td>
  14. <td valign="middle" align="left" width="20%" size="80">
  15. <span style="font-size:8em;">&nbsp;</span>
  16. </td>
  17.  
  18. <td valign="middle" align="left" width="40%" height="120">
  19. Nro Comprobante: <br/>
  20. Fecha y hora:<br/>
  21. </td>
  22.  
  23. </tr>
  24. <tr>
  25. <td valign="TOP" colspan="2">
  26. Domicilio comercial:<br/>
  27. Domicilio Fiscal:<br/>
  28. Iva: <br/>
  29. </td>
  30. <td valign="TOP" align="left" colspan="1">
  31. Cuit: <br/>
  32. Ing Brutos: <br/>
  33. Inicio Actividades:<br/>
  34. </td>
  35. </tr>
  36. <tr>
  37. <td valign="middle" colspan="4" height="">
  38. Identificacion:<br/>
  39. Senior(es): <br/>
  40. Domicilio: <br/>
  41. Iva: <br/>
  42. Cuit: <br/>
  43. </td>
  44. </tr>
  45. </tbody>
  46. </table>
  47. <table border="1" RULES=COLS cellspacing="1" cellpadding="4" width="100%">
  48. <tr>
  49. <td width="96" align="right" height="22" align="middle" style="font-size:12px">NETO</td>
  50. <td width="96" align="right" height="22" align="middle" style="font-size:12px">IVA FACT</td>
  51. <td width="96" align="right" height="22" align="middle" style="font-size:12px">IVA SOB</td>
  52. <td width="96" align="right" height="22" align="middle" style="font-size:12px">IVA 21%</td>
  53. <td width="96" align="right" height="22" align="middle" style="font-size:12px">IVA 27%</td>
  54. <td width="96" align="right" height="22" align="middle" style="font-size:12px">IVA 10.5%</td>
  55. <td width="96" align="right" height="22" align="middle" style="font-size:12px">TOTAL</td>
  56. </tr>
  57. </table>
  58. </html>
To copy to clipboard, switch view to plain text mode 

However Qt print it very different as how Chrome, firefox and IE do it... any idea or workaround? thanks!