Most Referenced Functions
  » google_pagerank()
  » preg_replace()
  » imagecreatefrompng()
  » site_pageranks()
  » imagepng()
  » imagedestroy()
  » imagestring()
  » imagecolorallocate()
  » htmlentities()
  » preg_match()
  » fopen()
  » header()
  » getimagesize()
  » preg_match_all()
  » session_start()
  » htmlspecialchars()
  » ob_start()
  » ob_flush()
  » strstr()
  » flush()
  » strpos()
  » setcookie()
  » str_replace()
  » array2vars()
  » nl2br()
  » preg_split()
  » ereg()
  » ereg_replace()
  » urlencode()
  » readgzfile()

Become a sponsor for $15/month. Link is sitewide - PR5 homepage, 20+ PR4 pages, 90+ PR3 pages. Email dave[AT]icemelon[D0T]c0m.

PHP Functions

Function: printer_write

(PECL)

printer_write -- Write data to the printer

Description

bool printer_write ( resource handle, string content )

Writes content directly to the printer. Returns TRUE on success or FALSE on failure.

handle must be a valid handle to a printer.

Example 1. printer_write() example

<?php
$handle = printer_open();
printer_write($handle, "Text to print");
printer_close($handle);
?>
CIX. PostScript document creation

Introduction

This module allows to create PostScript documents. It has many similarities with the pdf extension. Actually the API is almost identical and one can in many cases just replace the prefix of each function from pdf_ to ps_. This also works for functions which has no meaning in the PostScript document (like adding hyperlinks) but will have an effect if the document is converted to PDF.

Documents created by this extension are sometimes even superior to documents created with the pdf extension, because pslib's text rendering functions can handle kerning, hyphenation and ligatures which results in much better output of boxed text.

Requirements

You need at least PHP 4.3.0 and pslib >= 0.1.12. The ps library (pslib) is available at http://pslib.sourceforge.net/ .

Installation

A short installation note: just type

$ pear install ps
in your console.

Runtime Configuration

This extension has no configuration directives defined in php.ini .

Predefined Constants

The constants below are defined by this extension, and will only be available when the extension has either been compiled into PHP or dynamically loaded at runtime.

The following two tables lists all constants defined by the ps extension.

Table 1. Contants for line caps

Name Meaning ps_LINECAP_BUTT   ps_LINECAP_ROUND   ps_LINECAP_SQUARED  

Table 2. Contants for line joins

Name Meaning ps_LINEJOIN_MITER   ps_LINEJOIN_ROUND   ps_LINEJOIN_BEVEL  

Contact Information

If you have comments, bugfixes, enhancements for either this extension or pslib then please drop me a mail [email protected] . Any help is very welcome.

