Документация PHP


ps_set_parameter

ps_set_value

PS

PHP Manual


ps_set_text_pos

(PECL ps:1.1.0-1.3.5)

ps_set_text_pos — Sets position for text output

Описание

bool ps_set_text_pos ( resource $psdoc , float $x , float $y )

Set the position for the next text output. You may alternatively set the x and y value separately by calling ps_set_value() and choosing textx respectively texty as the value name.

If you want to output text at a certain position it is more convenient to use ps_show_xy() instead of setting the text position and calling ps_show().

Список параметров

psdoc

Resource identifier of the postscript file as returned by ps_new().

x

x-coordinate of the new text position.

y

y-coordinate of the new text position.

Возвращаемые значения

Возвращает TRUE в случае успешного завершения или FALSE в случае возникновения ошибки.

Примеры

Пример #1 Placing text at a given position

<?php
$ps 
ps_new();
if (!
ps_open_file($ps"text.ps")) {
  print 
"Cannot open PostScript file\n";
  exit;
}

ps_set_info($ps"Creator""rectangle.php");
ps_set_info($ps"Author""Uwe Steinmann");
ps_set_info($ps"Title""Text placement example");

ps_begin_page($ps596842);
$psfont ps_findfont($ps"Helvetica"""0);
ps_setfont($ps$psfont8.0);
ps_show_xy($ps"Some text at (100, 100)"100100);

ps_set_value($ps"textx"100);
ps_set_value($ps"texty"120);
ps_show($ps"Some text at (100, 120)");
ps_end_page($ps);

ps_delete($ps);
?>

Смотрите также


ps_set_parameter

ps_set_value

PS

PHP Manual

SAPE все усложнил?

MainLink - простая и прибыльная продажа ссылок!

Последние поступления:

Размещена 10 августа 2020 года

Я по ТВ видел, что через 10 лет мы будем жить лучше, чем в Германии...
Я не понял, что это они с Германией сделать хотят?!

читать далее…

ТехЗадание на Землю

Размещена 14 марта 2018 года

Пpоект Genesis (из коpпоpативной пеpеписки)

читать далее…

Шпаргалка по работе с Vim

Размещена 05 декабря 2017 года

Vim довольно мощный редактор, но работа с ним не всегда наглядна.
Например если нужно отредактировать какой-то файл например при помощи crontab, без знания специфики работы с viv никак.

читать далее…

Ошибка: Error: Cannot find a valid baseurl for repo

Размещена 13 сентабря 2017 года

Если возникает ошибка на centos 5 вида
YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
Eg. Invalid release/

читать далее…

Linux Optimization

Размещена 30 июля 2012 года

Prelink

читать далее…