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

# CreateLayoutFromStream Method of the Engine Object

This method creates the [Layout](/fine-reader/engine/api-reference/layout-related-objects/layout) object from the input stream implemented by the user. This input stream is represented by the read-only array of bytes.

## Syntax

### C++

```cpp theme={null}
HRESULT CreateLayoutFromStream(
  IReadStream*      ReadStream,
  ILayout**         Result
);
```

### C\#

```csharp theme={null}
ILayout CreateLayoutFromStream(
  IReadStream        ReadStream
);
```

### Visual Basic .NET

```vb theme={null}
Function CreateLayoutFromStream( _
  ReadStream As IReadStream _
) As ILayout
```

## Parameters

ReadStream

\[in] Refers to the interface of the user-implemented object of the type [IReadStream](/fine-reader/engine/api-reference/supplementary-objects-and-methods/ireadstream) which contains the document layout to be read.

Result

\[out, retval] A pointer to ILayout\* pointer variable that receives the interface pointer of the resulting [Layout](/fine-reader/engine/api-reference/layout-related-objects/layout) object. Must not be NULL.

## Return values

This method has no specific return values. It returns the [standard return values of ABBYY FineReader Engine functions](/fine-reader/engine/api-reference/return-codes).

## Remarks

For Linux, this method does not work if the Engine object is loaded as an out-of-process server.

## See also

[Engine](/fine-reader/engine/api-reference/engine-object-iengine-interface)

[Layout](/fine-reader/engine/api-reference/layout-related-objects/layout)
