isUsingPDFRendering Property

Summary

Indicates that Client-side PDF rendering is being used by this document viewer instance.

Syntax
TypeScript
JavaScript
Object.defineProperty(DocumentViewer.prototype, 'isUsingPDFRendering', 
	get: function() 
) 
isUsingPDFRendering: boolean; // read-only 

Property Value

true if Client-side PDF rendering is being used by this document viewer instance; otherwise, false.

Remarks

IsUsingPDFRendering will be true when all the following conditions are met:

  • IsPDFRenderingSupported is true, indicating that the support JavaScript and resource files are set up correctly.

  • The value of UsePDFRendering is true (the default value), indicating that Client-side PDF rendering is to be used when applicable.

  • The LEADDocument object being viewed is PDF or contains any child documents that are PDF (the value of LEADDocument.MimeType is application/pdf).

When all conditions are met, the document viewer will create an instance of the internal PDF client-side renderer for each PDF document and use them to render the pages of PDF documents on the surface of the view and thumbnail parts, on demand, and as needed.

Using client-side PDF rendering may introduce a decrease in performance if the source PDF contains very large raster pages. The best way to obtain a smooth operation is to use the document service to decode these pages and return an image that follows the specifications set in DocumentImages.maximumImagePixelSize.

The value of maximumPDFRenderingRasterPagePixelSize is used to enable the behavior described above. This value is set to 0 by default, and client-side rendering is performed on all pages of a PDF regardless of its type or size. It is best to set maximumPDFRenderingRasterPagePixelSize to a value equal to DocumentImages.maximumImagePixelSize for the smoothest client-side rendering of PDF files.

Note that when document or child documents are removed, the document viewer will delete the internal PDF client-side renderer to save system resources, and try to re-create it (if applicable) the next time a document is set or child documents are added.

The internal PDF client-side renderer object instance for a document can be obtained through the GetPDFRenderingObject property.

Additionally, if IsUsingPDFRendering is true, UsePDFText can be set to true to retrieve text data directly from the rendered PDF, instead of requesting the data from a service.

Requirements

Target Platforms

Help Version 22.0.2023.4.18
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Document.Viewer Assembly
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.