# WARNING: Please don't edit this file. It was generated by Python/WinRT v1.0.0-beta.2

import enum
import sys
import types
import typing
import uuid

import winsdk._winrt as _winrt

try:
    import winsdk.windows.foundation
except Exception:
    pass

try:
    import winsdk.windows.storage
except Exception:
    pass

try:
    import winsdk.windows.storage.streams
except Exception:
    pass

try:
    import winsdk.windows.ui
except Exception:
    pass

class PdfPageRotation(enum.IntEnum):
    NORMAL = 0
    ROTATE90 = 1
    ROTATE180 = 2
    ROTATE270 = 3

class PdfDocument(_winrt.Object):
    is_password_protected: _winrt.Boolean
    page_count: _winrt.UInt32
    @staticmethod
    def _from(obj: _winrt.Object) -> PdfDocument: ...
    @typing.overload
    def get_page(self, page_index: _winrt.UInt32) -> PdfPage: ...
    @typing.overload
    @staticmethod
    def load_from_file_async(file: winsdk.windows.storage.IStorageFile) -> winsdk.windows.foundation.IAsyncOperation[PdfDocument]: ...
    @typing.overload
    @staticmethod
    def load_from_file_async(file: winsdk.windows.storage.IStorageFile, password: str) -> winsdk.windows.foundation.IAsyncOperation[PdfDocument]: ...
    @typing.overload
    @staticmethod
    def load_from_stream_async(input_stream: winsdk.windows.storage.streams.IRandomAccessStream) -> winsdk.windows.foundation.IAsyncOperation[PdfDocument]: ...
    @typing.overload
    @staticmethod
    def load_from_stream_async(input_stream: winsdk.windows.storage.streams.IRandomAccessStream, password: str) -> winsdk.windows.foundation.IAsyncOperation[PdfDocument]: ...

class PdfPage(winsdk.windows.foundation.IClosable, _winrt.Object):
    dimensions: PdfPageDimensions
    index: _winrt.UInt32
    preferred_zoom: _winrt.Single
    rotation: PdfPageRotation
    size: winsdk.windows.foundation.Size
    @staticmethod
    def _from(obj: _winrt.Object) -> PdfPage: ...
    @typing.overload
    def close(self) -> None: ...
    @typing.overload
    def prepare_page_async(self) -> winsdk.windows.foundation.IAsyncAction: ...
    @typing.overload
    def render_to_stream_async(self, output_stream: winsdk.windows.storage.streams.IRandomAccessStream) -> winsdk.windows.foundation.IAsyncAction: ...
    @typing.overload
    def render_to_stream_async(self, output_stream: winsdk.windows.storage.streams.IRandomAccessStream, options: PdfPageRenderOptions) -> winsdk.windows.foundation.IAsyncAction: ...

class PdfPageDimensions(_winrt.Object):
    art_box: winsdk.windows.foundation.Rect
    bleed_box: winsdk.windows.foundation.Rect
    crop_box: winsdk.windows.foundation.Rect
    media_box: winsdk.windows.foundation.Rect
    trim_box: winsdk.windows.foundation.Rect
    @staticmethod
    def _from(obj: _winrt.Object) -> PdfPageDimensions: ...

class PdfPageRenderOptions(_winrt.Object):
    source_rect: winsdk.windows.foundation.Rect
    is_ignoring_high_contrast: _winrt.Boolean
    destination_width: _winrt.UInt32
    destination_height: _winrt.UInt32
    bitmap_encoder_id: uuid.UUID
    background_color: winsdk.windows.ui.Color
    @staticmethod
    def _from(obj: _winrt.Object) -> PdfPageRenderOptions: ...
    @typing.overload
    def __init__(self) -> None: ...

