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_get_value - 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_info_textflow" width="11" height="7"/> <PDF_get_pdi_value
Last updated: Wed, 01 Nov 2006
view this page in

PDF_get_value

(PHP 4 >= 4.0.1, PECL)

PDF_get_value -- 数値型のパラメータを取得する

説明

float PDF_get_value ( resource p, string key, float modifier )

いくつかの PDFlib パラメータを数値型で取得します。



add a note add a note User Contributed Notes
PDF_get_value
03-Feb-2006 12:29
Note:

imagewidth and imageheigh do not return the actual width and height.  Instead they are 2 times the actual width and height.  I don't understand why, but this seems to be the case with multi page tiffs (and maybe other images).  In order to insert a multi page tiff into a PDF without out of control extra space do the following:

<?php
$pdf
= pdf_new();
pdf_set_parameter($pdf, "licensefile", "/etc/pdflib/licensekeys.txt");
pdf_open_file($pdf, "/tmp/tifftest.pdf");

for (
$i=1; $i<=4; $i++) {

$image = pdf_open_image_file($pdf, "tiff", "/tmp/test.tif", "page", $i);

$w = pdf_get_value($pdf, "imagewidth", $image);
$h = pdf_get_value($pdf, "imageheight", $image);

// $w and $h are at this point 2*width and 2*height!!

// To place the image without having lots of extra space:

pdf_begin_page($pdf, $w/2, $h/2);
pdf_place_image($pdf, $image, 0, 0, 0.5);
pdf_close_image($pdf, $image);
pdf_end_page($pdf);

}
 
pdf_close($pdf);

?>
25-Jul-2005 06:10
$width = PDF_get_value($p, "imagewidth", $image);
_meto ALT+q web.de
20-Jun-2004 01:58
There should be many more. For example I found this in the manual, wich was very helpfull for me:

$textx = pdf_get_value($p, "textx", 0);
$texty = pdf_get_value($p, "texty", 0);

These will extract the current textposition in the document.
robert.chambersATroche.com
27-Nov-2003 01:41
The Magic keywords are:

  IMAGEWIDTH,  IMAGEHEIGHT,  RESX,  RESY,
  CAPHEIGHT,  ASCENDER,  DESCENDER,  FONT

I looked in the sourcecode ...
ceo at l-i-e dot com
24-Feb-2002 03:13
See the main PDF manual page (the "PDF" link to the left) for the magic words that this function accepts.
reneATcola.cc
02-Mar-2001 01:32
To get the current font size, use something like this:<br>
$fontheight = PDF_get_value($pdf, "fontsize");

 
show source | credits | sitemap | contact | advertising | mirror sites