Migration from PDF Viewer to PDF Viewer (NextGen)
20 Jun 20233 minutes to read
Why PDF Viewer to PDF Viewer (NextGen) control
-
Migration to PDF Viewer (NextGen) control offers enhanced performance in scrolling, pagination, and printing. These operations will now be smoother and more efficient, providing a better user experience.
-
Eliminates the need for a Web assembly service dependency. This consolidation reduces complexity and improves maintainability.
SfPdfViewer control is now available as a unified package for Windows, Mac, and Linux platforms. This means that users can easily -
Install and use the software regardless of their operating system. The unified package simplifies distribution and deployment, making it more convenient for users to access and utilize the software on different platforms.
Nuget Package
To initialize the PDF Viewer (NextGen) component, need to add the following project references to your project
PDF Viewer |
---|
|
PDF Viewer (NextGen) |
|
Script File
To utilize the PDF Viewer (NextGen) component in your project, need to add the corresponding script file to the Host.cshtml or Layout.cshtml file based on your framework version.
NOTE
The script file is same for
Server application
andWeb assembly application
for PDF Viewer (NextGen) component
PDF Viewer |
---|
|
PDF Viewer (NextGen) |
|
Program.cs
Add the following line to the Program.cs file to use the PDF Viewer (NextGen) component
PDF Viewer |
---|
|
PDF Viewer (NextGen) |
|
Index.razor
To render the PDF Viewer (NextGen) component, add the following code in the Index.razor file.
PDF Viewer |
---|
|
PDF Viewer (NextGen) |
|
Project.cs
When using the PDF Viewer (NextGen) in a WebAssembly application, need to include the following lines in your .csproj file to ensure proper functionality and compatibility
PDF Viewer(NextGen) |
|
</tr>
---|