I have a little problem with the FPDF tool on my website, the thing is that localhost everything works perfectly, but by taking my php to the online hosting and requesting the pdf the page is completely blank, without printing any results or error.
my php code is as follows:
<?php
require('fpdf.php');
$pdf=new FPDF();
$pdf->AddPage();
$pdf->Line(20,20,190,20);
$pdf->Image('../imagenes/logo.png',10,6,30);
$pdf->SetFont('Helvetica','B',35);
$pdf->Cell(0,40,'ORDEN DE COMPRA',0,1,'C');
$pdf->Line(20,38,190,38);
$pdf->Rect(20,38,100,14);
$pdf->Rect(120,38,70,14);
$conexion = mysqli_connect('localhost','id5532765_martita_admin','969895752','id5532765_martita');
$compras=mysqli_query($conexion, "SELECT cliente.nombres,apellidos, compras.num_venta,nombre,imagen,cantidad,precio,psubtotal,fecha,direccion,celular FROM cliente INNER JOIN compras ON cliente.id_usuario=compras.id_usuario WHERE num_venta=".$_GET['num_venta']);
$numeroventa=0;
while ($row=mysqli_fetch_array($compras)){
if($numeroventa!=$row['num_venta']){
$pdf->SetFont('Helvetica','B',23);
$pdf->Cell(12);
$pdf->Cell(0,-9,utf8_decode('PEDIDO N°'.$row['num_venta']),0,1,'L');
$pdf->SetFont('Helvetica','B',23);
$pdf->Cell(125);
$pdf->Cell(0,9,utf8_decode($row['fecha']),0,1,'L');
//Nombre
$pdf->SetFont('Helvetica','B',14);
$pdf->Cell(10);
$pdf->Cell(0,25,utf8_decode("SOLICITADO(A) POR:"),0,1,'L');
$pdf->Rect(75,58,115,8);
$pdf->SetFont('Helvetica','',14);
$pdf->Cell(67);
$pdf->Cell(0,-25,utf8_decode($row['nombres']."\n".$row['apellidos']),0,1,'L');
//Direccion
$pdf->SetFont('Helvetica','B',14);
$pdf->Cell(10);
$pdf->Cell(0,49,utf8_decode("DIRECCIÓN:"),0,1,'L');
$pdf->Rect(52,70,138,8);
$pdf->SetFont('Helvetica','',14);
$pdf->Cell(43);
$pdf->Cell(0,-49,utf8_decode($row['direccion']),0,1,'L');
//Celular
$pdf->SetFont('Helvetica','B',14);
$pdf->Cell(10);
$pdf->Cell(0,73,utf8_decode("CELULAR O TELÉFONO DE REFERENCIA:"),0,1,'L');
$pdf->Rect(124,82,66,8);
$pdf->SetFont('Helvetica','',14);
$pdf->Cell(115);
$pdf->Cell(0,-73,utf8_decode($row['celular']),0,1,'L');
$pdf->Ln(44);
//Comentario
//Tabla
$pdf->Ln(22);
$pdf->SetFont('Helvetica','B',11);
$pdf->Cell(11,5,'',0,'C',false);
$pdf->Cell(85,10,utf8_decode("DESCRIPCIÓN DEL PRODUCTO"),1,0,'L',false);
$pdf->Cell(17,10,'CANT.',1,0,'C',false);
$pdf->Cell(32,10,'PRECIO UNIT.',1,0,'C',false);
$pdf->Cell(35,10,'PRECIO TOTAL',1,0,'C',false);
}
$numeroventa=$row['num_venta'];
//Parte de los detalles
$pdf->SetFont('Helvetica','',10);
$pdf->Ln(10);
$pdf->Cell(11,5,'',0,'C',false);
$pdf->Cell(85,10,utf8_decode($row[3]),1,0,'L',false);
$pdf->Cell(17,10,$row[5],1,0,'C',false);
$pdf->Cell(32,10,'S/.'.number_format($row[6], 2, '.', ''),1,0,'R',false);
$pdf->Cell(35,10,'S/.'.number_format($row[7], 2, '.', ''),1,0,'R',false);
}
$conexion = mysqli_connect('localhost','id5532765_martita_admin','969895752','id5532765_martita');
$sumar=mysqli_query($conexion, "SELECT SUM(psubtotal) AS suma FROM compras WHERE num_venta=".$_GET['num_venta']);
while($row=mysqli_fetch_array($sumar)){
//Total
$pdf->SetFont('Helvetica','B',11);
$pdf->Ln(10);
$pdf->Cell(11,5,'',0,'C',false);
$pdf->Cell(134,10,'TOTAL A PAGAR:',1,0,'C',false);
$pdf->SetFont('Helvetica','',10);
$pdf->Cell(35,10,'S/.'.number_format($row['suma'], 2, '.', ''),1,0,'R',false);
}
$conexion = mysqli_connect('localhost','id5532765_martita_admin','969895752','id5532765_martita');
$compras=mysqli_query($conexion, "SELECT cliente.nombres,apellidos, compras.num_venta,nombre,imagen,cantidad,precio,psubtotal,fecha,direccion,celular FROM cliente INNER JOIN compras ON cliente.id_usuario=compras.id_usuario WHERE num_venta=".$_GET['num_venta']);
$numeroventa=0;
while ($row=mysqli_fetch_array($compras)){
if($numeroventa!=$row['num_venta']){
$pdf->Output('I', utf8_decode('PEDIDO N°'.$row['num_venta'].'.pdf'));
}
}
?>