Table of Contents ps_add_bookmark  -- Add bookmark to current page ps_add_launchlink  -- Adds link which launches file ps_add_locallink  -- Adds link to a page in the same document ps_add_note  -- Adds note to current page ps_add_pdflink  -- Adds link to a page in a second pdf document ps_add_weblink  -- Adds link to a web location ps_arc  -- Draws an arc counterclockwise ps_arcn  -- Draws an arc clockwise ps_begin_page  -- Start a new page ps_begin_pattern  -- Start a new pattern ps_begin_template  -- Start a new template ps_circle  -- Draws a circle ps_clip  -- Clips drawing to current path ps_close_image  -- Closes image and frees memory ps_close  -- Closes a PostScript document ps_closepath_stroke  -- Closes and strokes path ps_closepath  -- Closes path ps_continue_text  -- Continue text in next line ps_curveto  -- Draws a curve ps_delete  -- Deletes all resources of a PostScript document ps_end_page  -- End a page ps_end_pattern  -- End a page ps_end_template  -- End a template ps_fill_stroke  -- Fills and strokes the current path ps_fill  -- Fills the current path ps_findfont  -- Loads a font ps_get_buffer  -- Fetches the full buffer containig the generated PS data ps_get_parameter  -- Gets certain parameters ps_get_value  -- Gets certain values ps_hyphenate  -- Hyphenates a word ps_lineto  -- Draws a line ps_makespotcolor  -- Create spot color ps_moveto  -- Sets current point ps_new  -- Creates a new PostScript document object ps_open_file  -- Opens a file for output ps_open_image_file  -- Opens image from file ps_open_image  -- Reads an image for later placement ps_place_image  -- Places image on the page ps_rect  -- Draws a rectangle ps_restore  -- Restore previously save context ps_rotate  -- Sets rotation factor ps_save  -- Save current context ps_scale  -- Sets scaling factor ps_set_border_color  -- Sets color of border for annotations ps_set_border_dash  -- Sets length of dashes for border of annotations ps_set_border_style  -- Sets border style of annotations ps_set_info  -- Sets information fields of document ps_set_parameter  -- Sets certain parameters ps_set_text_pos  -- Sets position for text output ps_set_value  -- Sets certain values ps_setcolor  -- Sets current color ps_setdash  -- Sets appearance of a dashed line ps_setflat  -- Sets flatness ps_setfont  -- Sets font to use for following output ps_setgray  -- Sets gray value ps_setlinecap  -- Sets appearance of line ends ps_setlinejoin  -- Sets how contected lines are joined ps_setlinewidth  -- Sets width of a line ps_setmiterlimit  -- Sets the miter limit ps_setpolydash  -- Sets appearance of a dashed line ps_shading_pattern  -- Creates a pattern based on a shading ps_shading  -- Creates a shading for later use ps_shfill  -- Fills an area with a shading ps_show_boxed  -- Output text in a box ps_show_xy  -- Output text at given position ps_show  -- Output text ps_string_geometry  -- Gets geometry of a string ps_stringwidth  -- Gets width of a string ps_stroke  -- Draws the current path ps_symbol_name  -- Gets name of a glyph ps_symbol_width  -- Gets width of a glyph ps_symbol  -- Output a glyph ps_translate  -- Sets translation

Related Function(s)

  • ps_add_bookmark()
  • ps_add_launchlink()
  • ps_add_locallink()
  • ps_add_note()
  • ps_add_pdflink()
  • ps_add_weblink()
  • ps_arc()
  • ps_arcn()
  • ps_begin_page()
  • ps_begin_pattern()
  • ps_begin_template()
  • ps_circle()
  • ps_clip()
  • ps_close_image()
  • ps_close()
  • ps_closepath_stroke()
  • ps_closepath()
  • ps_continue_text()
  • ps_curveto()
  • ps_delete()
  • ps_end_page()
  • ps_end_pattern()
  • ps_end_template()
  • ps_fill_stroke()
  • ps_fill()
  • ps_findfont()
  • ps_get_buffer()
  • ps_get_parameter()
  • ps_get_value()
  • ps_hyphenate()
  • ps_lineto()
  • ps_makespotcolor()
  • ps_moveto()
  • ps_new()
  • ps_open_file()
  • ps_open_image_file()
  • ps_open_image()
  • ps_place_image()
  • ps_rect()
  • ps_restore()
  • ps_rotate()
  • ps_save()
  • ps_scale()
  • ps_set_border_color()
  • ps_set_border_dash()
  • ps_set_border_style()
  • ps_set_info()
  • ps_set_parameter()
  • ps_set_text_pos()
  • ps_set_value()
  • ps_setcolor()
  • ps_setdash()
  • ps_setflat()
  • ps_setfont()
  • ps_setgray()
  • ps_setlinecap()
  • ps_setlinejoin()
  • ps_setlinewidth()
  • ps_setmiterlimit()
  • ps_setpolydash()
  • ps_shading_pattern()
  • ps_shading()
  • ps_shfill()
  • ps_show_boxed()
  • ps_show_xy()
  • ps_show()
  • ps_string_geometry()
  • ps_stringwidth()
  • ps_stroke()
  • ps_symbol_name()
  • ps_symbol_width()
  • ps_symbol()
  • ps_translate()
  • Icemelon -- PHP, CSS, Javascript Tutorials, & More!
      © 2005-2010 Icemelon.com   Email: dave[AT]icemelon[D0T]c0m