PDF_get_value

(PHP 4 >= 4.0.1, PECL pdflib >= 1.0.0)

PDF_get_valueGet numerical parameter

Description

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

Gets the value of some PDFlib parameter with numerical type.

Коментарии

Автор:
To get the current font size, use something like this:

<?php $fontheight PDF_get_value($pdf"fontsize"); ?>
2001-03-01 10:32:43
http://php5.kiev.ua/manual/ru/function.pdf-get-value.html
See the main PDF manual page (the "PDF" link to the left) for the magic words that this function accepts.
2002-02-24 00:13:33
http://php5.kiev.ua/manual/ru/function.pdf-get-value.html
The Magic keywords are:

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

I looked in the sourcecode ...
2003-11-26 10:41:47
http://php5.kiev.ua/manual/ru/function.pdf-get-value.html
Автор:
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.
2004-06-19 12:58:53
http://php5.kiev.ua/manual/ru/function.pdf-get-value.html
Автор:
$width = PDF_get_value($p, "imagewidth", $image);
2005-07-25 05:10:49
http://php5.kiev.ua/manual/ru/function.pdf-get-value.html
Автор:
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$image000.5);
pdf_close_image($pdf$image);
pdf_end_page($pdf);

}
 
pdf_close($pdf);

?>
2006-02-02 09:29:58
http://php5.kiev.ua/manual/ru/function.pdf-get-value.html
If you're trying to get the version of the installed library, you can study this example:

<?php
$p
=pdf_new();
echo 
pdf_get_value($p'major'0).".";
echo 
pdf_get_value($p'minor'0).".";
echo 
pdf_get_value($p'revision'0);
?>

Outputs something like 

9.0.7
2017-03-15 20:56:25
http://php5.kiev.ua/manual/ru/function.pdf-get-value.html

    Поддержать сайт на родительском проекте КГБ