[id] = pdf.GetBrushFromPage(id, page, brid[, transparent])
id
to a vector brush using the identifier brid
. If you pass Nil
in brid
, pdf.GetBrush()
will automatically choose a vacant identifier and return it.
The page to convert must be specified in the page
argument. It must be a number in
the range of 1 to the total number of pages in the document and the page must have
been previously loaded using pdf.LoadPage(). The PDF document specified
by id
must have been previously opened using pdf.OpenDocument().
The optional parameter transparent
allows you to specify whether you'd like the
page background to be transparent or white. If you pass True
here, you'll get a
vector brush in which the page background is completely transparent by using
alpha channel transparency. Otherwise the page background will be white and your
vector brush won't use any transparency.
Note that the vector brush will still depend on the PDF document so it is not allowed to call pdf.CloseDocument() on the document before freeing the brush. It also is not allowed to call pdf.FreePage() before freeing the brush.
If you want to convert a PDF page into a brush without being forced to load the page using pdf.LoadPage() first, use the pdf.GetBrush() function. See pdf.GetBrush for details.
Nil
for auto id selectionTrue
for a transparent page background, False
for a white page backgroundNil
as argument 3 (see above)