# Quick Start

## Content



This quick start will guide you through the steps of adding FlexViewer control to the application, binding it with a document source, i.e., GcPdf, and loading the PDF in the FlexViewer control.


> type=note
> Note: To use GcPdf as the document source for your application, you need to install GcPdf NuGet package to add the GcPdf references to your application.

To achieve it, follow these steps:

1.  [Add FlexViewer control](/componentone/docs/xamarin/online-ios/controls/flexvieweroverview/flexviewerquickstart#step-1-add-flexviewer-control)
2.  [Load the PDF document](/componentone/docs/xamarin/online-ios/controls/flexvieweroverview/flexviewerquickstart#step-2-load-the-pdf-document)
3.  [Run the Project](/componentone/docs/xamarin/online-ios/controls/flexvieweroverview/flexviewerquickstart#step-3-run-the-project)

The following image shows how the FlexViewer control appears after completing the steps above.

![](https://cdn.mescius.io/document-site-files/images/1398d806-ac3c-4763-a9b3-2c7a2f5b49fb/images/flexviewer.png)

### Step 1: Add FlexViewer control

1.  In the **Solution Explorer**, click **Main.storyboard** to open the storyboard editor.
2.  From the **Toolbox** under **Custom Components** tab, drag a FlexViewer onto the **ViewController**.
3.  In the **Properties** window, set the Name of the FlexViewer control. In this example, we named it as flexViewer.

### Step 2: Load the PDF document

Load the PDF document in the FlexViewer control using the following code. In this example, we have added a PDF document to the Data folder to load it in the viewer.

```csharp
string path = "Data/DefaultDocument.pdf";
MemoryStream ms = new MemoryStream();
{
    using (FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read))
    {
        byte[] bytes = new byte[fs.Length];
        fs.Read(bytes, 0, (int)fs.Length);
        ms.Write(bytes, 0, (int)fs.Length);
        flexViewer.LoadDocument(ms);
    }
}
```

### Step 3: Run the Project

Press **F5** to run the application.