# j-Printer

> The component can print a HTML content.

Framework: jcomponent20
Product: jComponent 20 (jcomponent@20)
Language: en
Content-SHA256: dcca4835afba10a25a5393a5e97ea76fe39ef5bac353372ad65a17b107c87299
Snapshot: c0700e321579725c5cf4f5ace1ad7d2866d1b4f93c24a63c0b41b6b7998e976c
Sources: components@910ed1a86f6e72b4f031d3ad0dc7844f9fc5cb8e
Review: not-recorded

The component can print a HTML content.

- singleton
__Configuration__:

- `delay {Number}` a delay for evaluating of printer (default: `500`)
- `delayprint {Number}` a delay for printing (default: `500`)
- `delayclose {Number}` a delay for closing window (default: `1000`)

__Methods__:

```js
// SETTER('printer/print', [title], html, test);

SETTER('printer/print', '<h1>Total.js Platform</h1>');

// Shows test window
SETTER('printer/print', '<h1>Total.js Platform</h1>', true);
```

Use it with `<ui-component name="printer">`. When the component is not loaded yet, jComponent downloads it on first use from the address in `DEF.fallback` (the Componentator CDN by default). Author: Peter Širka. Source: the Componentator components repository, MIT license.

```html example.html
<style>
	body { background-color: #D0D0D0; }
</style>

<ui-component name="printer"></ui-component>

<script>

	ON('ready', function() {
		SETTER('printer/print', '<h1>Total.js Platform</h1>');
	});

</script>
```
