note 28516 deleted from function.pdf-rotate by didou
| From: | didou@php.net | Date: | Fri, 03 Oct 2003 10:25:17 +0000 |
| Subject: | note 28516 deleted from function.pdf-rotate by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-57678@lists.php.net to get a copy of this message | ||
Note Submitter:
----
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???