Technical FAQs

Question

When viewing documents within the PrizmDoc Viewer using a particular browser, we are seeing garbage text. Viewing the same document with other browsers shows the text properly. What could be causing this to occur?

Answer

There are two possible causes for this in Internet Explorer 11 and you can check the settings below to potentially fix the issue:

In Internet Explorer 11 settings, ensure the Font Download option is enabled:

  1. Click on Internet Options.
  2. Select the Security Tab.
  3. Under Local Intranet zone, select Custom Level.
  4. Under Downloads, set Font download to Enabled.

Disable the “Turn off Data URI” support setting:

  1. Click Start, type gpedit.msc in the Start Search box, and then press Enter.
  2. In the navigation pane of the Local Group Policy Editor window, expand Computer Configuration > Administrative Templates > Windows Components > Internet Explorer > Security Features.
  3. In the right pane, double-click Turn Off Data URI support.
  4. Select Disable, click Apply, and then click OK.
  5. Go back to the navigation pane of the Local Group Policy Editor window, expand User Configuration > Administrative Templates > Windows Components > Internet Explorer > Security Features.
  6. Repeat steps 3 and step 4 above.

In Internet Explorer 11 settings, ensure Ignore font styles specified in webpages is not checked.

  1. Click on Internet Options.
  2. Select the General Tab.
  3. Click on Accessibility button.
  4. Un-check Ignore font styles specified in webpages.

In Chrome this is a bug that was found about 3 years ago and fixed in Chrome Canary, but not in Chrome Stable at the time:

https://productforums.google.com/forum/#!msg/chrome/rpmz56gnFKc/nPLtsbYZBwAJ

This may be why Chrome is having problems. Consider either updating Chrome Stable to the latest version or testing in Chrome Canary to see if that fixes the garbage character issues with that browser.


In Mozilla Firefox there is a setting you can enable which could resolve this problem in that browser:

  1. Go to Options/Preferences > General: Fonts & Colors > Advanced and select Allow pages to choose their own fonts (instead of My selections above).
Question

When trying to create a viewing session directory to the PrizmDoc back end over port 18681:

