-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
41 lines (35 loc) · 1.01 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<!DOCTYPE html>
<html>
<head>
<script src="jquery_3.3.1_jquery.min.js"></script>
<script>
function imprimirViaSistemaOperacional(url_arquivo, dados) {
var tela_impressao = window.open('about:blank');
$.ajax({
url: url_arquivo,
type: "POST",
dataType: "html",
data: dados,
beforeSend: function() {
//tb_show('', "images/loaders/loading.gif");
}
})
.done(function(html) {
tela_impressao.document.write(html);
tela_impressao.print();
tela_impressao.window.close();
return;
})
.always(function() {
tb_remove();
});
}
</script>
</head>
<body>
<div id="demo">
<h1>Impressora</h1>
<button type="button" onclick="imprimirViaSistemaOperacional('arquivo.html', null)">Imprimir</button>
</div>
</body>
</html>