Quantcast
Channel: Como solucionar el (Uncaught Exception: FPDF error) al intentar generar PDF con PHP - Stack Overflow en español
Viewing all articles
Browse latest Browse all 3

Como solucionar el (Uncaught Exception: FPDF error) al intentar generar PDF con PHP

$
0
0

Error al intentar crear un archivo PDF con PHP y la libreria FPDF

Fatal error: Uncaught Exception: FPDF error: Some data has already been output, can't send PDF file (output started at C:\xampp\htdocs\paginaoctago\temp\lev_6\ord_com.php:68) in C:\xampp\htdocs\paginaoctago\temp\lev_6\fpdf\fpdf.php:271 Stack trace: 0 C:\xampp\htdocs\paginaoctago\temp\lev_6\fpdf\fpdf.php(1052): FPDF->Error('Some data has a...') #1 C:\xampp\htdocs\paginaoctago\temp\lev_6\fpdf\fpdf.php(999): FPDF->_checkoutput() #2 C:\xampp\htdocs\paginaoctago\temp\lev_6\ord_com.php(538): FPDF->Output() #3 {main} thrown in C:\xampp\htdocs\paginaoctago\temp\lev_6\fpdf\fpdf.php on line 271

El código es el siguiente:

<body><script src="js/main.js"></script> <script src="consultas.js"></script><script src="funciones_de_ord_comp.js"></script><?phprequire('fpdf/fpdf.php');$pdf = new FPDF();$pdf->AddPage();$pdf->SetFont('Arial','B',16);$pdf->Cell(40,10,'¡Hola, Mundo!');$pdf->Output();?></body>

Viewing all articles
Browse latest Browse all 3

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>