
Some data has already been output to browser, can't send PDF file
Publicado por gaaa18 (5 intervenciones) el 06/06/2014 21:19:49
este es mi error amigos a ver si me podrian ayudar ya que no me imprime el reporte e pdf:
Conexion exitosa TCPDF ERROR: Some data has already been output to browser, can't send PDF file
y este es mi codigo:
Conexion exitosa TCPDF ERROR: Some data has already been output to browser, can't send PDF file
y este es mi codigo:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<?php
include('fpdf.php');
require_once('../tcpdf/config/lang/eng.php');
require_once('../tcpdf/tcpdf.php');
require("../modelo/consulta.php");
$objConsulta= new consulta();
$perfil="";
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
// set document information
$pdf->SetCreator(PDF_CREATOR);
$pdf->SetAuthor('http://alvarenga.comule.com');
$pdf->SetTitle('Reporte de Usuarios');
$pdf->SetSubject('Tutirial de reportes en PDF con PHP y MySQL');
$pdf->SetKeywords('Reporte, usuario, php, mysql');
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
//set margins
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
//set auto page breaks
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
//set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
//set some language-dependent strings
$pdf->setLanguageArray($l);
// ---------------------------------------------------------
// set default font subsetting mode
$pdf->setFontSubsetting(true);
$pdf->SetFont('helvetica', '', 9, '', true);
// Add a page
// This method has several options, check the source code documentation for more information.
$pdf->setPrintHeader(false); //no imprime la cabecera ni la linea
$pdf->setPrintFooter(true); // imprime el pie ni la linea
$pdf->AddPage();
//*************
ob_end_clean();//rompimiento de pagina
//ob_clean();
//*************
$html = $objConsulta->reportePdfUsuarios();
$pdf->writeHTMLCell($w=0, $h=0, $x='', $y='', $html, $border=0, $ln=1, $fill=0, $reseth=true, $align='', $autopadding=true);
$pdf->Output('Reporte usuarios.pdf', 'I');
?>
Valora esta pregunta


0