pdfscraper.layout.image
Module Contents
Classes
An image created from pdfminer or pymupdf object. |
|
dict() -> new empty dictionary |
Functions
|
|
|
|
Attributes
- pdfscraper.layout.image.get_image(layout_object)[source]
- Return type
Optional[pdfminer.layout.LTImage]
- pdfscraper.layout.image.attr_as(obj, field, value)[source]
- Parameters
field (str) –
- Return type
Iterator[None]
- class pdfscraper.layout.image.Image[source]
Bases:
pdfscraper.layout.utils.RectangularAn image created from pdfminer or pymupdf object.
- Parameters
bbox (Bbox) –
source_width (Optional[int]) –
source_height (Optional[int]) –
colorspace_name (Optional[str]) –
bpc (Optional[int]) –
xref (Optional[int]) –
name (Optional[str]) –
source (typing_extensions.Literal[pdfminer, mupdf]) –
raw_object (Any) –
parent_object (Any) –
colorspace_n (Optional[int]) –
- classmethod from_pdfminer(image, page_orientation)[source]
Create an image out of pdfminer object.
- Parameters
image (pdfminer.layout.LTImage) – pdfminer LTImage object.
orientation – page orientation data.
page_orientation (PageOrientation) –
- Returns
- Return type
- classmethod from_pymupdf(image, doc, page_orientation)[source]
- Parameters
image (MuPDFImage) –
doc (fitz.fitz.Document) –
page_orientation (PageOrientation) –
- Return type
- class pdfscraper.layout.image.MuPDFImage[source]
Bases:
TypedDictdict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object’s
(key, value) pairs
- dict(iterable) -> new dictionary initialized as if via:
d = {} for k, v in iterable:
d[k] = v
- dict(**kwargs) -> new dictionary initialized with the name=value pairs
in the keyword argument list. For example: dict(one=1, two=2)
- pdfscraper.layout.image.get_images_from_pymupdf_page(page)[source]
- Return type
Iterable[MuPDFImage]