Skip to content

Instantly share code, notes, and snippets.

View lite1979's full-sized avatar

Lite lite1979

  • QZ Industries, LLC
  • Buffalo, NY 14216
View GitHub Profile
@lite1979
lite1979 / substitutions.json
Created August 2, 2024 19:06
json substitution file for QZ-Tray that adds 0.25 (units are defined in the size parameter, not in the margins parameter) to the LEFT side of the print result - this only works if the web app has the option for individual margins toggled ON.
[
{
"use":{
"config": {
"margins": {
"top": 0,
"right": 0,
"bottom": 0,
"left": 0.25
}
@lite1979
lite1979 / substitutions.json
Last active August 2, 2024 19:01
JSON substitution that adds "0.25" (unit to be determined in size config) unit margin to all four sides off print results.
[
{
"use":{
"config": {
"margins": 0.25
}
},
"for": {
"config": {
"margins": 0
[
{
"use":{
"config": {
"margins": {
"top": 0,
"right": 0,
"bottom": 0,
"left": 1
},
lite@bjorn:~/tray$ ant nsis
Buildfile: /home/lite/tray/build.xml
get-host-arch:
get-target-arch:
target-os-windows:
init:
lite@bjorn:~/tray$ ant makeself
Buildfile: /home/lite/tray/build.xml
get-host-arch:
get-target-arch:
target-os-linux:
init:
^XA
^GFA,107100,107100,102,0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
^XA
^GFA,107100,107100,102,0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
<script>
let defaultPrinter;
qz.security.setCertificatePromise(function(resolve, reject) {
fetch("assets/signing/digital-certificate.txt", {cache: 'no-store', headers: {'Content-Type': 'text/plain'}})
.then(function (data) {
data.ok ? resolve(data.text()) : reject(data.text());
});
[DEBUG] 2020-06-05 15:34:21,557 @ qz.ws.PrintSocketClient:?
Message: {"call":"printers.find","promise":{},"params":{"query":"xps"},"timestamp":1591385661557,"uid":"05z7b2","signAlgorithm":"SHA512","position":{"x":null,"y":null}}
[WARN] 2020-06-05 15:34:21,558 @ qz.ws.PrintSocketClient:?
Bad signature on request
[DEBUG] 2020-06-05 15:34:21,565 @ qz.common.TrayManager:?
Invalid dialog position provided: java.awt.Point[x=0,y=0], we'll center on first monitor instead
[INFO] 2020-06-05 15:34:23,387 @ qz.common.TrayManager:?
Allowed localhost to access connected printers
[DEBUG] 2020-06-05 15:34:23,388 @ qz.printer.PrintServiceMatcher:?
Searching for PrintService matching xps
[DEBUG] 2020-06-04 23:03:56,589 @ qz.ws.PrintSocketClient:?
Message: {"call":"print","promise":{},"params":{"printer":{"name":"HLL2380DW"},"options":{"bounds":null,"colorType":"grayscale","copies":1,"density":0,"duplex":false,"fallbackDensity":null,"interpolation":"bicubic","jobName":null,"legacy":false,"margins":0,"orientation":null,"paperThickness":null,"printerTray":null,"rasterize":false,"rotation":0,"scaleContent":true,"size":{"width":"4","height":"6"},"units":"in","altPrinting":false,"encoding":null,"endOfDoc":null,"perSpool":1},"data":[{"type":"pixel","format":"html","flavor":"plain","data":"<html><body> <table style=\"font-family: monospace; width: 100%\"> <tr> <td> <h2>* QZ Tray HTML Sample Print *</h2> <span style=\"color: #D00;\">Version:</span> 2.1.0+62<br/> <span style=\"color: #D00;\">Source:</span> https://qz.io/ </td> <td align=\"right\"> <img src=\"file:///opt/qz-tray/demo/assets/img/image_sample.png\" /> </td> </tr> </table></body></ht