/** * Streams the PDF directly to the browser * * @param string $filename the name of the PDF file * @param array $options associative array, 'Attachment' => 0 or 1, 'compress' => 1 or 0 */ function stream($filename, $options = null) { // Add page text $this->_add_page_text(); $options["Content-Disposition"] = $filename; $this->_pdf->stream($options); }
//| DRAW THE PAGE HEADER TEXT //+----------------------------------------------------------------------+ // User-Input: Name $pdf->addText($left_margin, 810, 10, strip_tags(stripslashes($_GET['my_name'])), 0, 0); // User-Input: Phone $pdf->addText($left_margin, 797, 10, strip_tags($_GET['my_phone']), 0, 0); // User-Input: Project $text_height_project = $note_section_height + 22; $pdf->addText($left_margin, $text_height_project, 10, "PROJECT:", 0, 0); $pdf->addText(100, $text_height_project, 10, strip_tags(stripslashes($_GET['my_project'])), 0, 0); // Month and Year if (isset($_GET['show_page_number']) && $_GET['show_page_number'] == "on") { $pdf->addText(510, $text_height_project, 10, "PAGE:", 0, 0); } // Month and Year if (isset($_GET['show_date']) && $_GET['show_date'] == "on") { $pdf->addText(getXfromRightMargin(date($_GET['my_date_format']), 8), 810, 8, date($_GET['my_date_format']), 0, 0); } //+----------------------------------------------------------------------+ //| DRAW THE FOOTER //+----------------------------------------------------------------------+ $pdf->addText($left_margin, 20, 6, "Notepad Generator by Mike Botsko; www.botsko.net", 0, 0); // Month and Year if (isset($_GET['my_footer'])) { $pdf->addText($left_margin, 10, 6, stripslashes($_GET['my_footer']), 0, 0); } //+----------------------------------------------------------------------+ //| GENERATE THE PDF //+----------------------------------------------------------------------+ $pdf->stream();
/** * Streams the PDF directly to the browser * * @param string $filename the name of the PDF file * @param array $options associative array, 'Attachment' => 0 or 1, 'compress' => 1 or 0 */ function stream($filename, $options = null) { $options["Content-Disposition"] = $filename; $this->_pdf->stream($options); }