# pdf-viewer-multi-format-viewer

> PDF viewer opening files converted from several source formats for convenient in-browser review.

**Framework:** blazor  **Component:** PdfViewer  **Variant:** multi-format-viewer

## Get this item

**If you are an agent, fetch the JSON.** Source is inlined, so one request is enough and no tooling is required:

```
GET https://ai.syncfusion.com/r/blazor/pdf-viewer-multi-format-viewer.json
```

**Install Package(s)**

```bash
dotnet add package Syncfusion.Blazor.SfPdfViewer
```

**Notes**

- Syncfusion release: 2026 Volume 3 (v35.1.37)
- The Syncfusion package is licensed. The composition in this file is source you own and edit. See https://ai.syncfusion.com/licensing.md

## Source files

### src/components/pdf-viewer-multi-format-viewer/PdfViewer.razor

```razor
@page "/pdf-viewer/multi-format-viewer"
@namespace blazor.Components.Pages.MultiFormatViewer.MultiFormatViewer
@using Syncfusion.Blazor.Buttons
@using Syncfusion.Blazor.Inputs
@using Syncfusion.Blazor.SfPdfViewer

<div class="control-section" aria-label="Multi format PDF viewer">
    <div id="dropArea" style="margin-bottom: 15px;">
        <SfButton @onclick="BrowseClick" Disabled="true">Browse...</SfButton>
        <p style="margin: 15px">OR</p>
        <span id="drop">Drop files (Word, Excel, PowerPoint, Image, PDF)</span>
    </div>
    <SfUploader @ref="Uploader" AutoUpload="false" AllowedFileTypes="@AllowedTypes"></SfUploader>
    <div id="pdfviewer-container" style="display: none;">
        <SfPdfViewer2 Height="640px" Width="100%" DocumentPath="@DocumentPath"></SfPdfViewer2>
    </div>
</div>

@code {
    private SfUploader? Uploader { get; set; }
    private string DocumentPath { get; set; } = string.Empty;
    private readonly string[] AllowedTypes = { ".doc", ".docx", ".rtf", ".xls", ".xlsx", ".pptx", ".jpeg", ".png", ".bmp", ".pdf", ".jpg" };

    private void BrowseClick()
    {
        // The uploader renders its own browse button; this hook is kept for
        // applications that want to trigger the dialog programmatically.
    }
}

```
