Get list of field font resource names.
(self)
| 4123 | |
| 4124 | @property |
| 4125 | def FormFonts(self): |
| 4126 | """Get list of field font resource names.""" |
| 4127 | pdf = _as_pdf_document(self, required=0) |
| 4128 | if not pdf.m_internal: |
| 4129 | return |
| 4130 | fonts = mupdf.pdf_dict_getl( |
| 4131 | mupdf.pdf_trailer(pdf), |
| 4132 | PDF_NAME('Root'), |
| 4133 | PDF_NAME('AcroForm'), |
| 4134 | PDF_NAME('DR'), |
| 4135 | PDF_NAME('Font'), |
| 4136 | ) |
| 4137 | liste = list() |
| 4138 | if fonts.m_internal and mupdf.pdf_is_dict(fonts): # fonts exist |
| 4139 | n = mupdf.pdf_dict_len(fonts) |
| 4140 | for i in range(n): |
| 4141 | f = mupdf.pdf_dict_get_key(fonts, i) |
| 4142 | liste.append(JM_UnicodeFromStr(mupdf.pdf_to_name(f))) |
| 4143 | return liste |
| 4144 | |
| 4145 | def add_layer(self, name, creator=None, on=None): |
| 4146 | """Add a new OC layer.""" |
nothing calls this directly
no test coverage detected