I'm trying to show a PDF in a magento view in a modul that I did,
I use html2fpdf.php, in normal php page everything goes good but in one magento phtml page
I receive that: %PDF-1.3 3 0 obj <> endobj
and a lot off more.
I think that can be a problem with magento header:
<?php
header_remove();
header('Content-type: application/pdf');
include_once ('htmlpdf/html2fpdf.php');
$pdff = "
<html>
<head>
<title>Titulo del archivo pdf</title>
</head>
<body>
<p>Este es el texto del archivo pdf. Podemos incluir imagenes, enlaces, etc.</p>
</body>
</html>
";
$pdf = new html2fpdf();
$pdf->AddPage();
$pdf -> WriteHTML($pdff);
$pdf -> Output();
I tried to change my layout in my module but the header come from another place and I don't know how to remove it, or maybe that's not possible in magento.