Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
PHP: pdf_show_xy - Manual
[go: Go Back, main page]

PHP  
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
search for in the  
<pdf_show_boxedpdf_show" width="11" height="7"/>
view the version of this page
Last updated: Tue, 21 Dec 2004

pdf_show_xy

(PHP 3>= 3.0.6, PHP 4 , PHP 5)

pdf_show_xy -- 指定した位置にテキストを出力する

説明

void pdf_show_xy ( int pdf object, string text, float x, float y)

(x, y)にカレントのフォントでテキストを出力します。



add a note add a note User Contributed Notes
pdf_show_xy
sigve at NwOoSlPfArMaidah dot no
01-Oct-2004 11:21
Want to do right-to-left text with pdflib? Just pick the right margin, and send it as $x to this function.

<?php
function pdf_show_xy_backwards ($pdf, $text, $font, $size, $x, $y) {
  
$currx = $x;
   for (
$i = strlen($text); $i > 0; $i--) {
      
$char = substr((string)$text, $i-1, 1);
      
$width = pdf_stringwidth($pdf, (string)$char, $font, $size);
      
$currx = $currx - $width;
      
pdf_show_xy($pdf, (string)$char, $currx, $y);
   }
}
?>
DrPsycho at easynet dot be
07-Dec-2002 02:41
No, that's just because in PDF the origin is at the lower left corner
nid at home dot se
02-Oct-2002 06:26
When using PDFLib version 4.0.3 under PHP 4.2.1 on Windows the Y-position is reversed, which means, the Y is the number of pixels that should be visible BELOW the texts baseline.

<pdf_show_boxedpdf_show" width="11" height="7"/>
 Last updated: Tue, 21 Dec 2004
show source | credits | sitemap | contact | advertising | mirror sites 
Copyright © 2001-2005 The PHP Group
All rights reserved.
This mirror generously provided by: HappySize, Inc.
Last updated: Sat Jan 15 06:11:01 2005 JST