Script Reference : Sheet
A Sheet object represents final sheet of paper.
Name | Type | Description |
---|---|---|
selected | bool | Sheet selection status. |
front | bool | true for front faces and false for back ones. |
Name | Description |
---|---|
Sheet Object is the part of Layout can be retrieved or created by Layout methods only. |
Name | Return Type | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
void EnsureVisible() | Ensures that a sheet of paper is at least partially visible in the main print preview window. | |||||||||
bool IsAnySelected() | bool | Returns true in case is sheet of at least one page on the sheet is selected. | ||||||||
bool SaveAs(string file [, Table params]) | bool | Save page as image. Type of image is defined by file
extension. Rect and other Extra parameters could be provided in
optional table:
|
||||||||
Metrics
Point GetSize() |
Point | Retrieves the size of the paper sheet. | ||||||||
Point GetAreaSize() | Point | Returns size of printable area. | ||||||||
Point GetAreaOrg() | Point | Returns origin of printable area. | ||||||||
Rect GetArea() | Rect | Returns rectangle of the page printable area. | ||||||||
Sub Pages
int GetNumPages() |
int | Gets the number of source pages located on this sheet of paper. | ||||||||
Page GetPage(int) | Page | Returns the specified page in this paper sheet. | ||||||||
GetPageRect | Rect | Not implemented yet | ||||||||
Point GetPagePos(int i/ Page) |
Point | The GetPagePos method gets the offset point currently set for the page transformation. | ||||||||
float GetPageScale(int/Page) | float | The GetPageScale method gets the scaling factor currently set for the page transformation of this paper sheet. The page transformation converts page coordinates to paper coordinates. 1.0 - means 1 to 1 transformation, i.e. no rescaling. | ||||||||
bool SetPagePos(int index/Page, Point pos) | bool | The SetPagePos method sets the offset point currently set for the page transformation. | ||||||||
bool SetPageScale(int index/Page, float scale); | bool | The SetPageScale method sets the scaling factor for the page transformation. | ||||||||
int InsertPage(Page) | int | Inserts source page into this sheet of paper. Returns zero based index on inserted page. | ||||||||
bool DeletePage(int index/Page); | bool | Removes page from this sheet of paper. |
Following methods are available for form pages:
GetAreaSizeF, GetAreaOrgF, GetAreaF, GetNumPagesF, GetPageF, GetPagePosF, GetPageScaleF, SetPagePosF, SetPageScaleF, InsertPageF, DeletePageF
They are fully equal to regular methods, but work with form pages or form layout.
local paper=layout.GetSheet(0); local r=Rect(29,21,147,68); //local opt={dpi=150,JPEGquality=0.05,rect=r,type="jpg"}; local opt={dpi=150,rect=r}; paper.SaveAs("c:/temp/page1.png",opt);