Introducing the Next-Gen Blazor PDF Viewer Component
Live Chat Icon For mobile
Live Chat Icon
Popular Categories.NET  (179).NET Core  (29).NET MAUI  (214)Angular  (110)ASP.NET  (51)ASP.NET Core  (83)ASP.NET MVC  (90)Azure  (41)Black Friday Deal  (1)Blazor  (226)BoldSign  (15)DocIO  (24)Essential JS 2  (109)Essential Studio  (200)File Formats  (68)Flutter  (133)JavaScript  (226)Microsoft  (120)PDF  (81)Python  (1)React  (105)Streamlit  (1)Succinctly series  (131)Syncfusion  (942)TypeScript  (33)Uno Platform  (3)UWP  (4)Vue  (45)Webinar  (52)Windows Forms  (61)WinUI  (71)WPF  (163)Xamarin  (161)XlsIO  (38)Other CategoriesBarcode  (5)BI  (29)Bold BI  (8)Bold Reports  (2)Build conference  (9)Business intelligence  (55)Button  (4)C#  (157)Chart  (140)Chart of the week  (54)Cloud  (15)Company  (443)Dashboard  (8)Data Science  (3)Data Validation  (8)DataGrid  (70)Development  (658)Doc  (8)DockingManager  (1)eBook  (99)Enterprise  (22)Entity Framework  (7)Essential Tools  (14)Excel  (43)Extensions  (22)File Manager  (7)Gantt  (19)Gauge  (12)Git  (5)Grid  (31)HTML  (13)Installer  (2)Knockout  (2)Language  (1)LINQPad  (1)Linux  (2)M-Commerce  (1)Metro Studio  (11)Mobile  (512)Mobile MVC  (9)OLAP server  (1)Open source  (1)Orubase  (12)Partners  (21)PDF viewer  (43)Performance  (12)PHP  (2)PivotGrid  (4)Predictive Analytics  (6)Report Server  (3)Reporting  (10)Reporting / Back Office  (11)Rich Text Editor  (12)Road Map  (12)Scheduler  (54)Security  (4)SfDataGrid  (9)Silverlight  (21)Sneak Peek  (31)Solution Services  (4)Spreadsheet  (11)SQL  (14)Stock Chart  (1)Surface  (4)Tablets  (5)Theme  (12)Tips and Tricks  (112)UI  (393)Uncategorized  (68)Unix  (2)User interface  (68)Visual State Manager  (2)Visual Studio  (31)Visual Studio Code  (19)Web  (614)What's new  (333)Windows 8  (19)Windows App  (2)Windows Phone  (15)Windows Phone 7  (9)WinRT  (26)
Introducing the Next-Gen Blazor PDF Viewer Component

Introducing the Next-Gen Blazor PDF Viewer Component

In our 2023 Volume 2 release, we have introduced a next-gen Blazor PDF Viewer component that allows users to view, edit, print, and download PDF files without the web service dependency in Blazor applications. It is designed to be fast and responsive and supports all the features of the previous PDF Viewer.

In this blog, we will discuss the improvements that distinguish the next-gen Blazor PDF Viewer component from its predecessor, PDF Viewer.

Next-Gen Blazor PDF Viewer Component
Next-Gen Blazor PDF Viewer Component

Advantages of the next-gen Blazor PDF Viewer

Let’s briefly discuss the advantages of the next-gen Blazor PDF Viewer over the previous one:

  • Enhanced performance and memory: The next-gen PDF Viewer uses the WebAssembly version of PDFium, reduces JS interop calls, and performs better. Also, it consumes less memory for both server and WebAssembly apps.
  • Unified package for multiple platforms: A unified NuGet package supports various operating systems, including Windows, Linux, and MacOS, eliminating the need for separate packages.
  • No more web service dependency in Blazor WebAssembly: Web service dependency is no longer required in Blazor WebAssembly apps. This means you can deploy the new PDF Viewer to any platform that supports Blazor without worrying about setting and maintaining a web service.
  • ARM64 support: This new Blazor PDF Viewer can also be deployed to ARM64 machines.

