useViewportLayout Property

Summary

Indicates whether each page should map to a separate printed page.

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

Property Value

If false (the default), each provided page will become its own printed page. If true, printing will act like a screenshot of the provided pages.

Remarks

Usually, a user will want to print each page of the document on its own printed page (ignoring instances where page image data must be printed over onto the next page).

However, in some instances a user may wish to print the pages of the document in their given layout on-screen (configured by ImageViewer.ViewLayout); if UseViewportLayout is true, the printed pages will be maintain their positioning relative to one another. This means, for instance, that a two-column layout of four pages will generate a two-by-two printed grid that, when fit to the printing page, will fit all four pages into one printed page. Since the relative positioning of pages is taken into account, all page image data will be available in a single HTMLImageElement at DocumentPrintData.ViewportImage.

In essence, UseViewportLayout will take an unclipped screenshot of the given pages from PagesList and fit them to the printed page surface with the other options, including with the page rotation.

When used together with ViewportClip, DocumentViewer.Print can create a screenshot of the visible screen area.

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.

History

19.0.0.54
Added

Requirements

Target Platforms

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

Leadtools.Document.Viewer Assembly