Book
The Book behavior is present on Custom PDF Objects. The Book behaviour allows you to manipulate the displayed PDF.
Member Variables¶
Variable | Type | Description |
---|---|---|
page_offset | The page numbers displayed in the Custom PDF UI are offset by this amount. |
Info
For example, if page_offset
were set to 10, the first page in the UI would be 11, rather than 1. Negative numbers are accepted, and useful if a rule book contains a front cover, index etc. within the PDF file.
Function Summary¶
Function Details¶
getPage(...)¶
Gets the current page of the PDF.
getPage(offsetPageNumbering)
- offsetPageNumbering: Indicates whether or not page_offset should be applied to the page number returned.
- Optional, defaults to `false`.
setHighlight(...)¶
Draws a highlight rectangle on the popout mode of the PDF at the given coordinates. Coordinates (0,0) are the lower left corner of the PDF, while coordinates (1,1) are the upper right corner.
setHighlight(x1, y1, x2, y2)
Example
Highlight the upper right quarter of a PDF.
object.Book.setHighlight(0.5, 0.5, 1, 1)
setPage(...)¶
Sets the current page of the PDF. Returns true if the page was succesfully set, false if the page number was invalid.
setPage(page, offsetPageNumbering)
- page: The new page number.
- offsetPageNumbering: Indicates whether or not page_offset should be applied to the page number set.
- Optional, defaults to `false`.