PySide6.QtPdf.QPdfLink¶
- class QPdfLink¶
- The - QPdfLinkclass 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).- Synopsis¶- Properties¶- Methods¶- def - __init__()
- def - contextAfter()
- def - contextBefore()
- def - isValid()
- def - location()
- def - page()
- def - rectangles()
- def - swap()
- def - toString()
- def - url()
- def - zoom()
 - Note - This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE - Note - Properties can be used directly when - from __feature__ import true_propertyis used or via accessor functions otherwise.- property contextAfterᅟ: 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 - Access functions:
 - property contextBeforeᅟ: 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 - Access functions:
 - 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.- Access functions:
 - property pageᅟ: 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. - Access functions:
 - property rectanglesᅟ: list of QRectF¶
 - 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 - Access functions:
 - This property holds the destination URL if the link is an external hyperlink; otherwise, it’s empty. - Access functions:
 - property validᅟ: bool¶
 - This property holds whether the link is valid. - Access functions:
 - property zoomᅟ: 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. - Access functions:
 - __init__()¶
 - Constructs an invalid Destination. - See also - valid- __init__(other)
- Parameters:
- other – - QPdfLink
 
 - contextAfter()¶
- Return type:
- str 
 
 - Getter of property - contextAfterᅟ.- contextBefore()¶
- Return type:
- str 
 
 - Getter of property - contextBeforeᅟ.- Copies the - toString()representation of the link to the system clipboard depending on the- modegiven.- isValid()¶
- Return type:
- bool 
 
 - Getter of property - validᅟ.- Getter of property - locationᅟ.- page()¶
- Return type:
- int 
 
 - Getter of property - pageᅟ.- Getter of property - rectanglesᅟ.- toString()¶
- Return type:
- str 
 
 - Returns a translated representation for display. - See also - Getter of property - urlᅟ.- zoom()¶
- Return type:
- float 
 
 - Getter of property - zoomᅟ.