MaximumPDFRenderingRasterPagePixelSize Property


Maximum width or height of PDF raster pages to be considered for client-side rendering.

Object.defineProperty(DocumentViewer.prototype, 'maximumPDFRenderingRasterPagePixelSize', 
	get: function(), 
	set: function(value) 
maximumPDFRenderingRasterPagePixelSize: number; 

Property Value

The maximum width or height of PDF raster pages to be considered for client-side rendering. The default value is 0.


The default value of 0 means there is no maximum value and all pages of a PDF document will be rendered using client-side.

Using client-side PDF rendering can introduce a decrease in performance if the source PDF contains very large raster-only pages. For a smooth operation, use the document service to decode such pages and return an image that follows the specifications set in DocumentImages.maximumImagePixelSize.

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.

Assuming the rest of the PDF client-side rendering is enabled (refer to isUsingPDFRendering) and a PDF document has been loaded, the viewer will check for the following conditions before rendering a page:

  • If document service is available and enabled.

  • If the PDF document is saved in the cache (The value of DocumentPage.dataType is not DocumentDataType.virtual).

  • If the value of maximumPDFRenderingRasterPagePixelSize is greater than 0.

  • If the PDF page is a raster image (or image-over-text).

  • If the width or height of this image is greater than maximumPDFRenderingRasterPagePixelSize.

When all of these conditions are met, the viewer will not render the page using client-side rendering. Instead, it will invoke a service to return the data for this page using GetImageElement.


Target Platforms

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

Leadtools.Document.Viewer Assembly