QPdfLink#
The QPdfLink
class defines a link between a region on a page (such as a hyperlink or a search result) and a destination (page, location on the page, and zoom level at which to view it). More…
Synopsis#
Functions#
def
contextAfter
()def
contextBefore
()def
copyToClipboard
([mode=QClipboard.Clipboard])def
isValid
()def
location
()def
page
()def
rectangles
()def
swap
(other)def
toString
()def
url
()def
zoom
()
Detailed Description#
- class PySide6.QtPdf.QPdfLink#
PySide6.QtPdf.QPdfLink(other)
- Parameters
other –
PySide6.QtPdf.QPdfLink
Constructs an invalid Destination.
See also
valid
- PySide6.QtPdf.QPdfLink.contextAfter()#
- Return type
str
This property holds adjacent text found on the page after the search string. If the link is a hyperlink, this string is empty.
See also
- PySide6.QtPdf.QPdfLink.contextBefore()#
- Return type
str
This property holds adjacent text found on the page before the search string. If the link is a hyperlink, this string is empty.
See also
Copies the toString()
representation of the link to the system clipboard
depending on the mode
given.
- PySide6.QtPdf.QPdfLink.isValid()#
- Return type
bool
This property holds whether the link is valid.
- PySide6.QtPdf.QPdfLink.location()#
- Return type
This property holds the location on the page
, in units of points. If the link is a search result, it is the location where the result is found; if the link is a hyperlink, it is the destination location.
- PySide6.QtPdf.QPdfLink.page()#
- Return type
int
This property holds the page number. If the link is a search result, it is the page number on which the result is found; if the link is a hyperlink, it is the destination page number.
- PySide6.QtPdf.QPdfLink.rectangles()#
- Return type
This property holds the region (set of rectangles) occupied by the link or search result on the page where it was found. If the text wraps around to multiple lines on the page, there may be multiple rectangles:
![]()
See also
- PySide6.QtPdf.QPdfLink.swap(other)#
- Parameters
other –
PySide6.QtPdf.QPdfLink
- PySide6.QtPdf.QPdfLink.toString()#
- Return type
str
Returns a translated representation for display.
See also
- PySide6.QtPdf.QPdfLink.url()#
- Return type
This property holds the destination URL if the link is an external hyperlink; otherwise, it’s empty.
- PySide6.QtPdf.QPdfLink.zoom()#
- Return type
float
This property holds the suggested magnification level, where 1.0 means default scale (1 pixel = 1 point). If the link is a search result, this value is not used.