Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

ps_open_file(3) [php man page]

PS_OPEN_FILE(3) 							 1							   PS_OPEN_FILE(3)

ps_open_file - Opens a file for output

SYNOPSIS
bool ps_open_file (resource $psdoc, [string $filename]) DESCRIPTION
Creates a new file on disk and writes the PostScript document into it. The file will be closed when ps_close(3) is called. PARAMETERS
o $psdoc - Resource identifier of the postscript file as returned by ps_new(3). o $filename - The name of the postscript file. If $filename is not passed the document will be created in memory and all output will go straight to the browser. RETURN VALUES
Returns TRUE on success or FALSE on failure. SEE ALSO
ps_close(3). PHP Documentation Group PS_OPEN_FILE(3)

Check Out this Related Man Page

PS_LINETO(3)								 1							      PS_LINETO(3)

ps_lineto - Draws a line

SYNOPSIS
bool ps_lineto (resource $psdoc, float $x, float $y) DESCRIPTION
Adds a straight line from the current point to the given coordinates to the current path. Use ps_moveto(3) to set the starting point of the line. PARAMETERS
o $psdoc - Resource identifier of the postscript file as returned by ps_new(3). o $x - x-coordinate of the end point of the line. o $y - y-coordinate of the end point of the line. RETURN VALUES
Returns TRUE on success or FALSE on failure. EXAMPLES
Example #1 Drawing a rectangle <?php $ps = ps_new(); if (!ps_open_file($ps, "rectangle.ps")) { print "Cannot open PostScript file "; exit; } ps_set_info($ps, "Creator", "rectangle.php"); ps_set_info($ps, "Author", "Uwe Steinmann"); ps_set_info($ps, "Title", "Lineto example"); ps_begin_page($ps, 596, 842); ps_moveto($ps, 100, 100); ps_lineto($ps, 100, 200); ps_lineto($ps, 200, 200); ps_lineto($ps, 200, 100); ps_lineto($ps, 100, 100); ps_stroke($ps); ps_end_page($ps); ps_delete($ps); ?> SEE ALSO
ps_moveto(3). PHP Documentation Group PS_LINETO(3)
Man Page