# PdfViewer

Namespace: **Wisej.Web**

Assembly: **Wisej.Framework** (3.0.0.0)

* [Control](/api/v3.0/wisej.web/general/control.md)
  * [PdfViewer](/api/v3.0/wisej.web/content/pdfviewer.md)

Represents a [PdfViewer](/api/v3.0/wisej.web/content/pdfviewer.md) control that can display a pdf document in the browser either using the native pdf viewer, the pdf.js viewer, Google docs, or a custom viewer.

{% tabs %}
{% tab title="C#" %}

```csharp
public class PdfViewer : Control, IWisejHandler
```

{% endtab %}

{% tab title="VB.NET" %}

```visual-basic
Public Class PdfViewer
    Inherits Control
    Implements IWisejHandler
```

{% endtab %}
{% endtabs %}

## Constructors

### ![](/files/uCY6T77rh488FWHzpJ6P)PdfViewer()

Initializes a new instance of the [PdfViewer](/api/v3.0/wisej.web/content/pdfviewer.md) class.

## Properties

### ![](/files/uCY6T77rh488FWHzpJ6P)BorderStyle

[BorderStyle](/api/v3.0/wisej.web/enumerations/wisej.web.borderstyle.md): Indicates the border style for the control.

### ![](/files/uCY6T77rh488FWHzpJ6P)PdfSource

[String](https://docs.microsoft.com/en-us/dotnet/api/system.string): Returns or sets the pdf file name to display in the [PdfViewer](/api/v3.0/wisej.web/content/pdfviewer.md) control.

### ![](/files/uCY6T77rh488FWHzpJ6P)PdfStream

[Stream](https://docs.microsoft.com/en-us/dotnet/api/system.io.stream): Returns or sets the pdf stream to display in the [PdfViewer](/api/v3.0/wisej.web/content/pdfviewer.md) control.

### ![](/files/uCY6T77rh488FWHzpJ6P)ViewerType

[PdfViewerType](/api/v3.0/wisej.web/content/pdfviewer/wisej.web.pdfviewertype.md): Returns or sets the [PdfViewerType](/api/v3.0/wisej.web/content/pdfviewer/wisej.web.pdfviewertype.md) to use on the client.

### ![](/files/uCY6T77rh488FWHzpJ6P)ViewerURL

[String](https://docs.microsoft.com/en-us/dotnet/api/system.string): Returns or sets the URL of the viewer to use on the client when the value of [ViewerType](#viewertype) is set to [Custom](/api/v3.0/wisej.web/content/pdfviewer/wisej.web.pdfviewertype.md#fields).

## Events

### ![](/files/uCY6T77rh488FWHzpJ6P)PdfSourceChanged

[EventHandler](https://docs.microsoft.com/en-us/dotnet/api/system.eventhandler) Fired when the PdfSource property is changed.

## Implements

| Name                                                                                   | Description                                                                                                                |
| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
| [IBindableComponent](/api/v3.0/wisej.web/data-binding/wisej.web.ibindablecomponent.md) | Bindable components implement this interface.                                                                              |
| [IWisejComponent](/api/v3.0/wisej.core/interfaces/wisej.core.iwisejcomponent.md)       | All wisej components implement this interface.                                                                             |
| [IWisejControl](/api/v3.0/wisej.core/interfaces/wisej.core.iwisejcontrol.md)           | All wisej controls derived from the [Control](/api/v3.0/wisej.web/general/control.md) class must implement this interface. |
| [IWisejHandler](/api/v3.0/wisej.core/interfaces/wisej.core.iwisejhandler.md)           | Represents a Wisej component that is capable of handling postback requests from the client.                                |
| [IWisejSerializable](/api/v3.0/wisej.core/interfaces/wisej.core.iwisejserializable.md) | Allows an object to serialize itself.                                                                                      |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.wisej.com/api/v3.0/wisej.web/content/pdfviewer.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
