PageImageArea class
Leave feedback
On this page
Represents a page image area used to represent an image on a page in template parsing or an image attachment extracted from emails or Zip archives.
An instance of PageImageArea is returned by the following methods:
See the usage examples there.
The PageImageArea type exposes the following members:
| Constructor | Description |
|---|---|
| init | Initializes a new instance of the PageImageArea class. |
| init | Initializes a new PageImageArea instance. |
| Method | Description |
|---|---|
| get_image_stream | Returns the image stream. |
| get_image_stream | Returns the image stream in a different format. |
| get_image_stream_image_options | |
| save | Saves the image to the file. |
| save | Saves the image to the file in a different format. |
| save_file | |
| save_string |
| Property | Description |
|---|---|
| file_type | The format of the image as a FileType instance. |
| rotation | The rotation angle of the image. |
| page | The document page information such as page index and page size. (inherited from PageArea) |
| rectangle | The rectangular area of the page as a Rectangle. (inherited from PageArea) |
from groupdocs.parser import Parser
parser = Parser("sample.docx")
# Iterate over image areas on each page
for img_area in parser.get_images():
# Save each image to a file; the page number can be used in the filename
img_area.save(f"output/image_page_{img_area.page}.png")
- module
groupdocs.parser.data
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.