<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE >PostScript document creation</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK REL="HOME" TITLE="Manual do PHP" HREF="index.html"><LINK REL="UP" TITLE="Referência das Funções" HREF="funcref.html"><LINK REL="PREVIOUS" TITLE="system" HREF="function.system.html"><LINK REL="NEXT" TITLE="ps_add_bookmark" HREF="function.ps-add-bookmark.html"><META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=UTF-8"></HEAD ><BODY CLASS="reference" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><DIV CLASS="NAVHEADER" ><TABLE SUMMARY="Header navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="3" ALIGN="center" >Manual do PHP</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="function.system.html" ACCESSKEY="P" >Anterior</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" ></TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="function.ps-add-bookmark.html" ACCESSKEY="N" >Próxima</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><DIV CLASS="reference" ><A NAME="ref.ps" ></A ><DIV CLASS="TITLEPAGE" ><H1 CLASS="title" >CXXXI. PostScript document creation</H1 ><DIV CLASS="PARTINTRO" ><A NAME="AEN184992" ></A ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="ps.intro" >Introdução</A ></H1 ><P > 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. </P ><P >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. </P ></DIV ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="ps.requirements" >Dependências</A ></H1 ><P > You need at least PHP 4.3.0 and pslib >= 0.1.12. The ps library (pslib) is available at <A HREF="http://pslib.sourceforge.net/" TARGET="_top" >http://pslib.sourceforge.net/</A >. </P ></DIV ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="ps.installation" >Instalação</A ></H1 ><P > A short installation note: just type <TABLE BORDER="0" BGCOLOR="#E0E0E0" CELLPADDING="5" ><TR ><TD ><PRE CLASS="screen" >$ pecl install ps</PRE ></TD ></TR ></TABLE > in your console. </P ></DIV ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="ps.configuration" >Configurações em execução</A ></H1 ><P >Esta extensão não define nenhum parâmetro de configuração no <TT CLASS="filename" >php.ini</TT >.</P ></DIV ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="ps.resources" >Tipos Resource</A ></H1 ><P > This extension defines a PostScript document resource returned by <A HREF="function.ps-new.html" ><B CLASS="function" >ps_new()</B ></A >. </P ></DIV ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="ps.constants" >Constantes pré-definidas</A ></H1 ><P > As contantes abaixo são definidas por esta extensão e somente estarão disponíveis quando a extensão foi compilada com o PHP ou carregada dinamicamente durante a execução. </P ><P > The following two tables lists all constants defined by the ps extension. <DIV CLASS="table" ><A NAME="ps.table-linecap" ></A ><P ><B >Tabela 1. Contants for line caps</B ></P ><TABLE BORDER="1" CLASS="CALSTABLE" ><COL><COL><THEAD ><TR ><TH >Name</TH ><TH >Meaning</TH ></TR ></THEAD ><TBODY ><TR ><TD >ps_LINECAP_BUTT</TD ><TD > </TD ></TR ><TR ><TD >ps_LINECAP_ROUND</TD ><TD > </TD ></TR ><TR ><TD >ps_LINECAP_SQUARED</TD ><TD > </TD ></TR ></TBODY ></TABLE ></DIV > <DIV CLASS="table" ><A NAME="ps.table-linejoin" ></A ><P ><B >Tabela 2. Contants for line joins</B ></P ><TABLE BORDER="1" CLASS="CALSTABLE" ><COL><COL><THEAD ><TR ><TH >Name</TH ><TH >Meaning</TH ></TR ></THEAD ><TBODY ><TR ><TD >ps_LINEJOIN_MITER</TD ><TD > </TD ></TR ><TR ><TD >ps_LINEJOIN_ROUND</TD ><TD > </TD ></TR ><TR ><TD >ps_LINEJOIN_BEVEL</TD ><TD > </TD ></TR ></TBODY ></TABLE ></DIV > </P ></DIV ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="ps.contact" >Contact Information</A ></H1 ><P > If you have comments, bugfixes, enhancements for either this extension or pslib then please drop me a mail <A HREF="mailto:steinm@php.net" TARGET="_top" >steinm@php.net</A >. Any help is very welcome. </P ></DIV ></DIV ><DIV CLASS="TOC" ><DL ><DT ><B >Índice</B ></DT ><DT ><A HREF="function.ps-add-bookmark.html" >ps_add_bookmark</A > -- Add bookmark to current page</DT ><DT ><A HREF="function.ps-add-launchlink.html" >ps_add_launchlink</A > -- Adds link which launches file</DT ><DT ><A HREF="function.ps-add-locallink.html" >ps_add_locallink</A > -- Adds link to a page in the same document</DT ><DT ><A HREF="function.ps-add-note.html" >ps_add_note</A > -- Adds note to current page</DT ><DT ><A HREF="function.ps-add-pdflink.html" >ps_add_pdflink</A > -- Adds link to a page in a second pdf document</DT ><DT ><A HREF="function.ps-add-weblink.html" >ps_add_weblink</A > -- Adds link to a web location</DT ><DT ><A HREF="function.ps-arc.html" >ps_arc</A > -- Draws an arc counterclockwise</DT ><DT ><A HREF="function.ps-arcn.html" >ps_arcn</A > -- Draws an arc clockwise</DT ><DT ><A HREF="function.ps-begin-page.html" >ps_begin_page</A > -- Start a new page</DT ><DT ><A HREF="function.ps-begin-pattern.html" >ps_begin_pattern</A > -- Start a new pattern</DT ><DT ><A HREF="function.ps-begin-template.html" >ps_begin_template</A > -- Start a new template</DT ><DT ><A HREF="function.ps-circle.html" >ps_circle</A > -- Draws a circle</DT ><DT ><A HREF="function.ps-clip.html" >ps_clip</A > -- Clips drawing to current path</DT ><DT ><A HREF="function.ps-close-image.html" >ps_close_image</A > -- Closes image and frees memory</DT ><DT ><A HREF="function.ps-close.html" >ps_close</A > -- Closes a PostScript document</DT ><DT ><A HREF="function.ps-closepath-stroke.html" >ps_closepath_stroke</A > -- Closes and strokes path</DT ><DT ><A HREF="function.ps-closepath.html" >ps_closepath</A > -- Closes path</DT ><DT ><A HREF="function.ps-continue-text.html" >ps_continue_text</A > -- Continue text in next line</DT ><DT ><A HREF="function.ps-curveto.html" >ps_curveto</A > -- Draws a curve</DT ><DT ><A HREF="function.ps-delete.html" >ps_delete</A > -- Deletes all resources of a PostScript document</DT ><DT ><A HREF="function.ps-end-page.html" >ps_end_page</A > -- End a page</DT ><DT ><A HREF="function.ps-end-pattern.html" >ps_end_pattern</A > -- End a pattern</DT ><DT ><A HREF="function.ps-end-template.html" >ps_end_template</A > -- End a template</DT ><DT ><A HREF="function.ps-fill-stroke.html" >ps_fill_stroke</A > -- Fills and strokes the current path</DT ><DT ><A HREF="function.ps-fill.html" >ps_fill</A > -- Fills the current path</DT ><DT ><A HREF="function.ps-findfont.html" >ps_findfont</A > -- Loads a font</DT ><DT ><A HREF="function.ps-get-buffer.html" >ps_get_buffer</A > -- Fetches the full buffer containig the generated PS data</DT ><DT ><A HREF="function.ps-get-parameter.html" >ps_get_parameter</A > -- Gets certain parameters</DT ><DT ><A HREF="function.ps-get-value.html" >ps_get_value</A > -- Gets certain values</DT ><DT ><A HREF="function.ps-hyphenate.html" >ps_hyphenate</A > -- Hyphenates a word</DT ><DT ><A HREF="function.ps-include-file.html" >ps_include_file</A > -- Reads an external file with raw PostScript code</DT ><DT ><A HREF="function.ps-lineto.html" >ps_lineto</A > -- Draws a line</DT ><DT ><A HREF="function.ps-makespotcolor.html" >ps_makespotcolor</A > -- Create spot color</DT ><DT ><A HREF="function.ps-moveto.html" >ps_moveto</A > -- Sets current point</DT ><DT ><A HREF="function.ps-new.html" >ps_new</A > -- Creates a new PostScript document object</DT ><DT ><A HREF="function.ps-open-file.html" >ps_open_file</A > -- Opens a file for output</DT ><DT ><A HREF="function.ps-open-image-file.html" >ps_open_image_file</A > -- Opens image from file</DT ><DT ><A HREF="function.ps-open-image.html" >ps_open_image</A > -- Reads an image for later placement</DT ><DT ><A HREF="function.ps-open-memory-image.html" >ps_open_memory_image</A > -- Takes an GD image and returns an image for placement in a PS document</DT ><DT ><A HREF="function.ps-place-image.html" >ps_place_image</A > -- Places image on the page</DT ><DT ><A HREF="function.ps-rect.html" >ps_rect</A > -- Draws a rectangle</DT ><DT ><A HREF="function.ps-restore.html" >ps_restore</A > -- Restore previously save context</DT ><DT ><A HREF="function.ps-rotate.html" >ps_rotate</A > -- Sets rotation factor</DT ><DT ><A HREF="function.ps-save.html" >ps_save</A > -- Save current context</DT ><DT ><A HREF="function.ps-scale.html" >ps_scale</A > -- Sets scaling factor</DT ><DT ><A HREF="function.ps-set-border-color.html" >ps_set_border_color</A > -- Sets color of border for annotations</DT ><DT ><A HREF="function.ps-set-border-dash.html" >ps_set_border_dash</A > -- Sets length of dashes for border of annotations</DT ><DT ><A HREF="function.ps-set-border-style.html" >ps_set_border_style</A > -- Sets border style of annotations</DT ><DT ><A HREF="function.ps-set-info.html" >ps_set_info</A > -- Sets information fields of document</DT ><DT ><A HREF="function.ps-set-parameter.html" >ps_set_parameter</A > -- Sets certain parameters</DT ><DT ><A HREF="function.ps-set-text-pos.html" >ps_set_text_pos</A > -- Sets position for text output</DT ><DT ><A HREF="function.ps-set-value.html" >ps_set_value</A > -- Sets certain values</DT ><DT ><A HREF="function.ps-setcolor.html" >ps_setcolor</A > -- Sets current color</DT ><DT ><A HREF="function.ps-setdash.html" >ps_setdash</A > -- Sets appearance of a dashed line</DT ><DT ><A HREF="function.ps-setflat.html" >ps_setflat</A > -- Sets flatness</DT ><DT ><A HREF="function.ps-setfont.html" >ps_setfont</A > -- Sets font to use for following output</DT ><DT ><A HREF="function.ps-setgray.html" >ps_setgray</A > -- Sets gray value</DT ><DT ><A HREF="function.ps-setlinecap.html" >ps_setlinecap</A > -- Sets appearance of line ends</DT ><DT ><A HREF="function.ps-setlinejoin.html" >ps_setlinejoin</A > -- Sets how contected lines are joined</DT ><DT ><A HREF="function.ps-setlinewidth.html" >ps_setlinewidth</A > -- Sets width of a line</DT ><DT ><A HREF="function.ps-setmiterlimit.html" >ps_setmiterlimit</A > -- Sets the miter limit</DT ><DT ><A HREF="function.ps-setoverprintmode.html" >ps_setoverprintmode</A > -- Sets overprint mode</DT ><DT ><A HREF="function.ps-setpolydash.html" >ps_setpolydash</A > -- Sets appearance of a dashed line</DT ><DT ><A HREF="function.ps-shading-pattern.html" >ps_shading_pattern</A > -- Creates a pattern based on a shading</DT ><DT ><A HREF="function.ps-shading.html" >ps_shading</A > -- Creates a shading for later use</DT ><DT ><A HREF="function.ps-shfill.html" >ps_shfill</A > -- Fills an area with a shading</DT ><DT ><A HREF="function.ps-show-boxed.html" >ps_show_boxed</A > -- Output text in a box</DT ><DT ><A HREF="function.ps-show-xy2.html" >ps_show_xy2</A > -- Output text at position</DT ><DT ><A HREF="function.ps-show-xy.html" >ps_show_xy</A > -- Output text at given position</DT ><DT ><A HREF="function.ps-show2.html" >ps_show2</A > -- Output a text at current position</DT ><DT ><A HREF="function.ps-show.html" >ps_show</A > -- Output text</DT ><DT ><A HREF="function.ps-string-geometry.html" >ps_string_geometry</A > -- Gets geometry of a string</DT ><DT ><A HREF="function.ps-stringwidth.html" >ps_stringwidth</A > -- Gets width of a string</DT ><DT ><A HREF="function.ps-stroke.html" >ps_stroke</A > -- Draws the current path</DT ><DT ><A HREF="function.ps-symbol-name.html" >ps_symbol_name</A > -- Gets name of a glyph</DT ><DT ><A HREF="function.ps-symbol-width.html" >ps_symbol_width</A > -- Gets width of a glyph</DT ><DT ><A HREF="function.ps-symbol.html" >ps_symbol</A > -- Output a glyph</DT ><DT ><A HREF="function.ps-translate.html" >ps_translate</A > -- Sets translation</DT ></DL ></DIV ></DIV ></DIV ><DIV CLASS="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE SUMMARY="Footer navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="function.system.html" ACCESSKEY="P" >Anterior</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="index.html" ACCESSKEY="H" >Principal</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="function.ps-add-bookmark.html" ACCESSKEY="N" >Próxima</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >system</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="funcref.html" ACCESSKEY="U" >Acima</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >ps_add_bookmark</TD ></TR ></TABLE ></DIV ></BODY ></HTML >