Either False or PDF field count.
(self)
| 5524 | |
| 5525 | @property |
| 5526 | def is_form_pdf(self): |
| 5527 | """Either False or PDF field count.""" |
| 5528 | pdf = _as_pdf_document(self, required=0) |
| 5529 | if not pdf.m_internal: |
| 5530 | return False |
| 5531 | count = -1 |
| 5532 | try: |
| 5533 | fields = mupdf.pdf_dict_getl( |
| 5534 | mupdf.pdf_trailer(pdf), |
| 5535 | mupdf.PDF_ENUM_NAME_Root, |
| 5536 | mupdf.PDF_ENUM_NAME_AcroForm, |
| 5537 | mupdf.PDF_ENUM_NAME_Fields, |
| 5538 | ) |
| 5539 | if mupdf.pdf_is_array(fields): |
| 5540 | count = mupdf.pdf_array_len(fields) |
| 5541 | except Exception: |
| 5542 | if g_exceptions_verbose: exception_info() |
| 5543 | return False |
| 5544 | if count >= 0: |
| 5545 | return count |
| 5546 | return False |
| 5547 | |
| 5548 | @property |
| 5549 | def is_pdf(self): |
nothing calls this directly
no test coverage detected