Load a journal from a file.
(self, filename)
| 5605 | return enabled |
| 5606 | |
| 5607 | def journal_load(self, filename): |
| 5608 | """Load a journal from a file.""" |
| 5609 | if self.is_closed or self.is_encrypted: |
| 5610 | raise ValueError("document closed or encrypted") |
| 5611 | pdf = _as_pdf_document(self) |
| 5612 | if isinstance(filename, str): |
| 5613 | mupdf.pdf_load_journal(pdf, filename) |
| 5614 | else: |
| 5615 | res = JM_BufferFromBytes(filename) |
| 5616 | stm = mupdf.fz_open_buffer(res) |
| 5617 | mupdf.pdf_deserialise_journal(pdf, stm) |
| 5618 | if not pdf.m_internal.journal: |
| 5619 | RAISEPY( "Journal and document do not match", JM_Exc_FileDataError) |
| 5620 | |
| 5621 | def journal_op_name(self, step): |
| 5622 | """Show operation name for given step.""" |
nothing calls this directly
no test coverage detected