note 28516 added to function.pdf-rotate
| From: | php-general at lists dot php dot net | Date: | Wed, 15 Jan 2003 16:06:16 +0000 |
| Subject: | note 28516 added to function.pdf-rotate | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-42182@lists.php.net to get a copy of this message | ||
can anyone help with vertical text for PDF documents? I used an example from PDFLib documentation
and tried to adapt to like this ...
<?php
$pdf = pdf_new();
pdf_open_file($pdf);
pdf_set_info($pdf,"Creator","images.php");
pdf_set_info($pdf,"Author","Greg Gerber");
pdf_set_info($pdf,"Title","Heating and Cooling Chart");
// the width of 612, and length of 792 make a US Letter they are reversed for Landscape Mode
pdf_begin_page($pdf,792,612);
pdf_set_font($pdf, "Helvetica-Oblique", 14, "host");
pdf_show_xy($pdf, "This is horizontal text",50, 300);
//pdf_save($pdf);
pdf_rotate($pdf, 90); /* rotate coordinates */
pdf_show_xy($pdf,"vertical text",70, 100);
//PDF_restore($pdf);
//PDF_continue_text($pdf, "horizontal text continues");
//pdf_show_xy($pdf, "This is horizontal text",350,300);
//pdf_rotate($pdf,-90.0);
//pdf_show_xy($pdf, "This",250,200);
//pdf_stroke($pdf);
pdf_end_page($pdf);
pdf_close($pdf);
$buf = pdf_get_buffer($pdf);
$len = strlen($buf);
Header("Content-type: application/pdf");
Header("Content-Length: $len");
Header("Content-Disposition: inline; filename=images.pdf");
echo $buf;
pdf_delete($pdf);
?>
I have not been able to print vertically, Anyone know what I am doing wrong???
--
http://www.php.net/manual/en/function.pdf-rotate.php
http://master.php.net/manage/user-notes.php?action=edit+28516
http://master.php.net/manage/user-notes.php?action=delete+28516
http://master.php.net/manage/user-notes.php?action=reject+28516