Page 300 - Open Soource Technologies 304.indd
P. 300
Web Technologies-I
Notes pdf_show_boxed($pdf, $text, 50, 210, 300, 180, “justify”);
pdf_rect($pdf,50,210,300,180);
pdf_stroke($pdf);
pdf_show_boxed($pdf, $text, 50, 20, 300, 180, “fulljustify”);
pdf_rect($pdf,50,20,300,180);
pdf_stroke($pdf);
pdf_show_boxed($pdf, $text, 375, 235, 200, 300, “center”);
pdf_rect($pdf,375,250,200,300);
pdf_stroke($pdf);
pdf_end_page($pdf);
pdf_set_parameter($pdf, “openaction”, “fitpage”);
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=coords.pdf”);
echo $buf; pdf_delete($pdf);
?>
Figure 12.4 shows the output of the Example.
Figure 12.4: Different Text Alignments
This isa lot of
text insidea text
box ina small
pdf file.
This isa lot of
text insidea text This is a
box ina small lot of text
pdf file. inside a
textbox in
This is a lot of a small pdf
text insidea text file.
box in a small
pdf file.
This is a lot of
text insidea text
box in a small
pdf file.
294 LOVELY PROFESSIONAL UNIVERSITY