viewportClip Property

Summary

Indicates that only parts of the document in the given viewport rectangle should be rendered for printing.

Syntax
TypeScript
JavaScript
Object.defineProperty(PrintDocumentOptions.prototype, 'viewportClip', 
	get: function(), 
	set: function(value) 
) 
viewportClip: LeadRectD; 

Property Value

A LeadRectD indicating the viewport rectangle to clip the printing area to. The default value is LeadRectD.Empty, indicating no clip should be made.

Remarks

ViewportClip allows the user to specify a section of the viewport to be printed. The LeadRectD used is relative to the DocumentViewerView.ImageViewer.

To take a screenshot of the page (printing the document with the given zoom level, position, rotation, and visible area), ViewportClip should be set to a LeadRectD starting at 0,0 and with a size equal to ImageViewer.ControlSize from the DocumentViewerView.ImageViewer. This would indicate to DocumentViewer.Print that only the sections of the page images that are visible in this area should be printed.

Additionally, to create a screenshot UseViewportLayout should be true. Keeping UseViewportLayout to false while setting a value for ViewportClip will continue to print each document page on a separate printed page.

When ViewportClip is not LeadRectD.Empty or UseViewportLayout is true, DocumentPrintData.ViewportSize will be set to the DocumentViewerView.ImageViewer's ImageViewer.ControlSize for reference.

For more information, refer to DocumentViewer.Print.

Requirements

Target Platforms

Help Version 23.0.2024.2.29
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 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.