How can I help you?
Overview of Blazor PDF Viewer Component
12 Feb 20265 minutes to read
The Blazor SfPdfViewer component enables viewing, annotating, printing, and downloading PDF files in Blazor applications without requiring a separate server-side PDF service. It provides fast, responsive rendering and is straightforward to integrate into both Blazor Server and Blazor WebAssembly (WASM) applications.
SfPdfViewer delivers the core capabilities of the Blazor PDF Viewer component while adding client-side rendering, reduced server round-trips, and a unified cross-platform package. Key advantages are summarized below.
Performance Improvements
Rendering, scrolling, zooming, panning, and printing have been optimized for faster, smoother interaction and reduced latency.
Elimination of Service Dependency
The classic PDF Viewer required a separate service URL to load documents. SfPdfViewer can load documents directly in the browser (see the Blazor WebAssembly), enabling offline scenarios and reducing network overhead. Server-side hosting remains supported when required.
Common Package
Previously, separate NuGet packages were required for each operating system: Windows, Linux, and OSX. The Syncfusion.Blazor.SfPdfViewer package now provides a single, cross-platform distribution for all supported environments.
Reduced Server Calls
In the classic viewer, many C# service calls were required to retrieve page text, hyperlinks, and page images. SfPdfViewer performs these operations client-side where possible, decreasing round trips and improving responsiveness.
Some of the key features are listed below
- Accurate, reliable rendering of PDF pages.
- Easy page navigation with:
- Core interactions:
- Zooming and panning
- Text searching
- Text selection and copy
- Print PDF files.
- Annotate PDFs with:
- Highlight, underline, and strikethrough text markup
- Shape annotations: rectangle, circle, polygon, line, and arrow
- Stamp annotations: built-in and custom stamps
- Measurement annotations
- Free text annotations
- Redaction annotations
- Comments and sticky notes
- Form filling
- Form designer
- Handwritten signature
Supported Features: Desktop vs Mobile
The following table summarizes feature support on desktop and mobile devices.
| Feature | Desktop | Mobile devices |
|---|---|---|
| Keyboard interaction | Yes | No |
| Open file from a different origin | Yes | Yes |
| Save a file to a different origin | Yes | Yes |
| Toolbar | Yes | No |
| Mobile toolbar | No | Yes |
| Navigation toolbar | Yes | No |
| Page navigation | Yes | No |
| Magnification | Yes | Yes |
| Text search | Yes | Yes |
| Text selection | Yes | No |
| Pan mode | Yes | Yes |
| Handwritten signature | Yes | Yes |
| Annotation rendering | Yes | Yes |
| Annotation interaction | Yes | Yes |
| Annotation property editing | Yes | No |
| Add annotation through touch | Yes | No |
| Import/export annotation | Yes | Yes |
| Form fields rendering | Yes | Yes |
| Form Designer | Yes | Yes |
| Modern Navigation Panel | Yes | Yes |
| Organize Pages | Yes | Yes |
NOTE
Enable desktop mode on mobile devices using the EnableDesktopMode property to display the toolbar as on desktop.
NOTE
The
SfPdfViewercomponent is available for both Blazor Server and Blazor WebAssembly applications. Use theSfPdfViewercomponent from theSyncfusion.Blazor.SfPdfViewerNuGet package; server-side processing through a web service is not required to render PDF files in client scenarios. For platform-specific server packages, see the NuGet listings for Windows, Linux, and macOS.
NOTE
See the Blazor SfPdfViewer feature tour for a concise overview of capabilities and the Blazor SfPdfViewer demo to explore core features interactively.