pdf_file.py
PymupdfFile
dataclass
Bases: IO[Document]
IO to load from and save PDF files using Pymupdf.
Example usage:
>>> from pathlib import Path
>>> from ordeq_pymupdf import PymupdfFile
>>> MyPDF = PymupdfFile(
... path=Path("path/to.index")
... )
load()
Read a PDF file and open the pymypdf Document.
Returns:
Type | Description |
---|---|
Document
|
|
save(document)
Save a pymypdf Document to a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
document
|
Document
|
document to save |
required |