|
||||||
| Tags: |
![]() |
|
|||
|
<?php
//getting new instance $pdfFile = new_pdf(); PDF_open_file($pdfFile, " "); //document info pdf_set_info($pdfFile, "Auther", "Ahmed Elbshry"); pdf_set_info($pdfFile, "Creator", "Ahmed Elbshry"); pdf_set_info($pdfFile, "Title", "PDFlib"); pdf_set_info($pdfFile, "Subject", "Using PDFlib"); //starting our page and define the width and highet of the document pdf_begin_page($pdfFile, 595, 842); //check if Arial font is found, or exit if($font = PDF_findfont($pdfFile, "Arial", "winansi", 1)) { PDF_setfont($pdfFile, $font, 12); } else { echo ("Font Not Found!"); PDF_end_page($pdfFile); PDF_close($pdfFile); PDF_delete($pdfFile); exit(); } //start writing from the point 50,780 PDF_show_xy($pdfFile, "This Text In Arial Font", 50, 780); PDF_end_page($pdfFile); PDF_close($pdfFile); //store the pdf document in $pdf $pdf = PDF_get_buffer($pdfFile); //get the len to tell the browser about it $pdflen = strlen($pdfFile); //telling the browser about the pdf document header("Content-type: application/pdf"); header("Content-length: $pdflen"); header("Content-Disposition: inline; filename=phpMade.pdf"); //output the document print($pdf); //delete the object PDF_delete($pdfFile); ?> ---- Server IP: 69.147.83.197 Probable Submitter: 41.233.116.31 ---- Manual Page -- http://www.php.net/manual/en/function.pdf-delete.php Edit -- https://master.php.net/note/edit/86245 Del: integrated -- https://master.php.net/note/delete/86245/integrated Del: useless -- https://master.php.net/note/delete/86245/useless Del: bad code -- https://master.php.net/note/delete/86245/bad+code Del: spam -- https://master.php.net/note/delete/86245/spam Del: non-english -- https://master.php.net/note/delete/86245/non-english Del: in docs -- https://master.php.net/note/delete/86245/in+docs Del: other reasons-- https://master.php.net/note/delete/86245 Reject -- https://master.php.net/note/reject/86245 Search -- https://master.php.net/manage/user-notes.php |
|
|||
|
<?php
//getting new instance $pdfFile = new_pdf(); PDF_open_file($pdfFile, " "); //document info pdf_set_info($pdfFile, "Auther", "Ahmed Elbshry"); pdf_set_info($pdfFile, "Creator", "Ahmed Elbshry"); pdf_set_info($pdfFile, "Title", "PDFlib"); pdf_set_info($pdfFile, "Subject", "Using PDFlib"); //starting our page and define the width and highet of the document pdf_begin_page($pdfFile, 595, 842); //check if Arial font is found, or exit if($font = PDF_findfont($pdfFile, "Arial", "winansi", 1)) { PDF_setfont($pdfFile, $font, 12); } else { echo ("Font Not Found!"); PDF_end_page($pdfFile); PDF_close($pdfFile); PDF_delete($pdfFile); exit(); } //start writing from the point 50,780 PDF_show_xy($pdfFile, "This Text In Arial Font", 50, 780); PDF_end_page($pdfFile); PDF_close($pdfFile); //store the pdf document in $pdf $pdf = PDF_get_buffer($pdfFile); //get the len to tell the browser about it $pdflen = strlen($pdfFile); //telling the browser about the pdf document header("Content-type: application/pdf"); header("Content-length: $pdflen"); header("Content-Disposition: inline; filename=phpMade.pdf"); //output the document print($pdf); //delete the object PDF_delete($pdfFile); ?> --was-- <?php //getting new instance $pdfFile = new_pdf(); PDF_open_file($pdfFile, " "); //document info pdf_set_info($pdfFile, "Auther", "Ahmed Elbshry"); pdf_set_info($pdfFile, "Creator", "Ahmed Elbshry"); pdf_set_info($pdfFile, "Title", "PDFlib"); pdf_set_info($pdfFile, "Subject", "Using PDFlib"); //starting our page and define the width and highet of the document pdf_begin_page($pdfFile, 595, 842); //check if Arial font is found, or exit if($font = PDF_findfont($pdfFile, "Arial", "winansi", 1)) { PDF_setfont($pdfFile, $font, 12); } else { echo ("Font Not Found!"); PDF_end_page($pdfFile); PDF_close($pdfFile); PDF_delete($pdfFile); exit(); } //start writing from the point 50,780 PDF_show_xy($pdfFile, "This Text In Arial Font", 50, 780); PDF_end_page($pdfFile); PDF_close($pdfFile); //store the pdf document in $pdf $pdf = PDF_get_buffer($pdfFile); //get the len to tell the browser about it $pdflen = strlen($pdfFile); //telling the browser about the pdf document header("Content-type: application/pdf"); header("Content-length: $pdflen"); header("Content-Disposition: inline; filename=phpMade.pdf"); //output the document print($pdf); //delete the object PDF_delete($pdfFile); ?> http://php.net/manual/en/function.pdf-delete.php |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|