for_png_view method

for_png_view

Initializes an instance of the ViewInfoOptions class to retrieve information about view when rendering into PNG.

def for_png_view(cls):
    ...

Returns: ViewInfoOptions: New instance of the ViewInfoOptions class.

Example

from groupdocs.viewer import Viewer
from groupdocs.viewer.options import ViewInfoOptions

# Create view info options for PNG format
view_info_options_png = ViewInfoOptions.for_png_view()

# Load a document and get view information for PNG
with Viewer("sample.xml") as viewer:
    result_png = viewer.get_view_info(view_info_options_png)

for_png_view

Initializes an instance of the ViewInfoOptions class to retrieve information about view when rendering into PNG.

def for_png_view(cls, extract_text):
    ...
Parameter Type Description
extract_text bool Enables text extraction.

Returns: ViewInfoOptions: New instance of the ViewInfoOptions class.

Example

from groupdocs.viewer.options import ViewInfoOptions

# Create view info options for PNG format with text extraction enabled
options = ViewInfoOptions.for_png_view(extractText=True)

See Also