__init__ constructor
Leave feedback
On this page
Initializes a new PngViewOptions instance.
For the code example, see the documentation.
def __init__(self, create_page_stream):
...
| Parameter | Type | Description |
|---|---|---|
| create_page_stream | CreatePageStream |
The method that instantiates a stream used to write output page data. |
| Raises | Description |
|---|---|
ValueError |
When create_page_stream is None. |
Initializes an instance of the PngViewOptions class.
For the code example, see the documentation.
def __init__(self, create_page_stream, release_page_stream):
...
| Parameter | Type | Description |
|---|---|---|
| create_page_stream | CreatePageStream |
The method that instantiates a stream used to write output page data. |
| release_page_stream | ReleasePageStream |
The method that releases a stream created by the method assigned to the delegate passed to create_page_stream parameter. |
| Raises | Description |
|---|---|
ValueError |
When release_page_stream is None. |
Initializes a new PngViewOptions instance.
For more information, see the documentation.
def __init__(self, page_stream_factory):
...
| Parameter | Type | Description |
|---|---|---|
| page_stream_factory | IPageStreamFactory |
The factory which implements methods for creating and releasing output page stream. |
| Raises | Description |
|---|---|
ValueError |
If page_stream_factory is None. |
Initializes a PngViewOptions instance.
This constructor creates a PngViewOptions with "p_{0}.png" as the default file path format for the output files. The generated PNG files are saved in the current working directory of the application.
def __init__(self):
...
from groupdocs.viewer import Viewer
from groupdocs.viewer.options import PngViewOptions
with Viewer("document.pdf") as viewer:
viewer.view(PngViewOptions("page_{0}.png"))
Initializes a new PngViewOptions instance.
For the code example, see the documentation.
def __init__(self, file_path_format):
...
| Parameter | Type | Description |
|---|---|---|
| file_path_format | str |
The file path format, e.g. 'page_{0}.png'. |
| Raises | Description |
|---|---|
ValueError |
When file_path_format is None or empty. |
from groupdocs.viewer import Viewer
from groupdocs.viewer.options import PngViewOptions
with Viewer("document.pdf") as viewer:
viewer.view(PngViewOptions("page_{0}.png"))
- class
PngViewOptions
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.