说明
ps_begin_page
( resource $psdoc
, float $width
, float $height
) : bool
Starts a new page. Although the parameters width
and height imply a different page size for each
page, this is not possible in PostScript. The first call of
ps_begin_page() 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.
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 ps_begin_page() no
call of BoundingBox and possibly Orientation
before any ps_begin_page() calls.
Note:
Up to version 0.2.6 of pslib, this function will always overwrite
the BoundingBox and Orientation, if it has been set before with