Performance improvements

In the previous PDF Viewer component, we used Pdfium.dll to acquire PDF document pages as images. The next-gen PDF Viewer component uses the WebAssembly version of PDFium. This change allows the new PDF Viewer to directly retrieve PDF images, text, and hyperlinks on the client side.

By adopting this approach, we have significantly reduced the need for JavaScript interop calls and alleviated the burden on the server. Thus we have observed notable enhancements in the performance of rendering, scrolling, zooming, panning, and printing operations.

To assess the improvements, we compared the speed of various operations between the old PDF Viewer and both server and WebAssembly instances of the next-gen PDF Viewer.

Action

Speed improvements in the next-gen Blazor PDF Viewer

 

Server

WebAssembly

Initial loading

~+ 104%

~+ 413%

Page navigation

~+ 92%

~+ 19%

Zooming

~+ 170%

~+ 277%

Panning and scrolling

~+ 146%

~+ 217%

Printing

~+ 142%

~+ 706%

Here is the PDF document we used to measure the performance improvements.

We are focusing on further enhancing the performance of our next-gen PDF Viewer in upcoming releases.

Reduced JS interop calls

The previous PDF Viewer heavily relied on multiple JS interop calls to obtain essential document information, such as page text, hyperlinks, and images. Unfortunately, this approach often led to longer processing times and significant performance overhead.

In the next-gen PDF Viewer, we have entirely redesigned these functionalities to be executed on the client side. By leveraging client-side processing, we have achieved major performance improvements. This approach reduces server-side interactions and enables faster retrieval of document information.

The transition to client-side processing has delivered several benefits. One of the most important benefits is minimized JS interop calls to retrieve document information. Additional benefits include reduced server dependencies and improved UI responsiveness.

Reduced memory consumption

As mentioned previously, the old PDF Viewer component used Pdfium.dll, which runs on the server, for managing images, hyperlinks, and text while viewing a PDF file. This approach put a heavy load on the server and consumed significant memory.

Since the next-gen PDF Viewer component uses the WebAssembly version of PDFium that runs on the client side, the server load is reduced remarkably. In fact, we have observed an impressive 57% reduction in memory consumption. This significant improvement in performance and memory delivers a smoother and more efficient experience for end users.

Unified package for multiple platforms

In the previous PDF Viewer component, we maintained separate packages for each operating system, namely Windows, Linux, and MacOS. This required including specific PDFium dependencies in the published folder, which caused confusion and complications for developers during the hosting process in multiple environments.

Wielding the WebAssembly version of PDFium, the next-gen PDF Viewer component does not require separate packages for each operating system. The single common package is compatible with all environments. The former hosting complexities are resolved, making the hosting process smoother and more consistent, regardless of the operating system used.

ARM64 support

WebAssembly PDFium also means that the next-gen PDF Viewer can be deployed to ARM64 machines. This means developers can create Blazor apps capable of viewing PDF files on all Blazor-supported devices.

Migrate to the next-gen Blazor PDF Viewer

If you use the previous PDF Viewer, we recommend migrating to the next-gen Blazor PDF Viewer component.

References

For more details, refer to the new Blazor PDF Viewer component user guide, web demos, and GitHub repository.

Conclusion

Thanks for reading! In this blog, we had a quick overview of the enhanced performance, streamlined development, and improved deployment of the next-gen Blazor PDF Viewer component in the 2023 Volume 2 release. Keep an eye out for our upcoming updates and tutorials, where we will guide you on harnessing the capabilities of this innovative component in your apps.

The new Blazor PDF Viewer is a powerful and versatile tool for viewing, annotating, and printing PDF documents. It has all the features of the previous PDF Viewer and is easy to migrate to.

You can also check out all the other updates in the 2023 Volume 2 release on our Release Notes and the What’s New pages.

Try out these features and share your feedback in the comment section below. You can also reach us through our support forumssupport portal, or feedback portal. We are always happy to assist you!

Related blogs

Tags:

Share this post:

Popular Now

Be the first to get updates

Subscribe RSS feed

Be the first to get updates

Subscribe RSS feed