forked from qzind/tray
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sample.html
executable file
·3121 lines (2760 loc) · 155 KB
/
sample.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<html>
<head>
<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
<title>QZ Tray Sample Page</title>
</head>
<!-- Required scripts -->
<script type="text/javascript" src="js/qz-tray.js"></script>
<!-- Pollyfills -->
<script type="text/javascript" src="js/sample/promise-polyfill-8.1.3.min.js"></script>
<script type="text/javascript" src="js/sample/whatwg-fetch-3.0.0.min.js"></script>
<!-- Page styling -->
<script type="text/javascript" src="js/sample/jquery-1.11.3.min.js"></script>
<script type="text/javascript" src="js/sample/bootstrap.min.js"></script>
<link rel="stylesheet" href="css/font-awesome.min.css" />
<link rel="stylesheet" href="css/bootstrap.min.css" />
<link rel="stylesheet" href="css/style.css" />
<body id="qz-page" role="document">
<nav class="navbar navbar-default navbar-static-top" role="navigation">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand" href="https://qz.io/"><span class="fa fa-print"></span> qz.</a>
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<!-- cheap way to avoid reimplementing the php menu -->
<li><a href="#">Demo Mode</a></li>
<li><a href="https://qz.io/api/" target="_docs">API</a></li>
</ul>
</div>
</div>
</nav>
<div id="qz-alert" style="position: fixed; width: 60%; margin: 0 4% 0 36%; z-index: 900;"></div>
<div id="qz-pin" style="position: fixed; width: 30%; margin: 0 66% 0 4%; z-index: 900;"></div>
<div class="container" role="main">
<div class="row">
<h1 id="title" class="page-header">QZ Tray v<span id="qz-version">0</span></h1>
</div>
<div class="row spread">
<div class="col-md-4">
<div id="qz-connection" class="panel panel-default">
<div class="panel-heading">
<button class="close tip" data-toggle="tooltip" title="Launch QZ" id="launch" href="#" onclick="launchQZ();" style="display: none;">
<i class="fa fa-external-link"></i>
</button>
<h3 class="panel-title">
Connection: <span id="qz-status" class="text-muted" style="font-weight: bold;">Unknown</span>
</h3>
</div>
<div class="panel-body">
<div class="btn-toolbar">
<div class="btn-group" role="group">
<button type="button" class="btn btn-success" onclick="startConnection();">Connect</button>
<button id="toggleConnectionGroup" type="button" class="btn btn-success"
onclick="checkGroupActive('toggleConnectionGroup', 'connectionGroup'); $('#connectionHost').select();"
data-toggle="tooltip" data-placement="bottom" title="Connect to QZ Tray running on a print server"><span class="fa fa-caret-down"></span> </button>
<button type="button" class="btn btn-warning" onclick="endConnection();">Disconnect</button>
</div>
<button type="button" class="btn btn-info" onclick="listNetworkDevices();">Network Info</button>
</div>
<div class="form-group" id="connectionGroup">
<hr>
<label for="connectionHost">Connect to host:</label>
<input type="text" id="connectionHost" value="localhost" class="form-control" />
<div class="form-group form-inline">
<label for="connectionUsingSecure" data-toggle="tooltip" title="HTTPS Only: When disabled, allows secure pages to connect to insecure locations.">
Secure
</label>
<input checked type="checkbox" id="connectionUsingSecure" class="pull-right"/>
</div>
</div>
</div>
</div>
<hr />
<div class="panel panel-primary">
<div class="panel-heading">
<h3 class="panel-title">Printer</h3>
</div>
<div class="panel-body">
<div class="form-group">
<label for="printerSearch">Search:</label>
<input type="text" id="printerSearch" value="zebra" class="form-control" />
</div>
<div class="form-group">
<div class="btn-group" role="group">
<button type="button" class="btn btn-default btn-sm" onclick="findPrinter($('#printerSearch').val(), true);">Find Printer</button>
<button type="button" class="btn btn-default btn-sm" onclick="findDefaultPrinter(true);">Find Default Printer</button>
<button type="button" class="btn btn-default btn-sm" onclick="findPrinters();">Find All Printers</button>
</div>
<div class="btn-group" role="group">
<button type="button" class="btn btn-default btn-sm" onclick="detailPrinters();">Get Printer Details</button>
</div>
</div>
<hr />
<div class="form-group">
<label>Current printer:</label>
<div id="configPrinter">NONE</div>
</div>
<div class="form-group">
<div class="btn-group" role="group">
<button type="button" class="btn btn-default btn-sm" onclick="setPrinter($('#printerSearch').val());">Set To Search</button>
<button type="button" class="btn btn-default btn-sm" data-toggle="modal" data-target="#askFileModal">Set To File</button>
<button type="button" class="btn btn-default btn-sm" data-toggle="modal" data-target="#askHostModal">Set To Host</button>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-8">
<ul class="nav nav-tabs" role="tablist">
<li id="rawTab" role="presentation" class="active"><a href="#rawContent" role="tab" data-toggle="tab">Raw Printing</a></li>
<li id="pxlTab" role="presentation"><a href="#pxlContent" role="tab" data-toggle="tab">Pixel Printing</a></li>
<li id="serialTab" role="presentation"><a href="#serialContent" role="tab" data-toggle="tab">Serial</a></li>
<li id="socketTab" role="presentation"><a href="#socketContent" role="tab" data-toggle="tab">Socket</a></li>
<li id="usbTab" role="presentation"><a href="#usbContent" role="tab" data-toggle="tab">USB</a></li>
<li id="hidTab" role="presentation"><a href="#hidContent" role="tab" data-toggle="tab">HID</a></li>
<li id="statusTab" role="presentation"><a href="#statusContent" role="tab" data-toggle="tab">Printer Status</a></li>
<li id="fileTab" role="presentation"><a href="#fileContent" role="tab" data-toggle="tab">Files</a></li>
</ul>
</div>
<div class="tab-content">
<div id="rawContent" class="tab-pane active col-md-8">
<h3>Raw Printing</h3>
<div class="row">
<div class="col-md-12">
<a href="https://qz.io/wiki/What-is-Raw-Printing" target="new">What is Raw Printing?</a>
<span style="float: right;">
<a href="javascript:findPrinter('Zebra', true, 'ZPL');">Zebra</a> |
<a href="javascript:findPrinter('ZDesigner', true, 'ZPL');">ZDesigner</a> |
<a href="javascript:findPrinter('SATO', true, 'SBPL');">SATO</a> |
<a href="javascript:findPrinter('Epson', true, 'ESCPOS');">Epson</a> |
<a href="javascript:findPrinter('Citizen', true, 'ESCPOS');">Citizen</a> |
<a href="javascript:findPrinter('Star', true, 'ESCPOS');">Star</a>
</span>
</div>
</div>
<hr />
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label>Language</label>
<div>
<label>
<input type="radio" name="pLanguage" id="pLangEPL" value="EPL" />
EPL2
</label>
<label>
<input type="radio" name="pLanguage" id="pLangZPL" value="ZPL" />
ZPLII
</label>
<br />
<label>
<input type="radio" name="pLanguage" id="pLangESCPOS" value="ESCPOS" />
ESC/POS
</label>
<label>
<input type="radio" name="pLanguage" id="pLangEPCL" value="EPCL" />
EPCL
</label>
<label>
<input type="radio" name="pLanguage" id="pLangEVOLIS" value="EVOLIS" />
Evolis
</label>
<label>
<input type="radio" name="pLanguage" id="pLangSBPL" value="SBPL" />
SBPL
</label>
</div>
</div>
<div class="form-group">
<div>
<label>Print From File</label>
</div>
<div class="btn-group">
<button type="button" class="btn btn-default" onclick="printFile('zpl_sample.txt');">zpl_sample.txt</button>
<button type="button" class="btn btn-default" onclick="printFile('fgl_sample.txt');">fgl_sample.txt</button>
<button type="button" class="btn btn-default" onclick="printFile('epl_sample.txt');">epl_sample.txt</button>
<button type="button" class="btn btn-default" onclick="printFile('sbpl_sample.txt');">sbpl_sample.txt</button>
</div>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<div>
<label>Print Data</label>
</div>
<div class="btn-group">
<button type="button" class="btn btn-default" onclick="printCommand();">Commands</button>
<button type="button" class="btn btn-default" onclick="printBase64();">Base64</button>
<button type="button" class="btn btn-default" onclick="printXML();">XML</button>
<button type="button" class="btn btn-default" onclick="printHex();">Hex</button>
</div>
</div>
<div class="form-group">
<div>
<label>Raster Print</label>
</div>
<div class="btn-group">
<button type="button" class="btn btn-default" onclick="printRawImage();">Image</button>
<button type="button" class="btn btn-default" onclick="printRawPDF();">PDF</button>
<button type="button" class="btn btn-default" onclick="printRawHTML();">HTML</button>
</div>
</div>
</div>
</div>
<div class="row" style="margin-top: 1em;">
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-body">
<fieldset>
<legend>Config Options</legend>
<div class="row">
<div class="col-md-6">
<div class="form-group form-inline">
<label for="rawEncoding">Encoding</label>
<input type="text" id="rawEncoding" class="form-control pull-right" />
</div>
<div class="form-group form-inline">
<label for="rawSpoolEnd">End Of Doc</label>
<input type="text" id="rawSpoolEnd" class="form-control pull-right" />
</div>
<div class="form-group form-inline">
<label for="rawPerSpool">Per Spool</label>
<input type="number" id="rawPerSpool" class="form-control pull-right" />
</div>
</div>
<div class="col-md-6">
<div class="form-group form-inline">
<label class="tip" for="rawAltPrinting" data-toggle="tooltip" title="Bypass driver when using CUPS">
Alternate Printing
</label>
<input type="checkbox" id="rawAltPrinting" class="pull-right" />
</div>
<div class="form-group form-inline">
<label for="rawCopies">Copies</label>
<input type="number" id="rawCopies" class="form-control pull-right" />
</div>
<div class="form-group form-inline">
<label class="tip" for="rawJobName" data-toggle="tooltip" title="Job title as it appears in print queue">
Job Name
</label>
<input type="text" id="rawJobName" class="form-control pull-right" />
</div>
</div>
</div>
</fieldset>
<hr />
<fieldset>
<legend>Printer Options</legend>
<div class="row">
<div class="col-md-6">
<div class="form-group form-inline">
<label for="pX">Image X</label>
<input type="number" id="pX" class="form-control pull-right" />
</div>
<div class="form-group form-inline">
<label for="pY">Image Y</label>
<input type="number" id="pY" class="form-control pull-right" />
</div>
</div>
<div class="col-md-6">
<div class="form-group form-inline">
<label class="tip" for="pDotDensity" data-toggle="tooltip" title="For ESCPOS only">Dot Density</label>
<input type="text" id="pDotDensity" class="form-control pull-right" />
</div>
<div class="form-group form-inline">
<label for="pXml">XML Tag</label>
<input type="text" id="pXml" class="form-control pull-right" />
</div>
<div class="form-group form-inline">
<label for="pRawWidth" class="tip" data-toggle="tooltip" title="In pixels">Render Width</label>
<input type="number" id="pRawWidth" class="form-control pull-right" />
</div>
<div class="form-group form-inline">
<label for="pRawHeight" class="tip" data-toggle="tooltip" title="In pixels">Render Height</label>
<input type="number" id="pRawHeight" class="form-control pull-right" />
</div>
</div>
</div>
</fieldset>
<hr />
<div class="row">
<div class="col-md-12">
<button type="button" class="btn btn-danger pull-right" onclick="resetRawOptions();">Reset</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div id="pxlContent" class="tab-pane col-md-8">
<h3>Pixel Printing</h3>
<div class="row">
<div class="col-md-12">
<a href="https://qz.io/wiki/2.0-pixel-printing" target="new">What is Pixel Printing?</a>
<span style="float: right;">
<a href="javascript:findPrinter('XPS', true);">Microsoft XPS</a> |
<a href="javascript:findPrinter('PDF', true);">PDF</a>
</span>
</div>
</div>
<hr />
<div class="row">
<div class="col-md-12">
<div class="form-group">
<button type="button" class="btn btn-default" onclick="printHTML();">Print HTML</button>
<button type="button" class="btn btn-default" onclick="printPDF();">Print PDF</button>
<button type="button" class="btn btn-default" onclick="printImage();">Print Image</button>
</div>
</div>
</div>
<div class="row" style="margin-top: 1em;">
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-body">
<fieldset>
<legend>Config Options</legend>
<div class="row">
<div class="col-md-6">
<div class="form-group form-inline">
<label for="pxlColorType">Color Type</label>
<select id="pxlColorType" class="form-control pull-right">
<option value="color">Color</option>
<option value="grayscale">Grayscale</option>
<option value="blackwhite">Black & White</option>
</select>
</div>
<div class="form-group form-inline">
<label for="pxlCopies">Copies</label>
<input type="number" id="pxlCopies" class="form-control pull-right" />
</div>
<div class="form-group form-inline">
<label for="pxlDuplex"> Duplex</label>
<select id="pxlDuplex" class="form-control pull-right">
<option value="">Single Sided</option>
<option value="duplex">Double Sided</option>
<option value="long-edge">Two Sided (Long Edge)</option>
<option value="short-edge">Two Sided (Short Edge)</option>
<option value="tumble">Tumble</option>
</select>
</div>
<div class="form-group form-inline">
<label for="pxlInterpolation">Interpolation</label>
<select id="pxlInterpolation" class="form-control pull-right">
<option value="">Default</option>
<option value="bicubic">Bicubic</option>
<option value="bilinear">Bilinear</option>
<option value="nearest-neighbor">Nearest Neighbor</option>
</select>
</div>
<div class="form-group form-inline">
<label class="tip" for="pxlJobName" data-toggle="tooltip" title="Job title as it appears in print queue">
Job Name
</label>
<input type="text" id="pxlJobName" class="form-control pull-right" />
</div>
<div class="form-group form-inline">
<label for="pxlLegacy">Legacy Printing</label>
<input type="checkbox" id="pxlLegacy" class="pull-right" />
</div>
<div class="form-group form-inline">
<label for="pxlOrientation">Orientation</label>
<select id="pxlOrientation" class="form-control pull-right">
<option value="">Default</option>
<option value="portrait">Portrait</option>
<option value="landscape">Landscape</option>
<option value="reverse-landscape">Landscape - Reverse</option>
</select>
</div>
<div class="form-group form-inline">
<label for="pxlPaperThickness">Paper<br />Thickness</label>
<input disabled type="number" step="any" id="pxlPaperThickness" class="form-control pull-right" />
</div>
<div class="form-group form-inline">
<label for="pxlPrinterTray">Printer Tray</label>
<input type="text" id="pxlPrinterTray" class="form-control pull-right" />
</div>
<div class="form-group form-inline">
<label for="pxlRasterize">Rasterize</label>
<input type="checkbox" id="pxlRasterize" class="pull-right" />
</div>
<div class="form-group form-inline">
<label for="pxlRotation">Rotation</label>
<input type="number" step="any" id="pxlRotation" class="form-control pull-right" />
</div>
<div class="form-group form-inline">
<label for="pxlSpoolSize">Per Spool</label>
<input type="number" id="pxlSpoolSize" class="form-control pull-right" />
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label for="pxlDensity" class="tip" data-toggle="tooltip"
title="DPI, DPCM, or DPMM depending on units specified">Density</label>
(
<label for="pxlDensityAsymm" class="inline">Asymmetric:</label>
<input type="checkbox" id="pxlDensityAsymm" onclick="checkGroupActive('pxlDensityAsymm', 'pxlDensityGroup', 'pxlDensity');">
)
<input id="pxlDensity" class="form-control" />
</div>
<div class="inline" id="pxlDensityGroup">
<div class="form-group form-inline">
<label for="pxlCrossDensity"> Cross:</label>
<input type="number" id="pxlCrossDensity" class="form-control pull-right" />
</div>
<div class="form-group form-inline">
<label for="pxlFeedDensity"> Feed:</label>
<input type="number" id="pxlFeedDensity" class="form-control pull-right" />
</div>
</div>
<div class="form-group">
<label>Units</label>
<div>
<label>
<input type="radio" name="pxlUnits" id="pxlUnitsIN" value="in" />
IN
</label>
<label>
<input type="radio" name="pxlUnits" id="pxlUnitsMM" value="mm" />
MM
</label>
<label>
<input type="radio" name="pxlUnits" id="pxlUnitsCM" value="cm" />
CM
</label>
</div>
</div>
<div class="form-group form-inline">
<label for="pxlScale">Scale Content:</label>
<input type="checkbox" id="pxlScale" class="pull-right" />
</div>
<div class="form-group">
<label for="pxlMargins" class="tip" data-toggle="tooltip" title="In relation to units specified">Margins</label>
(
<label for="pxlMarginsActive" class="inline">Individual:</label>
<input type="checkbox" id="pxlMarginsActive" onclick="checkGroupActive('pxlMarginsActive', 'pxlMarginsGroup', 'pxlMargins');">
)
<input type="number" step="any" id="pxlMargins" class="form-control" />
</div>
<div class="inline" id="pxlMarginsGroup">
<div class="form-group form-inline">
<label for="pxlMarginsTop"> Top:</label>
<input type="number" step="any" id="pxlMarginsTop" class="form-control pull-right" />
</div>
<div class="form-group form-inline">
<label for="pxlMarginsRight"> Right:</label>
<input type="number" step="any" id="pxlMarginsRight" class="form-control pull-right" />
</div>
<div class="form-group form-inline">
<label for="pxlMarginsBottom"> Bottom:</label>
<input type="number" step="any" id="pxlMarginsBottom" class="form-control pull-right" />
</div>
<div class="form-group form-inline">
<label for="pxlMarginsLeft"> Left:</label>
<input type="number" step="any" id="pxlMarginsLeft" class="form-control pull-right" />
</div>
</div>
<div class="form-group">
<label class="inline">Size</label>
(
<label for="pxlSizeActive" class="inline">Enable:</label>
<input type="checkbox" id="pxlSizeActive" onclick="checkGroupActive('pxlSizeActive', 'pxlSizeGroup');" />
)
</div>
<div class="inline" id="pxlSizeGroup">
<div class="form-group form-inline">
<label for="pxlSizeWidth" class="tip" data-toggle="tooltip" title="In relation to units specified">
Width:
</label>
<input type="number" step="any" id="pxlSizeWidth" class="form-control pull-right" />
</div>
<div class="form-group form-inline">
<label for="pxlSizeHeight" class="tip" data-toggle="tooltip" title="In relation to units specified">
Height:
</label>
<input type="number" step="any" id="pxlSizeHeight" class="form-control pull-right" />
</div>
</div>
<div class="form-group">
<label class="inline">Bounds</label>
(
<label for="pxlBoundsActive" class="inline">Enable:</label>
<input type="checkbox" id="pxlBoundsActive" onclick="checkGroupActive('pxlBoundsActive', 'pxlBoundsGroup');" />
)
</div>
<div class="inline" id="pxlBoundsGroup">
<div class="form-group form-inline">
<label for="pxlBoundX" class="tip" data-toggle="tooltip" title="In relation to units specified">
X:
</label>
<input type="number" step="any" id="pxlBoundX" class="form-control pull-right" />
</div>
<div class="form-group form-inline">
<label for="pxlBoundY" class="tip" data-toggle="tooltip" title="In relation to units specified">
Y:
</label>
<input type="number" step="any" id="pxlBoundY" class="form-control pull-right" />
</div>
<div class="form-group form-inline">
<label for="pxlBoundWidth" class="tip" data-toggle="tooltip" title="In relation to units specified">
Width:
</label>
<input type="number" step="any" id="pxlBoundWidth" class="form-control pull-right" />
</div>
<div class="form-group form-inline">
<label for="pxlBoundHeight" class="tip" data-toggle="tooltip" title="In relation to units specified">
Height:
</label>
<input type="number" step="any" id="pxlBoundHeight" class="form-control pull-right" />
</div>
</div>
</div>
</div>
</fieldset>
<hr />
<fieldset>
<legend>Printer Options</legend>
<div class="row">
<div class="col-md-6">
<div class="form-group form-inline">
<label for="pPxlWidth" class="tip" data-toggle="tooltip" title="In relation to units specified">
Render Width
</label>
<input type="number" id="pPxlWidth" class="form-control pull-right" />
</div>
</div>
<div class="col-md-6">
<div class="form-group form-inline">
<label for="pPxlHeight" class="tip" data-toggle="tooltip" title="In relation to units specified">
Render Height
</label>
<input type="number" id="pPxlHeight" class="form-control pull-right" />
</div>
</div>
</div>
</fieldset>
<hr />
<div class="row">
<div class="col-md-12">
<button type="button" class="btn btn-danger pull-right" onclick="resetPixelOptions();">Reset</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div id="serialContent" class="tab-pane col-md-8">
<h3>Serial</h3>
<hr />
<div class="row">
<div class="col-md-12">
<div class="btn-toolbar">
<button type="button" class="btn btn-info" onclick="listSerialPorts();">List Ports</button>
<div class="btn-group">
<button type="button" class="btn btn-success" onclick="openSerialPort();">Open Port</button>
<button type="button" class="btn btn-warning" onclick="closeSerialPort();">Close Port</button>
</div>
<button type="button" class="btn btn-default" onclick="sendSerialData();">Send Command</button>
</div>
</div>
</div>
<div class="row" style="margin-top: 1em;">
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-body">
<fieldset>
<legend>Options</legend>
<div class="row">
<div class="col-md-6">
<div class="form-group form-inline">
<label for="serialPort">Port</label>
<input type="text" id="serialPort" class="form-control pull-right" />
</div>
<div class="form-group form-inline">
<label for="serialBaud">Baud Rate</label>
<input type="number" id="serialBaud" class="form-control pull-right" />
</div>
<div class="form-group form-inline">
<label for="serialData">Data Bits</label>
<input type="number" id="serialData" class="form-control pull-right" />
</div>
<div class="form-group form-inline">
<label for="serialStop">Stop Bits</label>
<input type="number" id="serialStop" class="form-control pull-right" />
</div>
<div class="form-group form-inline">
<label for="serialParity">Parity</label>
<input type="text" id="serialParity" class="form-control pull-right" />
</div>
<div class="form-group form-inline">
<label for="serialFlow">Flow Control</label>
<input type="text" id="serialFlow" class="form-control pull-right" />
</div>
</div>
<div class="col-md-6">
<div class="form-group form-inline">
<label for="serialCmd">Data</label>
<input type="text" id="serialCmd" class="form-control pull-right" />
</div>
<div class="form-group form-inline">
<label>Data Type</label>
<div class="pull-right">
<label>
<input type="radio" name="serialType" id="serialPlainRadio" value="PLAIN"/>
Plain
</label>
<label>
<input type="radio" name="serialType" id="serialFileRadio" value="FILE"/>
File
</label>
</div>
</div>
<div class="form-group form-inline">
<label for="serialWidth">Encoding</label>
<input type="text" id="serialEncoding" class="form-control pull-right" />
</div>
</div>
</div>
</fieldset>
<hr/>
<fieldset>
<legend>Response Options</legend>
<div class="row">
<div class="col-md-6">
<div class="form-group form-inline">
<label for="serialStart">Start Bytes</label>
<input type="text" id="serialStart" class="form-control pull-right" />
</div>
<div class="form-group form-inline">
<label for="serialEnd">End Byte</label>
<input type="text" id="serialEnd" class="form-control pull-right" />
</div>
<div class="form-group form-inline">
<label for="serialWidth">Width</label>
<input type="number" id="serialWidth" class="form-control pull-right" />
</div>
<div class="form-group form-inline">
<label for="serialHeader">Include Header</label>
<input type="checkbox" id="serialHeader" class="form-control pull-right" />
</div>
<div class="form-group form-inline">
<label for="serialRespEncoding">Encoding</label>
<input type="text" id="serialRespEncoding" class="form-control pull-right" />
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label for="serialNewline" class="inline">Wait for new line</label>
<input type="checkbox" id="serialNewline" onclick="checkItemsDisabled('serialNewline', [ 'serialStart', 'serialEnd', 'serialWidth', 'serialHeader' ]);" />
</div>
<div class="form-group">
<label class="inline">Length Bytes</label>
(
<label for="serialLengthActive" class="inline">Enable:</label>
<input type="checkbox" id="serialLengthActive" onclick="checkGroupActive('serialLengthActive', 'serialLengthGroup');" />
)
</div>
<div class="inline" id="serialLengthGroup">
<div class="form-group form-inline">
<label for="serialLenIndex"> Index:</label>
<input type="number" id="serialLenIndex" class="form-control pull-right" />
</div>
<div class="form-group form-inline">
<label for="serialLenLength"> Length:</label>
<input type="number" id="serialLenLength" class="form-control pull-right" />
</div>
<div class="form-group form-inline">
<label> Endian:</label>
<div class="pull-right">
<label>
<input type="radio" name="serialLenEndian" id="serialLenEndianBig" value="BIG" />
Big
</label>
<label>
<input type="radio" name="serialLenEndian" id="serialLenEndianLittle" value="LITTLE" />
Little
</label>
</div>
</div>
</div>
<div class="form-group">
<label class="inline">CRC Bytes</label>
(
<label for="serialCrcActive" class="inline">Enable:</label>
<input type="checkbox" id="serialCrcActive" onclick="checkGroupActive('serialCrcActive', 'serialCrcGroup');" />
)
</div>
<div class="inline" id="serialCrcGroup">
<div class="form-group form-inline">
<label for="serialCrcIndex"> Index:</label>
<input type="number" id="serialCrcIndex" class="form-control pull-right" />
</div>
<div class="form-group form-inline">
<label for="serialCrcLength"> Length:</label>
<input type="number" id="serialCrcLength" class="form-control pull-right" />
</div>
</div>
</div>
</div>
</fieldset>
<hr />
<div class="row">
<div class="col-md-12">
<button type="button" class="btn btn-danger pull-right" onclick="resetSerialOptions();">Reset</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div id="socketContent" class="tab-pane col-md-8">
<h3>Socket</h3>
<p>Socket API is experimental; API subject to change.</p>
<hr />
<div class="row">
<div class="col-md-12">
<div class="form-group">
<div class="btn-toolbar">
<div class="btn-group">
<button type="button" class="btn btn-success" onclick="openSocket();">Open Socket</button>
<button type="button" class="btn btn-warning" onclick="closeSocket();">Close Socket</button>
</div>
<button type="button" class="btn btn-default" onclick="sendSocketData()">Send Data</button>
</div>
</div>
</div>
</div>
<div class="row" style="margin-top: 1em;">
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-body">
<fieldset>
<legend>Options</legend>
<div class="row">
<div class="col-md-6">
<div class="form-group form-inline">
<label for="socketHost">Host</label>
<input type="text" id="socketHost" class="form-control pull-right" />
</div>
<div class="form-group form-inline">
<label for="socketPort">Port</label>
<input type="number" id="socketPort" class="form-control pull-right" />
</div>
</div>
<div class="col-md-6">
<div class="form-group form-inline">
<label for="socketData">Data</label>
<input type="text" id="socketData" class="form-control pull-right" />
</div>
</div>
</div>
</fieldset>
</div>
</div>
</div>
</div>
</div>
<div id="usbContent" class="tab-pane col-md-8">
<h3>USB</h3>
<hr />
<div class="row">
<div class="col-md-12">
<div class="form-group">
<div class="btn-toolbar">
<div class="btn-group">
<button type="button" class="btn btn-info" onclick="listUsbDevices();">List Devices</button>
<button type="button" class="btn btn-info" onclick="listUsbDeviceInterfaces();">List Interfaces</button>
<button type="button" class="btn btn-info" onclick="listUsbInterfaceEndpoints();">List Endpoints</button>
</div>
<div class="btn-group">
<button type="button" class="btn btn-info" onclick="checkUsbDevice()">Check Claimed</button>
<button type="button" class="btn btn-success" onclick="claimUsbDevice()">Claim Device</button>
<button type="button" class="btn btn-warning" onclick="releaseUsbDevice()">Release Device</button>
</div>
</div>
</div>
<div class="form-group">
<div class="btn-toolbar">
<div class="btn-group">
<button type="button" class="btn btn-default" onclick="sendUsbData()">Send Data</button>
<button type="button" class="btn btn-default" onclick="readUsbData()">Read Data</button>
</div>
<div class="btn-group">
<button type="button" class="btn btn-default" onclick="openUsbStream()">Open Stream</button>
<button type="button" class="btn btn-default" onclick="closeUsbStream()">Close Stream</button>
</div>
<div class="btn-group" data-toggle="buttons">
<label id="usbRawRadio" class="btn btn-default active">
<input type="radio" autocomplete="off" checked>
Raw
</label>
<label id="usbWeightRadio" class="btn btn-default">
<input type="radio" autocomplete="off">
Weight
</label>
</div>
</div>
</div>
</div>
</div>
<div class="row" style="margin-top: 1em;">
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">Options</h4>
</div>
<div class="panel-body">
<div class="row">
<div class="col-md-6">
<div class="form-group form-inline">
<label for="usbVendor">Vendor ID</label>
<input type="text" id="usbVendor" class="form-control pull-right" onblur="formatHexInput('usbVendor')" />
</div>
<div class="form-group form-inline">
<label for="usbProduct">Product ID</label>
<input type="text" id="usbProduct" class="form-control pull-right" onblur="formatHexInput('usbProduct')" />
</div>
<div class="form-group form-inline">
<label for="usbInterface">Device Interface</label>
<input type="text" id="usbInterface" class="form-control pull-right" onblur="formatHexInput('usbInterface')" />
</div>
<div class="form-group form-inline">
<label for="usbEndpoint">Interface Endpoint</label>
<input type="text" id="usbEndpoint" class="form-control pull-right" onblur="formatHexInput('usbEndpoint')" />
</div>
</div>
<div class="col-md-6">
<div class="form-group form-inline">
<label for="usbData">Send Data</label>
<input type="text" id="usbData" class="form-control pull-right" />
</div>
<div class="form-group form-inline">
<label for="usbResponse">Read size</label>
<input type="text" id="usbResponse" class="form-control pull-right" />
</div>
<div class="form-group form-inline">
<label for="usbStream" class="tip" data-toggle="tooltip" title="Streaming Only: In milliseconds">
Stream Interval
</label>
<input type="text" id="usbStream" class="form-control pull-right" />
</div>
</div>
</div>
<hr />
<div class="row">
<div class="col-md-12">
<button type="button" class="btn btn-danger pull-right" onclick="resetUsbOptions();">Reset</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div id="hidContent" class="tab-pane col-md-8">
<h3>HID</h3>
<hr />
<div class="row">
<div class="col-md-12">
<div class="form-group">
<div class="btn-toolbar">
<div class="btn-group">
<button type="button" class="btn btn-info" onclick="listHidDevices();">List Devices</button>
</div>
<div class="btn-group">
<button type="button" class="btn btn-info" onclick="checkHidDevice()">Check Claimed</button>
<button type="button" class="btn btn-success" onclick="claimHidDevice()">Claim Device</button>
<button type="button" class="btn btn-warning" onclick="releaseHidDevice()">Release Device</button>
</div>
<div class="btn-group">
<button type="button" class="btn btn-default" onclick="startHidListen()">Listen for Events</button>
<button type="button" class="btn btn-default" onclick="stopHidListen()">Stop Listening</button>
</div>
</div>
</div>
<div class="form-group">
<div class="btn-toolbar">
<div class="btn-group">
<button type="button" class="btn btn-default" onclick="sendHidData()">Send Data</button>
<button type="button" class="btn btn-default" onclick="readHidData()">Read Data</button>
</div>
<div class="btn-group">
<button type="button" class="btn btn-default" onclick="openHidStream()">Open Stream</button>
<button type="button" class="btn btn-default" onclick="closeHidStream()">Close Stream</button>
</div>
<div class="btn-group" data-toggle="buttons">
<label id="hidRawRadio" class="btn btn-default active">
<input type="radio" autocomplete="off" checked>
Raw
</label>
<label id="hidWeightRadio" class="btn btn-default">
<input type="radio" autocomplete="off">
Weight
</label>
</div>
</div>
</div>