Sophie

Sophie

distrib > Mandriva > 9.1 > ppc > by-pkgid > a34ed6838d4b29d38abd504392a4a797 > files > 2319

php-manual-es-4.3.0-2mdk.noarch.rpm

<HTML
><HEAD
><TITLE
>printer_set_option</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
REL="HOME"
TITLE="Manual de PHP"
HREF="index.html"><LINK
REL="UP"
TITLE="Printer functions"
HREF="ref.printer.html"><LINK
REL="PREVIOUS"
TITLE="printer_select_pen"
HREF="function.printer-select-pen.html"><LINK
REL="NEXT"
TITLE="printer_start_doc"
HREF="function.printer-start-doc.html"><META
HTTP-EQUIV="Content-type"
CONTENT="text/html; charset=ISO-8859-1"></HEAD
><BODY
CLASS="refentry"
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 de PHP</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="function.printer-select-pen.html"
ACCESSKEY="P"
>Anterior</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="function.printer-start-doc.html"
ACCESSKEY="N"
>Siguiente</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><H1
><A
NAME="function.printer-set-option"
></A
>printer_set_option</H1
><DIV
CLASS="refnamediv"
><A
NAME="AEN66673"
></A
><P
>    (no version information, might be only in CVS)</P
>printer_set_option&nbsp;--&nbsp;Configure the printer connection</DIV
><DIV
CLASS="refsect1"
><A
NAME="AEN66676"
></A
><H2
>Description</H2
>bool <B
CLASS="methodname"
>printer_set_option</B
> ( resource handle, int option, mixed value)<BR
></BR
><P
>&#13;     The function sets the following options for the current connection.
     <TT
CLASS="parameter"
><I
>handle</I
></TT
> must be a valid handle to a printer.
     For <TT
CLASS="parameter"
><I
>option</I
></TT
> can be one of the following constants:
     <P
></P
><UL
><LI
><P
>&#13;        <TT
CLASS="parameter"
><I
>PRINTER_COPIES</I
></TT
>:
        sets how many copies should be printed, <TT
CLASS="parameter"
><I
>value</I
></TT
> 
        must be an integer.  
       </P
></LI
><LI
><P
>&#13;        <TT
CLASS="parameter"
><I
>PRINTER_MODE</I
></TT
>:
        specifies the type of data (text, raw or emf), 
        <TT
CLASS="parameter"
><I
>value</I
></TT
> must be a string.
       </P
></LI
><LI
><P
>&#13;         <TT
CLASS="parameter"
><I
>PRINTER_TITLE</I
></TT
>:
         specifies the name of the document, <TT
CLASS="parameter"
><I
>value</I
></TT
> 
         must be a string.
       </P
></LI
><LI
><P
>&#13;         <TT
CLASS="parameter"
><I
>PRINTER_ORIENTATION</I
></TT
>:
         specifies the orientation of the paper, <TT
CLASS="parameter"
><I
>value</I
></TT
> 
         can be either PRINTER_ORIENTATION_PORTRAIT or 
         PRINTER_ORIENTATION_LANDSCAPE
       </P
></LI
><LI
><P
>&#13;         <TT
CLASS="parameter"
><I
>PRINTER_RESOLUTION_Y</I
></TT
>:
         specifies the y-resolution in DPI, <TT
CLASS="parameter"
><I
>value</I
></TT
> 
         must be an integer.
       </P
></LI
><LI
><P
>&#13;         <TT
CLASS="parameter"
><I
>PRINTER_RESOLUTION_X</I
></TT
>:
         specifies the x-resolution in DPI, <TT
CLASS="parameter"
><I
>value</I
></TT
> 
         must be an integer.
       </P
></LI
><LI
><P
>&#13;         <TT
CLASS="parameter"
><I
>PRINTER_PAPER_FORMAT</I
></TT
>:
         specifies the a predefined paper format, set <TT
CLASS="parameter"
><I
>value</I
></TT
> 
         to PRINTER_FORMAT_CUSTOM if you want to specify a custom format with 
         PRINTER_PAPER_WIDTH and PRINTER_PAPER_LENGTH. <TT
CLASS="parameter"
><I
>value</I
></TT
> 
         can be one of the following constants.
       </P
><P
></P
><UL
><LI
><P
>&#13;          <TT
CLASS="parameter"
><I
> PRINTER_FORMAT_CUSTOM</I
></TT
>:
          let's you specify a custom paper format. 
         </P
></LI
><LI
><P
>&#13;          <TT
CLASS="parameter"
><I
> PRINTER_FORMAT_LETTER</I
></TT
>:
          specifies standard letter format (8 1/2- by 11-inches).
         </P
></LI
><LI
><P
>&#13;          <TT
CLASS="parameter"
><I
> PRINTER_FORMAT_LETTER</I
></TT
>:
          specifies standard legal format (8 1/2- by 14-inches).
         </P
></LI
><LI
><P
>&#13;          <TT
CLASS="parameter"
><I
>PRINTER_FORMAT_A3</I
></TT
>:
          specifies standard A3 format (297- by 420-millimeters). 
         </P
></LI
><LI
><P
>&#13;          <TT
CLASS="parameter"
><I
>PRINTER_FORMAT_A4</I
></TT
>:
          specifies standard A4 format (210- by 297-millimeters).
         </P
