Unlock the Power of Direct PDF Editing with WebViewer 10.7

How to Upgrade from Universal WebViewer to Client-Side WebViewer

By Andrey Safonov | 2022 Feb 17

Sanity Image
Read time

4 min

WebViewer opens PDFs and other file formats directly from the file storage without the need for server-side conversion to any intermediate formats, like XOD format, which only offers viewing. PDF, in contrast, offers form filling, redaction, page manipulation, and more.

Universal WebViewer was first released in 2010 and consisted of a server-side component that would convert PDFs to XOD and send them up to the client, where XOD would be rendered to the user. XOD format is Apryse’s proprietary format that added an additional security layer and allowed streaming of XOD documents to the client. Streaming here means that the user did not have to wait for the whole document to load but instead could see the loaded pages right away instead of in tens of seconds, minutes, or more.

WebViewer’s first implementation was released in 2015, removing the need for server-side processing or conversion. Today, WebViewer out-of-the-box can handle PDFs, MS Office, images, websites, videos, and 3D models directly inside the browser. In this blog, we will walk you through how to upgrade from Universal WebViewer to WebViewer and uncover the advantages that it will bring.

WebViewer Advantages

Copied to clipboard

1. Expanded, Serverless PDF Capabilities

WebViewer opens PDFs and other file formats directly from the file storage without the need for server-side conversion to any intermediate formats, like XOD format, which only offers viewing. PDF offers form filling, redaction, and page manipulation, and we continue to extend our SDK so PDF supports even more functionality (for example, recently adding in-browser editing). The file is then loaded in the browser’s memory, allowing direct manipulation like page splitting, merging, applying digital signatures, or redactions on the document by modifying the document in memory. After manipulations are complete, the file can be sent back to the file storage.

This approach eliminates the need for server-side infrastructure, significantly reducing infrastructure maintenance costs and providing a more stable experience for the user. We no longer need to worry about scalability, conversion queues or stickiness, and save on storage, as content is no longer duplicated. Eliminating an additional trip to the server, we also improve the security of our overall application, where the document file is safely manipulated directly on the client’s machine.

2. Fast Web View of PDFs

Just like XOD, PDF offers linearization or streaming of the document. Think of it as a YouTube video; you don’t have to wait for the whole video to load but instead can watch it while the rest of it is buffering. Linearization of PDFs can be done at any stage of file processing. For example, once the user uploads the document, we can linearize it client-side and send it to our s3 bucket on AWS or store it on Azure, GCP, or any other storage. Another strategy is to employ server-side processing and process all existing PDFs in a batch job.

If you’re running a mission-critical application, where the load time means the difference between life and death, like, for example, loading a patient’s intake form in an emergency department, then you should lean towards PDF Viewer Optimized format. Unlike XOD, a viewer optimized PDF file is still a PDF at the end of the day, making it more interoperable with other viewers. But like XOD, Viewer Optimized borrows the same principles of PDF linearization. It then adds a high res thumbnail for each page. Users can see pages display via these thumbnails in under two seconds regardless of document complexity. Learn more by reading our Viewer Optimized guide.

3. Secure

If you’re still on the fence about moving away from XOD, Apryse’s WebViewer offers standard PDF encryption as well as custom security handlers that allow you to implement an additional layer of encryption. PDF linearization breaks the document up into thousands of byte chunks that speeds up the loading and presents pages to the user sooner. However, if we have a bad actor trying to intercept or download those chunks and put them back in order, they would be unable to do so because they are coming in asynchronously and if one of the byte chunks is out of place, the whole document will be corrupted. You can also encrypt each individual chunk for further peace of mind.

In recent years, as the browsers are getting stronger and IE is finally deprecated, the need for XOD is reduced. Not to worry though, if you are still using XOD, you can continue doing so, though you won’t get all the new features like editing that are available for the PDF format in WebViewer's latest versions.

How to Upgrade WebViewer

Copied to clipboard

Upgrading WebViewer takes only a few steps. Ensure you have the latest version by doing one of the following:

  1. Install the latest WebViewer, or
  2. Update to the latest version by running:
npm update @pdftron/webviewer

or in yarn

yarn upgrade @pdftron/webviewer

When updating an existing implementation (option 2), you will want to visit our changelog to review for any breaking changes that might impact you. To streamline your move, we offer a migration guide for those coming from WebViewer versions 5, 6, or 7.

Comment out any logic responsible for server-side conversion, and pass the files directly to WebViewer, and it will handle the rest client side.

Wrap up

Copied to clipboard

That’s it! Let us know if you need any help by creating a post on community.pdftron.com or by emailing our support team, who would be happy to lend a hand.

Sanity Image

Andrey Safonov

Director of Product

LinkedIn link

Share this post

email
linkedIn
twitter