__init__ constructor

On this page

init

Initializes an instance of the LoadOptions class.

def __init__(self):
    ...

init

Initializes a new LoadOptions instance.

For code example, see the documentation.

def __init__(self, file_type):
    ...
Parameter Type Description
file_type FileType The type of the file to open.
Raises Description
ValueError If file_type is None.

Example

from groupdocs.viewer import Viewer, FileType
from groupdocs.viewer.options import LoadOptions, PdfViewOptions

load_options = LoadOptions(FileType.MD)  # specify the file type
with Viewer("terms_of_service.txt", load_options) as viewer:
    view_options = PdfViewOptions("output.pdf")
    viewer.view(view_options)

See Also

On this page