Código PHP:
<?php ob_start(); ?>
<html>
<title></title>
<head>
<script type="text/javascript" src="DATA_TABLE/media/js/jquery.js"></script>
<script type="text/javascript" src="DATA_TABLE/media/js/jquery.dataTables.js"></script>
<link href="DATA_TABLE/media/css/jquery.dataTables.css" media="screen" rel="stylesheet" type="text/css" />
</head>
<body>
<h2>Lista de usuarios</h2>
<table bordercolor="#BDBDBD" id='sgd' class='display' cellspacing='0'>
<thead>
<tr bgcolor="#CCCCCC">
<td>Nombre</td>
<td>Apellido</td>
<td>Email</td>
<td>Edad</td>
</tr></thead>
<tbody>
<tr bgcolor="#FF9933">
<td>Antonio</td>
<td>López</td>
<td>[email protected]</td>
<td>25</td>
</tr>
<tr bgcolor="#FF9933">
<td>Sergio</td>
<td>Martínez</td>
<td>[email protected]</td>
<td>47</td>
</tr>
<tr bgcolor="#FF9933">
<td>Natalia</td>
<td>Estrada</td>
<td>[email protected]</td>
<td>22</td>
</tr>
</tbody>
</table>
<script type="text/javascript">
$(document).ready(function() {
$('#sgd').dataTable( {
"order": [[ 3, "desc" ]]
} );
} );
</script>
</body>
</html>
<?php
require_once("dompdf_config.inc.php");
$dompdf = new DOMPDF();
$dompdf->load_html(ob_get_clean());
$dompdf->render();
$pdf = $dompdf->output();
$filename = "ejemplo".time().'.pdf';
file_put_contents($filename, $pdf);
$dompdf->stream($filename);
?>