> ## Documentation Index
> Fetch the complete documentation index at: https://docs.superoffice.com/llms.txt
> Use this file to discover all available pages before exploring further.

# NSDocumentPreview

> Document data intended for preview purposes. Carrier object for DocumentPreview.

Document data intended for preview purposes. Carrier object for DocumentPreview.

## Constructors

### NSDocumentPreview()

```crmscript theme={null}
NSDocumentPreview
```

Initializes a new instance of the NSDocumentPreview class.

## Methods

## GetName()

```crmscript theme={null}
String GetName()
```

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - The documents name.

**Example:**

```crmscript theme={null}
NSDocumentPreview thing;
String name = thing.GetName();
```

## GetSize()

```crmscript theme={null}
Integer GetSize()
```

**Returns:** [CRMScript.Global.Integer](CRMScript.Global.Integer) - Size of the stream.

**Example:**

```crmscript theme={null}
NSDocumentPreview thing;
Integer size = thing.GetSize();
```

## GetStream()

```crmscript theme={null}
NSStream GetStream()
```

**Returns:** [CRMScript.NetServer.NSStream](CRMScript.NetServer.NSStream) - Document data.

**Example:**

```crmscript theme={null}
NSDocumentPreview thing;
NSStream stream = thing.GetStream();
```

## GetType()

```crmscript theme={null}
String GetType()
```

**Returns:** [CRMScript.Global.String](CRMScript.Global.String) - The mimetype of the stream.

**Example:**

```crmscript theme={null}
NSDocumentPreview thing;
String type = thing.GetType();
```

## SetName(String)

```crmscript theme={null}
Void SetName(String name)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSDocumentPreview thing;
String name;
thing.SetName(name);
```

## SetSize(Integer)

```crmscript theme={null}
Void SetSize(Integer size)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSDocumentPreview thing;
Integer size;
thing.SetSize(size);
```

## SetStream(NSStream)

```crmscript theme={null}
Void SetStream(NSStream stream)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSDocumentPreview thing;
NSStream stream;
thing.SetStream(stream);
```

## SetType(String)

```crmscript theme={null}
Void SetType(String type)
```

**Returns:** [CRMScript.Global.Void](CRMScript.Global.Void)

**Example:**

```crmscript theme={null}
NSDocumentPreview thing;
String type;
thing.SetType(type);
```


## Related topics

- [NSDocumentAgent](/en/automation/crmscript/reference/CRMScript.NetServer.NSDocumentAgent.md)
- [Namespace CRMScript.NetServer](/en/automation/crmscript/reference/CRMScript.NetServer.md)
- [Documents](/en/mobile/document/index.md)
- [Create Default Document Preview](/en/api/reference/restful/agent/document_agent/create-default-document-preview.md)
- [Get Preview Document Stream](/en/api/reference/restful/agent/document_agent/get-preview-document-stream.md)
- [Get Unsanitized Preview Document Stream](/en/api/reference/restful/agent/document_agent/get-unsanitized-preview-document-stream.md)
