Checks if client-side PDF rendering is supported by the current platform.
Object.defineProperty(DocumentViewer.prototype, 'isPDFRenderingSupported',
get: function()
)
static isPDFRenderingSupported: boolean; // read-only
true if client-side PDF rendering is supported by this document viewer instance; otherwise, false.
This property will be true if the client-side PDF rendering javascript files and resources have been set up correctly in the HTML page. Refer to Files to be Included with your Application.
Note that client-side PDF rendering is not supported in Desktop Internet Explorer 9 or any mobile versions of Internet Explorer.
Client-side PDF rendering uses a customized and highly optimized version of the popular Mozilla PDF.js library. Refer to https://mozilla.github.io/pdf.js/ for more information.
The user-application must set up the library prior to use as follows:
Assume that index.html
is the HTML page using the document viewer that resides in the root folder of the application.
Also, assume that libs
is the name of the folder under the root holding 3rd party js files.
Copy the pdfjs
folder described in the topic above to and put it inside libs
. That way, the application will contain libs/pdfjs/lt.pdf.js
, libs/pdfjs/lt.pdf.worker.js
, libs/pdfjs/lt.pdf.compatibility.js
, and the data files libs/pdfjs/cmaps/*.bcmap
.
Add the following declaration in the head
section of the HTML page:
// main pdf.js library
<script type="text/javascript" src="libs/pdfjs/lt.pdf.js"></script>
<script>
// Point PDFJS in the direction of the worker file
if (typeof PDFJS !== "undefined") {
PDFJS.workerSrc = "libs/pdfjs/lt.pdf.worker.js";
// cmap URL is relative to the PDF Rendering location
// ensure your server hosts cmap files (.bcmap)
PDFJS.cMapUrl = "libs/pdfjs/cmaps";
PDFJS.cMapPacked = true;
}
</script>
<script type="text/javascript" src="libs/pdfjs/lt.pdf.compatibility.js"></script>
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document