This is the pdf that generates me missing the data of the first column
this is the php code where I have a function
public function ventas($link,$mes_inicio,$mes_finalizacion,$año)
{
$fecha="01/".$mes_inicio."/".$año;
$fecha2="30/".$mes_finalizacion."/".$año;
$sql=oci_parse($link, "SELECT *FROM VENTA WHERE FECHA_COMPRA BETWEEN '$fecha' AND '$fecha2'");
if(oci_execute($sql))
{
$sql1=oci_parse($link, "SELECT FOTO FROM EMPRESA");
if(oci_execute($sql1))
{
if($row1=oci_fetch_array($sql1))
{
if(is_null($row1["FOTO"]))
{
echo "error al cargar fotografia";
}
else
{
echo "<div class='encabezado'><a hre='#' class='imagen'><img src='../".$row1['FOTO']."'></img></a><h5>INFORME DE LAS VENTAS EN GENERAL</h5></div><div class='encabezado'><h5>DE:$fecha</h5><h5>AL:$fecha2</h5></div>";
echo "<div class='titulo'><h5>USUARIO</h5></div><div class='titulo'><h5>FECHA</h5></div><div class='titulo'><h5>CANTIDAD PRODUCTOS</h5></div><div class='titulo'><h5>TOTAL VENDIDO</h5></div>";
while($row=oci_fetch_array($sql))
{
echo "<div><h5>".$row["ID_USUARIO"]."</h5></div><div><h5>".$row["FECHA_COMPRA"]."</h5></div><div><h5>".$row["CANTIDAD_TOTAL"]."</h5></div><div><h5>Q.".$row["PRECIO_TOTAL"]."</h5></div>";
}
}
}
else
{
echo "Error en la asociacion";
}
}
else
{
echo "Error en consulta";
}
}
else
{
echo "error en consulta";
}
}
here I send the html to dompdf
<?php require_once '../dompdf/autoload.inc.php';
require_once '../dompdf/lib/html5lib/Parser.php';
require_once '../dompdf/lib/php-font-lib/src/FontLib/Autoloader.php';
require_once '../dompdf/lib/php-svg-lib/src/autoload.php';
require_once '../dompdf/src/Autoloader.php';
use Dompdf\Dompdf;
use Dompdf\Options;
$dompdf = new Dompdf();
$dompdf->set_option('isHtml5ParserEnabled', true);
define("DOMPDF_ENABLE_CSS_FLOAT", true);
session_name('ADMINISTRADOR');
session_start();
ini_set("memory_limit", "128M");
$html = $_SESSION['pdf']['content'];//obtenemos la factura de la sesion a la variable $html
$filename = $_SESSION['pdf']['filename'];//obtenemos el nombre de la factura que esta en la sesion a la variable $filename
unset($_SESSION['pdf']);// Borramos la variable de sesión
$dompdf = new Dompdf();//creamos una nueva clase de dompdf
$dompdf->setPaper('A4','portrait'); // (Opcional) Configurar papel y
orientación'portrait''landscape'
$dompdf->loadHtml(utf8_encode($html));//agregamos el contenido de la factura por
medio de la variable $html
$dompdf->render(); // Generar el PDF desde contenido HTML
$pdf = $dompdf->output(); // Obtener el PDF generado
$dompdf->stream($filename); // Enviar el PDF generado al navegador y por medio
de la variable $filename indicamos el nombre
?>