Retrieve a list of fonts used on a page.
(self, pno: int, full: bool =False)
| 5047 | return xrefs |
| 5048 | |
| 5049 | def get_page_fonts(self, pno: int, full: bool =False) -> list: |
| 5050 | """Retrieve a list of fonts used on a page. |
| 5051 | """ |
| 5052 | if self.is_closed or self.is_encrypted: |
| 5053 | raise ValueError("document closed or encrypted") |
| 5054 | if not self.is_pdf: |
| 5055 | return () |
| 5056 | if type(pno) is not int: |
| 5057 | try: |
| 5058 | pno = pno.number |
| 5059 | except Exception: |
| 5060 | exception_info() |
| 5061 | raise ValueError("need a Page or page number") |
| 5062 | val = self._getPageInfo(pno, 1) |
| 5063 | if not full: |
| 5064 | return [v[:-1] for v in val] |
| 5065 | return val |
| 5066 | |
| 5067 | def get_page_images(self, pno: int, full: bool =False) -> list: |
| 5068 | """Retrieve a list of images used on a page. |