He convertido HTML a formato DOC utilizando PHP.PageBreak al convertir HTML a docx y docx fromat - PHP
amablemente vea la siguiente captura de pantalla.
Mi problema es que necesito para imprimir primera tabla en la primera página y segunda tabla en la segunda página.
Aquí está mi conjunto de código.
header("Content-type: application/vnd.ms-word");
header("Content-Disposition: attachment;Filename=document_name.doc");
echo $html = '<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>HTML TO WORD</title>
</head>
<style type="text/css">
.table {
page-break-after: always;
}
</style>
<body>
<table width="600" border="1">
<tr>
<td height="105"> </td>
</tr>
<tr>
<td style="text-align:center; font-size:30px;color:#ed6500;"><b>Title</b></td>
</tr>
<tr>
<td style="text-align:center; color:#595959;">Author:
<span style="color:#9d402b; text-decoration:underline;">Author name</span></td>
</tr>
</table>
<table width="600" border="1">
<tr>
<td>Table Of Contents</td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td>Category 1</td>
</tr>
<tr>
<td style="padding-left:30px;">Sub Category 1</td>
</tr>
</table>
</body>
</html>';
¿Cómo puede hacerse esto?
Gracias de antemano ...
su trabajo alyo ... muchas gracias .... – Fero
"page-break-before: always" parece funcionar en cualquier elemento. Pero no "page-break-after: always". –
Cuando agrego "page-break-before: always" a un contenedor div Word parece aplicar esto también en cada elemento hijo. Necesita ser agregado a un elemento sin hijos. –