note 81026 added to function.pdf-rotate

From: Date: Mon, 11 Feb 2008 16:29:28 +0000
Subject: note 81026 added to function.pdf-rotate
Groups: php.notes 
Request: Send a blank email to php-notes+get-136046@lists.php.net to get a copy of this message
Many of the functions used in the post below are deprecated. Here is the modern Object Oriented version that is almost the same line by line and uses the PDFlib() class: <?php $pdf = new PDFlib(); $pdf->begin_document("",""); $pdf->set_info("Creator","images.php"); $pdf->set_info("Title","Horizontal and Vertical Example"); // Width of 612, and length of 792 make US Letter Size // Dimensions are reversed for Landscape Mode $pdf->begin_page_ext(792,612,''); $font = $pdf->load_font("Helvetica-Oblique", "iso8859-1", ""); $pdf->setfont($font, 18); $pdf->show_xy("This is horizontal text",50, 300); $pdf->rotate(90); /* rotate coordinates */ $pdf->show_xy("vertical text",300, -400); $pdf->rotate(-90); /* rotate coordinates */; $pdf->show_xy("This is horizontal text",50, 400); $pdf->end_page_ext(""); $pdf->end_document(""); $buf = $pdf->get_buffer(); $len = strlen($buf); Header("Content-type: application/pdf"); Header("Content-Length: $len"); Header("Content-Disposition: inline; filename=images.pdf"); echo $buf; $pdf->delete(); ?> ---- Server IP: 69.147.83.197 Probable Submitter: 75.61.56.174 ---- Manual Page -- http://www.php.net/manual/en/function.pdf-rotate.php Edit -- https://master.php.net/note/edit/81026 Del: integrated -- https://master.php.net/note/delete/81026/integrated Del: useless -- https://master.php.net/note/delete/81026/useless Del: bad code -- https://master.php.net/note/delete/81026/bad+code Del: spam -- https://master.php.net/note/delete/81026/spam Del: non-english -- https://master.php.net/note/delete/81026/non-english Del: in docs -- https://master.php.net/note/delete/81026/in+docs Del: other reasons-- https://master.php.net/note/delete/81026 Reject -- https://master.php.net/note/reject/81026 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#136046) next »