Generator over the links of a page. Args: kinds: (list) link kinds to subselect from. If none, all links are returned. E.g. kinds=[LINK_URI] will only yield URI links.
(self, kinds=None)
| 12698 | return mupdf.pdf_to_str_buf(lang) |
| 12699 | |
| 12700 | def links(self, kinds=None): |
| 12701 | """ Generator over the links of a page. |
| 12702 | |
| 12703 | Args: |
| 12704 | kinds: (list) link kinds to subselect from. If none, |
| 12705 | all links are returned. E.g. kinds=[LINK_URI] |
| 12706 | will only yield URI links. |
| 12707 | """ |
| 12708 | all_links = self.get_links() |
| 12709 | for link in all_links: |
| 12710 | if kinds is None or link["kind"] in kinds: |
| 12711 | yield (link) |
| 12712 | |
| 12713 | def load_annot(self, ident: typing.Union[str, int]) -> Annot: |
| 12714 | """Load an annot by name (/NM key) or xref. |