
## IDocumentLoadingCallback class

Implement this interface if you want to have your own custom method called during loading a document.


### Methods

| Name | Description |
| --- | --- |
|[ notify(args)](./notify/#documentloadingargs) | This is called to notify of document loading progress. |

### Examples

Shows how to notify the user if document loading exceeded expected loading time (LoadingProgressCallback).

```python
class LoadingProgressCallback(aw.loading.IDocumentLoadingCallback):

    def __init__(self):
        self.max_duration = 0.5
        self.m_loading_started_at = datetime.datetime.now()

    def notify(self, args):
        canceled_at = datetime.datetime.now()
        elapsed_seconds = (canceled_at - m_loading_started_at).total_seconds
        if elapsed_seconds > self.max_duration:
            raise Exception()
```

### See Also

* module [aspose.words.loading](../)