></LI
><LI
><P
>&#13;          <TT
CLASS="parameter"
><I
>PRINTER_FORMAT_A5</I
></TT
>:
          specifies standard A5 format (148- by 210-millimeters).
         </P
></LI
><LI
><P
>&#13;          <TT
CLASS="parameter"
><I
>PRINTER_FORMAT_B4</I
></TT
>:
          specifies standard B4 format (250- by 354-millimeters).
         </P
></LI
><LI
><P
>&#13;          <TT
CLASS="parameter"
><I
>PRINTER_FORMAT_B5</I
></TT
>:
          specifies standard B5 format (182- by 257-millimeter).
         </P
></LI
><LI
><P
>&#13;          <TT
CLASS="parameter"
><I
>PRINTER_FORMAT_FOLIO</I
></TT
>:
          specifies standard FOLIO format (8 1/2- by 13-inch).
         </P
></LI
></UL
></LI
><LI
><P
>&#13;        <TT
CLASS="parameter"
><I
>PRINTER_PAPER_LENGTH</I
></TT
>:
        if PRINTER_PAPER_FORMAT is set to PRINTER_FORMAT_CUSTOM, 
        PRINTER_PAPER_LENGTH specifies a custom paper length in mm, 
        <TT
CLASS="parameter"
><I
>value</I
></TT
> must be an integer.
       </P
></LI
><LI
><P
>&#13;        <TT
CLASS="parameter"
><I
>PRINTER_PAPER_WIDTH</I
></TT
>:
        if PRINTER_PAPER_FORMAT is set to PRINTER_FORMAT_CUSTOM, 
        PRINTER_PAPER_WIDTH specifies a custom paper width in mm, 
        <TT
CLASS="parameter"
><I
>value</I
></TT
> must be an integer.
       </P
></LI
><LI
><P
>&#13;        <TT
CLASS="parameter"
><I
>PRINTER_SCALE</I
></TT
>:
        specifies the factor by which the printed output is to be scaled. 
        the page size is scaled from the physical page size by a factor 
        of scale/100. for example if you set the scale to 50, the output 
        would be half of it's original size. <TT
CLASS="parameter"
><I
>value</I
></TT
> 
        must be an integer.
       </P
></LI
><LI
><P
>&#13;        <TT
CLASS="parameter"
><I
>PRINTER_BACKGROUND_COLOR</I
></TT
>:
        specifies the background color for the actual device context, 
        <TT
CLASS="parameter"
><I
>value</I
></TT
> must be a string containing the rgb 
        information in hex format i.e. "005533".
       </P
></LI
><LI
><P
>&#13;        <TT
CLASS="parameter"
><I
>PRINTER_TEXT_COLOR</I
></TT
>:
        specifies the text color for the actual device context, 
        <TT
CLASS="parameter"
><I
>value</I
></TT
> must be a string containing the rgb 
        information in hex format i.e. "005533".
       </P
></LI
><LI
><P
>&#13;        <TT
CLASS="parameter"
><I
>PRINTER_TEXT_ALIGN</I
></TT
>:
        specifies the text alignment for the actual device context, 
        <TT
CLASS="parameter"
><I
>value</I
></TT
> can be combined through OR'ing the 
        following constants:
       </P
><P
></P
><UL
><LI
><P
>&#13;          <TT
CLASS="parameter"
><I
>PRINTER_TA_BASELINE</I
></TT
>:
          text will be aligned at the base line.
         </P
></LI
><LI
><P
>&#13;          <TT
CLASS="parameter"
><I
>PRINTER_TA_BOTTOM</I
></TT
>:
          text will be aligned at the bottom.
         </P
></LI
><LI
><P
>&#13;          <TT
CLASS="parameter"
><I
>PRINTER_TA_TOP</I
></TT
>:
          text will be aligned at the top.
         </P
></LI
><LI
><P
>&#13;          <TT
CLASS="parameter"
><I
>PRINTER_TA_CENTER</I
></TT
>:
          text will be aligned at the center.  
         </P
></LI
><LI
><P
>&#13;          <TT
CLASS="parameter"
><I
>PRINTER_TA_LEFT</I
></TT
>:
          text will be aligned at the left.  
         </P
></LI
><LI
><P
>&#13;          <TT
CLASS="parameter"
><I
>PRINTER_TA_RIGHT</I
></TT
>:
          text will be aligned at the right.         
         </P
></LI
></UL
></LI
></UL
>
     </P
><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
CLASS="EXAMPLE"
><TR
><TD
><DIV
CLASS="example"
><A
NAME="AEN66794"
></A
><P
><B
>Ejemplo 1. <B
CLASS="function"
>printer_set_option()</B
> example</B
></P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
CELLPADDING="5"
><TR
><TD
><PRE
CLASS="php"
>$handle = printer_open();
printer_set_option($handle, PRINTER_SCALE, 75);
printer_set_option($handle, PRINTER_TEXT_ALIGN, PRINTER_TA_LEFT);
printer_close($handle);</PRE
></TD
></TR
></TABLE
></DIV
></TD
></TR
></TABLE
></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.printer-select-pen.html"
ACCESSKEY="P"
>Anterior</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Inicio</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="function.printer-start-doc.html"
ACCESSKEY="N"
>Siguiente</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>printer_select_pen</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="ref.printer.html"
ACCESSKEY="U"
>Subir</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>printer_start_doc</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>