ps_begin_page
ps_begin_page
Start a new page
bool **ps_begin_page** resource $psdoc float $width float $height
Starts a new page. Although the parameters
and imply a different page size for each
page, this is not possible in PostScript. The first call of
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.
width``height``ps_begin_page
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.
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.
If there is up to the first call of no
call of , 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 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
to set the info field
and possibly
before any or
calls.
ps_begin_page``ps_findfont``ps_findfont``ps_set_info``BoundingBox``Orientation``ps_findfont``ps_begin_page
Opmerking: > Up to version 0.2.6 of pslib, this function will always overwrite the BoundingBox and Orientation, if it has been set before with and has not been called before.
ps_set_info``ps_findfont
psdoc
Resource identifier of the postscript file
as returned by .
ps_new
widthThe width of the page in pixel, e.g. 596 for A4 format.
heightThe height of the page in pixel, e.g. 842 for A4 format.
return.success
ps_end_page``ps_findfont``ps_set_info