(POST http://prizmserver:18681/PCCIS/V1/ViewingSession)

why am I receiving a 500 internal server error?

Answer

There are some troubleshooting steps below you can take to verify the health of the server as well as ensure the API call you are making is properly formatted.

  1. Verify the Prizm service is healthy by opening a browser on the Prizm server and using the following service health check URL (http://localhost:18681/admin)
  2. Verify your POST command has all the required elements which can be verified in detail on the following documentation page:

https://help.accusoft.com/PrizmDoc/latest/HTML/webframe.html#viewing-sessions.html

Question

Does viewing HTML in PrizmDoc Viewer allow JavaScript execution or local file access? Can PrizmDoc Viewer block externally-referenced content from being rendered?

Answer

When viewing HTML in PrizmDoc, JavaScript and local file access are disabled.

Additionally, you may configure the security.htmlRendering.blockExternalContent setting found in PrizmDoc’s Central Configuration file. When rendering any source document which uses HTML content, this setting controls whether or not externally-referenced content, such as images and iframes, will be blocked. This option affects any source document file type which uses HTML, including HTML, EML, and MSG.

Question

When viewing documents using Internet Explorer 11, we are noticing an abnormally high CPU utilization. It gets worse when zooming in up to 800% through the PrizmDoc Viewer. It only seems to happen on certain machines. Why might this be happening?

Answer

A possible factor for this type of performance issue can potentially be corrected by enabling Internet Explorer’s hardware acceleration feature.

This feature can be enabled or disabled with the following steps:

  1. Open Internet Explorer 11, click on the Tools icon, and select Internet Options.
  2. Navigate to the Advanced tab and enable the Use software rendering instead of GPU rendering option.
  3. Click Apply and restart the browser.
Question

We are adding files to the viewing session with HttpWebRequests. We noticed with larger files the response is:

(413) Request Entity Too Large. -  at System.Net.HttpWebRequest.GetResponse(). 

What could be the cause?   

Answer

A 413 request entity too large error occurs when a request made from a client is too large to be processed by the web server. If your web server is setting a particular HTTP request size limit, clients may come across a 413 request entity too large response. An example request that may cause this error would be if a client was trying to upload a large file to the server (e.g., a large media file).

Depending on which web server you use, implement the necessary changes described below to configure your web server’s maximum HTTP request size allowance. Below are some suggestions for popular Web Servers:

For Nginx users:

The directive that determines the allowable HTTP request size is client_max_body_size. This directive can be defined in your nginx.conf file located at /etc/nginx/nginx.conf

For Apache users:

The directive is LimitRequestBody which can be defined in your http.conf file or in an .htaccess file.

For IIS users:

  1. Open Internet Information Services (IIS) Manager.
  2. In the Connections pane, go to the connection, site, application, or directory for which you want to modify your request filtering settings.
  3. In the Home pane, double-click Request Filtering.
  4. Click Edit Feature Settings in the Actions pane.

As part of its ongoing mission to serve the specialized needs of today’s largest enterprises, IBM offers multiple solutions for managing business content and a wide range of digital assets. The ECM family of services and solutions helps organizations capture, protect, activate, analyze, and engage with their content to generate better insights that can inform decisions. While many enterprises still deploy their ECM on-prem, IBM also offers the cloud-native FileNet Content Manager, which incorporates some of the company’s latest innovations in AI to derive more value from unstructured content.

Developers have plenty of options for viewing PDFs in their applications. With so many solutions to choose from, it’s easy to put off thinking about PDF support until much later in the development process. But doing so is often a recipe for trouble, resulting in ad hoc workarounds and settling for third-party plug-ins or native browser support that could impact application performance and security.

Directly embedding a web-based PDF viewer provides developers with much more flexibility and control over how their application manages and presents PDFs. By integrating a PDF JavaScript (PDF JS) viewer early in the development process, it’s easier to build a better user experience that doesn’t force users to take additional steps in order to interact with PDFs.

5 Benefits of an Embedded Web PDF Viewer

1. Consistent Viewing Experience

One of the original intentions of the PDF format was to ensure that documents would look the same no matter where or how they were being viewed. Unfortunately, not every viewer renders documents in the same way. More importantly, there are so many different ways of building a PDF that it can be difficult to know if it contains certain elements that are difficult for certain viewers to manage. This is typically the case with fonts and other formatting issues. While flattening the PDF can often address many of these issues, there are many instances where rasterizing the document robs it of valuable functionality (fillable form fields, for example).

By embedding a web PDF viewer directly into an application with a PDF JS integration, developers can ensure that users will always have a consistent viewing experience. Since the application will automatically open PDFs rather than handing the viewing task off to a browser plug-in or an external program on the user’s device, the document should render exactly as it was intended to look. This helps to avoid confusion and helps to enhance the user’s overall experience within the application.

2. Control Over Files

Organizations put a lot of time and resources into safeguarding confidential assets, but they can quickly undermine those efforts by failing to maintain control over their documents when sharing them. Many PDF viewing solutions allow or even require someone to download the document without having to obtain any special permissions. While this typically isn’t a major concern for public-facing documents, it could be disastrous for any shared PDFs that contain sensitive data or private information.

When developers use an embedded web PDF viewer, they allow document owners to maintain control over what people can and cannot do with shared PDFs. If they simply want someone to be able to view a document, but not edit it or download it, they can set the right permissions and restrictions to maintain control over the file. Embedding a PDF JS viewer is essential to this approach because it creates the conditions of the viewing experience.

3. Responsive Viewing

Today’s PDF viewing solutions need to account for what the viewing experience looks like on multiple screen sizes and devices. Not everyone will be reading a document on a conventional computer screen. They may want to view PDFs on a tablet or smartphone, both of which call for different viewing controls due to the nature of the device interface.

Without an embedded web PDF viewer, mobile users may not be able to readily access PDF-based content within an application. For customer facing solutions, this can seriously compromise the user experience. It’s also a major obstacle for organizations seeking to leverage an application to support a collaborative workplace. By integrating that viewing support, developers can ensure that users will be able to view PDF documents easily no matter what device they’re using.

4. No Dependencies

Many PDF viewing solutions offer extensive features, but at the cost of impacting application performance and security. That’s because they require cumbersome, memory-intensive plug-ins or complex server configurations. Even worse, they may be completely separate third-party solutions that require PDF files to be shared outside a developer’s secure application environment.

With the right PDF JS library, developers can easily integrate web PDF viewing capabilities directly into the browser without resorting to any external dependencies. Since JavaScript PDF viewers are so lightweight, they can be installed with a small amount of code that doesn’t have an impact on application performance. And since a PDF JS viewer can render PDFs within the solution, there’s no reason to risk exposing them to external software environments.

5. Easy Annotation and eSignature

Many organizations have understandably come to expect PDF viewers to come fully equipped with annotation tools that allow them to mark up files without having to transfer them to another program. They also frequently need the ability to sign documents as part of ongoing business dealings. For customer facing applications, these features are incredibly valuable because they streamline many processes for users. 

By embedding a web PDF viewer capable of supporting annotations and eSignatures, developers can quickly provide that functionality without having to build a new solution from scratch. Many annotation tools require complex backend server dependencies, so having those essential features integrated within a lightweight JavaScript PDF library can greatly improve web application performance.

Embed a Web PDF Viewer Today with Accusoft PDF Viewer

As a lightweight JavaScript PDF library, Accusoft PDF Viewer allows developers to add dynamic PDF support to their applications in a snap. While many PDF JS solutions require complicated coding to integrate properly, Accusoft PDF Viewer delivers PDF functionality to a web application with just ten lines of code.

See for yourself:

<div id="viewer">
</div> <script>
   (async () => {
     const pdfViewer = await window.Accusoft.PdfViewerControl.create({
       sourceDocument: 'https://MyURL.com/MyPDF.pdf',
       container: document.getElementById('viewer')
     });
   })();
 </script>

Accusoft PDF Viewer builds upon the versatility and reliability of the popular PDF.js open-source library, which serves as the foundation of many commercial PDF viewing solutions. From there, we used our extensive imaging technology expertise to push the boundaries in terms of rendering performance and usability. Optimized for speed and ease of use, the Standard Version of this JavaScript-based PDF viewer provides multiple benefits to developers looking to add robust viewing support without bogging down their development cycle:

  • Responsive UI: Easily view and interact with PDFs on any screen size thanks to optimized mobile controls.
  • Powerful Rendering: Smart rendering technology ensures that images remain crisp at all zoom levels.
  • Lightning-Fast Search: Get near-instant search results when trying to locate specific text, even when viewing large documents.
  • 100% Client-Side: With no server configurations or plug-ins, all viewing sessions remain entirely within a secure application environment.

For developers looking for expanding functionality, Accusoft PDF Viewer Professional version adds a number of important features:

  • UI Customization: Adjust the PDF viewer UI by adding or removing toolbar elements to create a better viewing experience.
  • Annotation: Markup PDF files with multiple annotation tools, then store or retrieve markups with an API.
  • eSignature: Create freehand signatures to sign documents on computers, tables, or smartphones.
  • White Labeling: Add customized branding to the viewer for a more consistent experience.

Accusoft PDF Viewer Standard Version can be downloaded today at no cost to quickly embed PDF features into any web-based application with just a few lines of code. When it’s time to add expanded functionality, we make it quick and easy to upgrade to Professional Version.

Check out the Accusoft PDF Viewer fact sheet for a detailed breakdown of the two versions. If you’re ready to get started, you can download Standard Version right now to try it for yourself.

Accusoft PDF Viewer builds upon the versatility and reliability of the popular PDF.js open-source library, which serves as the foundation of many commercial PDF viewing solutions. From there, we used our extensive imaging technology expertise to push the boundaries in terms of rendering performance and usability. Optimized for speed and ease of use, the Standard Version of this JavaScript-based PDF viewer provides multiple benefits to developers looking to add robust viewing support without bogging down their development cycle:

  • Responsive UI: Easily view and interact with PDFs on any screen size thanks to optimized mobile controls.
  • Powerful Rendering: Smart rendering technology ensures that images remain crisp at all zoom levels.
  • Lightning-Fast Search: Get near-instant search results when trying to locate specific text, even when viewing large documents.
  • 100% Client-Side: With no server configurations or plug-ins, all viewing sessions remain entirely within a secure application environment.

For developers looking for expanding functionality, Accusoft PDF Viewer Professional version adds a number of important features:

  • UI Customization: Adjust the PDF viewer UI by adding or removing toolbar elements to create a better viewing experience.
  • Annotation: Markup PDF files with multiple annotation tools, then store or retrieve markups with an API.
  • eSignature: Create freehand signatures to sign documents on computers, tables, or smartphones.
  • White Labeling: Add customized branding to the viewer for a more consistent experience.

Accusoft PDF Viewer Standard Version can be downloaded today at no cost to quickly embed PDF features into any web-based application with just a few lines of code. When it’s time to add expanded functionality, we make it quick and easy to upgrade to Professional Version.

Check out the Accusoft PDF Viewer fact sheet for a detailed breakdown of the two versions. If you’re ready to get started, you can download Standard Version right now to try it for yourself.

Question

We are trying to create new viewing packages, however, in the [prizmdoc_process] table we see the process is 100% complete. However, the error code field indicates an Internal Error.

The document does not display in the viewing session and gives a 480 error. The following error code is:

{errorCode: “ViewingPackageNotUsable”}

What might be the issue?

Answer

When creating viewing packages, the PrizmDoc Application Services (PAS) uses the PrizmDoc Server to do the conversion work. In order for the viewing package to be created successfully, the PrizmDoc Server needs to be licensed and healthy.

If you see an error “ViewingPackageNotUsable” this can be related to the PrizmDoc Server either not being healthy or specifically not being licensed.

To verify the PrizmDoc Server status and if it is licensed, you can run the following command on the PrizmDoc Server in a web browser:

http://localhost:18681/admin

Why Your Application Needs a Built-in PDF Reader

Managing and viewing documents is critical to providing a quality user experience in today’s applications. Without some way of controlling the presentation of digital files like PDFs, organizations put themselves in a situation where they must rely on external solutions that may not be responsive to their needs. PDF integration into their applications helps developers to maintain control over their documents while providing a more consistent viewing experience for users.

What Are Your PDF Reader Options?

Sharing and viewing PDFs online has become much easier with the development of HTML5 viewing technology and PDF.js-based software. For many years, the only way to view a PDF was to download a file and open it using a dedicated PDF reader application. Although many of these readers could be added to a web browser using a plug-in, this wasn’t always a reliable solution and inconsistent support for these extensions often created security risks.

After Mozilla introduced the PDF.js open-source library in 2011, integrated PDF viewing quickly became an essential feature for web browsers. Most users now simply take PDF viewing for granted, trusting that their browser will be able to open and read any file. For some organizations, relying on a browser PDF reader is a perfectly reasonable solution, especially if they don’t have any concerns over controlling the document viewing experience.

But for many developers building web applications, these browsers and external PDF readers put them at the mercy of third-party providers. Changes or security problems with these solutions can leave development teams scrambling to implement workarounds that could have been avoided if they had their own dedicated viewing solution. That’s why applications increasingly feature a built-in PDF reader that allows them to better manage and present important digital documents.

Why Your Application Needs a Built-in PDF Reader

The core problem with relying on an external viewing solution comes down to control. In order to view a PDF in a dedicated reader, the file needs to be downloaded. Once that document is removed from a secure application, it could easily be distributed or altered without any authorization or oversight. This often results in serious version confusion that leaves everyone wondering which version of a PDF is the most up-to-date. By keeping documents within a controlled application, developers can ensure that the files viewed there are current.

Relying on external PDF viewers can also create an inconsistent user experience. Since not all viewers render documents, in the same way, it’s impossible to control what someone will see when they open a given PDF. In some cases, that could result in wrong fonts being displayed or some image layers failing to render properly. But it may also prevent someone from even viewing a file at all. For example, browser-based viewers that use the base PDF.js library without making any improvements to it often struggle to render lengthy or complex files. 

When applications incorporate a built-in PDF reader, developers can ensure that every document viewed within that solution will look the same on every device (and that it will open in the first place!). This level of control is incredibly important for organizations looking to build a frictionless and compelling user experience.

Integrating a PDF Reader

By incorporating a PDF reader into their web-based applications, developers are able to both retain full control over the viewing experience and keep files within a protected environment. When users are interacting with the application, all PDF viewing can be handled by the built-in viewer rather than handed off to external software. This makes it easier to manage access effectively and limits the number of downloads. 

Since every user will be viewing documents through the same built-in PDF reader, developers can also craft a consistent experience across multiple platforms. With more and more people accessing their applications with mobile devices, it’s important for development teams to offer responsive viewing solutions that can accommodate various screen sizes and interfaces.

In order to maintain complete control over files and deliver better performance, a built-in PDF reader should be able to operate as an entirely client-side solution. Whether it’s running within an on-premises technology stack or as part of an application’s cloud deployment, a PDF viewer without any complicated dependencies never has to worry about connecting to a third-party service to facilitate viewing. 

But why stop at PDF viewing?

PDF Editing

Often users need the ability to view as well as collaborate on their PDF documents, and providing the ability to edit those documents presents a challenge for developers. In a recent survey conducted amongst developers, there appears to be a disconnect between the PDF editing features that are available in most applications, to what developers actually need to fulfill and enhance their applications. So what’s the solution? 

Third-party Integrated PDF Viewing and Editing

A PDF solution provider has already worked out the challenges associated with viewing and editing PDF documents within an application. They’ve also devoted their resources to improving their document capabilities and expanding features to offer greater flexibility.

A good third-party provider also offers extensive support during and after the implementation process. If the developer needs to add a new PDF-related capability to their application or if they encounter a problem, they can quickly resolve the issue by working with their provider rather than wasting valuable resources trying to identify and fix the problem themselves. That combination of expertise and service means that developers can spend more time focusing on their application’s unique features rather than continuously wrestling with PDF-related challenges.

Enhance Your Application with PDF Integrations from Accusoft

With more than three decades of experience managing documents and images, Accusoft has been building innovative PDF solutions since the format was first introduced. Whether you need to add flexible front-end viewing and editing features to your application or are looking to add powerful programmatic PDF capabilities into the back end of your software, we provide a wide range of PDF solutions that address multiple development needs.

To learn more about how Accusoft can solve your PDF document management challenges, talk to one of our PDF specialists today and find the integration that works best for your software project.

 

PrizmDoc Viewer HTML5

Adding viewing and document conversion capabilities to an application can be a daunting task, especially when a development team is facing resource constraints and a tight schedule. That’s why many developers turn to API-based viewing integrations like Accusoft PrizmDoc Viewer instead of building those features from the ground up. By leveraging the versatile power of HTML5 viewing, they can quickly expand software capabilities without having to rethink the basic framework of their products.

What’s Under the Hood of PrizmDoc Viewer?

To understand how PrizmDoc Viewer goes about rendering documents in a web application, it’s helpful to take a closer look at its underlying architecture. There are two primary components that work in concert with the application’s web server: the HTML5 viewer and the backend.

The HTML5 viewer is integrated to run in the browser, typically via a web page or portal that serves as the front-facing aspect of the application. This is where document content is rendered as SVG elements. Since the viewer uses HTML5 to display content, it isn’t dependent upon any specific word processing software or imaging program.

Most of the heavy lifting is handled by the PrizmDoc Viewer backend, which consists of the PrizmDoc Server and PrizmDoc Application Services (PAS). PrizmDoc Server is the core computing component. It performs the actual conversion process to convert document pages to SVG, but it doesn’t have any permanent storage. Converted content and annotation markups are instead stored in PAS. The PAS component primarily handles long-term storage and hands files off to the server for conversion or processing. 

Critically, PAS also has privileged access to other storage locations used by the application, such as file systems or databases. This allows it to easily retrieve source documents and hand off tasks to the server.

The Role of the Web Application

The web application server sits between the HTML5 viewer component and the backend component. It functions as a reverse proxy that relays requests between the two, passing content requests from the viewer to the backend and then delivering converted SVG content from the backend to the viewer.

PrizmDoc Viewer doesn’t actually work with the source documents in the application’s storage. They remain safely unaltered while the backend generates a converted version for viewing and annotation. The web application typically only makes REST API calls to PAS. Background conversion that doesn’t involve the viewer, however, can be performed by making a direct call to PrizmDoc Server.

Making the HTML5 Magic Happen: Viewing a Document

When the web application has to open a stored document for viewing, each component of PrizmDoc Viewer plays a special role in the process. Everything begins with the web application sending a request to PAS to create a new viewing session. How this session is created depends upon how the backend is deployed. In most cases, it will be self-hosted as part of an on-premises deployment or through PrizmDoc Cloud services.

Once that session is created, PAS generates a new viewing session ID and passes it back to the application. All of this happens before any conversion or viewing begins, but the application can begin rendering to the HTML5 viewer by configuring it to use the viewing session ID. This brings up the viewing UI immediately, which will ultimately save time as the document is prepared.

The web application then uploads a copy of the source document to PAS, which can be in any number of formats supported by PrizmDoc Viewer. As soon as PAS receives the document, it begins handing off pages to PrizmDoc Server for conversion to SVG. Since pages are converted one at a time, PrizmDoc Viewer is able to open and view documents in the browser before the entire file is converted. That means less time is spent waiting around for large documents to be prepared for viewing.

As soon as the HTML5 viewer loads in the browser, it begins proxying requests to PAS through the web application for the first pages of content. Once the converted SVG content is available, PAS hands it back to the web application, which then passes it along to the HTML5 viewer, which displays that content in the browser. Additional pages are delivered as they’re ready, and the viewer may make subsequent requests as the user continues to interact with the document.

While the viewing process involves several steps, it is typically performed so quickly that the end user doesn’t experience any significant delays. Larger documents may take more time to render as SVG content, but even in these cases, PrizmDoc Server’s ability to render and deliver each page to the HTML5 viewer as it becomes available allows users to begin viewing documents within their browser right away.

Enhance Application Viewing Performance with PrizmDoc Viewer

As an API-based HTML5 viewing solution, PrizmDoc Viewer can be integrated into most web-based applications to support a broad range of file formats. Developers can use its annotation, redaction, document comparison, and conversion capabilities to deliver a full range of document management tools within their software platforms rather than having to build them from scratch.

To see how PrizmDoc Viewer will function in your application environment, sign up for a free evaluation trial. We provide ready-to-run Docker images in addition to installers for Windows and Linux.