<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE >ps_begin_page</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="PostScript document creation" HREF="ref.ps.html"><LINK REL="PREVIOUS" TITLE="ps_arcn" HREF="function.ps-arcn.html"><LINK REL="NEXT" TITLE="ps_begin_pattern" HREF="function.ps-begin-pattern.html"><META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=UTF-8"></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 do PHP</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="function.ps-arcn.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-begin-pattern.html" ACCESSKEY="N" >Próxima</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><H1 ><A NAME="function.ps-begin-page" ></A >ps_begin_page</H1 ><DIV CLASS="refnamediv" ><A NAME="AEN185758" ></A ><P > (PECL)</P >ps_begin_page -- Start a new page</DIV ><DIV CLASS="refsect1" ><A NAME="AEN185761" ></A ><H2 >Descrição</H2 >bool <B CLASS="methodname" >ps_begin_page</B > ( resource psdoc, float width, float height )<BR ></BR ><P > Starts a new page. Although the parameters <CODE CLASS="parameter" >width</CODE > and <CODE CLASS="parameter" >height</CODE > imply a different page size for each page, this is not possible in PostScript. The first call of <B CLASS="function" >ps_begin_page()</B > will set the page size for the whole document. Consecutive calls will have no effect, except for creating a new page. The situation is different if you intent to convert the PostScript document into PDF. This function places pdfmarks into the document which can set the size for each page indiviually. The resulting PDF document will have different page sizes. </P ><P > Though PostScript does not know different page sizes, pslib places a bounding box for each page into the document. This size is evaluated by some PostScript viewers and will have precedence over the BoundingBox in the Header of the document. This can lead to unexpected results when you set a BoundingBox whose lower left corner is not (0, 0), because the bounding box of the page will always have a lower left corner (0, 0) and overwrites the global setting. </P ><P > Each page is encapsulated into save/restore. This means, that most of the settings made on one page will not be retained on the next page. </P ><P > If there is up to the first call of <B CLASS="function" >ps_begin_page()</B > no call of <A HREF="function.ps-findfont.html" ><B CLASS="function" >ps_findfont()</B ></A >, then the header of the PostScript document will be output and the bounding box will be set to the size of the first page. The lower left corner of the bounding box is set to (0, 0). If <A HREF="function.ps-findfont.html" ><B CLASS="function" >ps_findfont()</B ></A > was called before, then the header has been output already, and the document will not have a valid bounding box. In order to prevent this, one should call <A HREF="function.ps-set-info.html" ><B CLASS="function" >ps_set_info()</B ></A > to set the info field <TT CLASS="literal" >BoundingBox</TT > and possibly <TT CLASS="literal" >Orientation</TT > before any <A HREF="function.ps-findfont.html" ><B CLASS="function" >ps_findfont()</B ></A > or <B CLASS="function" >ps_begin_page()</B > calls. </P ><DIV CLASS="note" ><BLOCKQUOTE CLASS="note" ><P ><B >Nota: </B > Up to version 0.2.6 of pslib, this function will always overwrite the BoundingBox and Orientation, if it has been set before with <A HREF="function.ps-set-info.html" ><B CLASS="function" >ps_set_info()</B ></A > and <A HREF="function.ps-findfont.html" ><B CLASS="function" >ps_findfont()</B ></A > has not been called before. </P ></BLOCKQUOTE ></DIV ></DIV ><DIV CLASS="refsect1" ><A NAME="AEN185794" ></A ><H2 >Parâmetros</H2 ><P > <P ></P ><DIV CLASS="variablelist" ><DL ><DT ><CODE CLASS="parameter" >psdoc</CODE ></DT ><DD ><P > Resource identifier of the postscript file as returned by <A HREF="function.ps-new.html" ><B CLASS="function" >ps_new()</B ></A >. </P ></DD ><DT ><CODE CLASS="parameter" >width</CODE ></DT ><DD ><P > The width of the page in pixel, e.g. 596 for A4 format. </P ></DD ><DT ><CODE CLASS="parameter" >height</CODE ></DT ><DD ><P > The height of the page in pixel, e.g. 842 for A4 format. </P ></DD ></DL ></DIV > </P ></DIV ><DIV CLASS="refsect1" ><A NAME="AEN185814" ></A ><H2 >Valores de retornado</H2 ><P > Retorna <TT CLASS="constant" ><B >TRUE</B ></TT > em caso de sucesso ou <TT CLASS="constant" ><B >FALSE</B ></TT > em falhas. </P ></DIV ><DIV CLASS="refsect1" ><A NAME="AEN185819" ></A ><H2 >Veja também</H2 ><P > <P ></P ><TABLE BORDER="0" ><TBODY ><TR ><TD ><A HREF="function.ps-end-page.html" ><B CLASS="function" >ps_end_page()</B ></A ></TD ></TR ><TR ><TD ><A HREF="function.ps-findfont.html" ><B CLASS="function" >ps_findfont()</B ></A ></TD ></TR ><TR ><TD ><A HREF="function.ps-set-info.html" ><B CLASS="function" >ps_set_info()</B ></A ></TD ></TR ></TBODY ></TABLE ><P ></P > </P ></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.ps-arcn.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-begin-pattern.html" ACCESSKEY="N" >Próxima</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >ps_arcn</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="ref.ps.html" ACCESSKEY="U" >Acima</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >ps_begin_pattern</TD ></TR ></TABLE ></DIV ></BODY ></HTML >