Description​
Opens a popup window with the rendered music notation for printing. The default display of alphaTab in the browser is not very suitable for printing. The items are lazy loaded, the width can be dynamic, and the scale might be better suitable for screens. This function opens a popup window which is filled with a by-default A4 optimized view of the rendered score:
- Lazy loading is disabled
- The scale is reduced to 0.8
- The stretch force is reduced to 0.8
- The width is optimized to A4. Portrait if the page-layout is used, landscape if the horizontal-layout is used.
Signatures​
function print()JavaScript |
function print(width)JavaScript |
function print(width, additionalSettings)JavaScript |
alphaTab('print')jQuery |
alphaTab('print', width, additionalSettings)jQuery |
Parameters​
Parameters | Type | Summary |
---|---|---|
widthJavaScript & jQuery | string | An optional custom width as CSS width that should be used. Best is to use a CSS width that is suitable for your preferred page size. |
additionalSettingsJavaScript & jQuery | object | An optional parameter to specify additional setting values which should be respected during printing. since 1.2.0-alpha.79 |
Returns​
Nothing
Examples​
- JavaScript
- jQuery
const api = new alphaTab.AlphaTabApi(document.querySelector('#alphaTab'));
api.print();
api.print(undefined, { display: { barsPerRow: 5 } });
$('#alphaTab').alphaTab('print');