3

Do you want to auto print a page. This works in Firefox after your turn printAlwaysSilent to true and and chrome you will have to config run chrome silent printing on mode --kiosk-printing edit target on chrome shortcut properties Ex:"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --kiosk-printing "http://localhost:8080/this"

let myPdf := printAndSaveRecord(this, "HTML Ticket");
let x := substring(myPdf, 28, 200);
html("<html><head>
<style>
.button{}
.button1 {font-size: 90px;border-radius: 24 px}
</style>
</head>
<body>

 

<button class=""button button1"" onclick=""openWin()""> 🖨️</button>

<script>
function openWin() {
const myWindow = window.open(""" + x + """, ""_blank"", ""width=400, height=1000"");
setTimeout(function() {myWindow.print()}, 3000);setTimeout(function() {myWindow.close()}, 6000)

}

 

</script>

</body>
</html>
")

2replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
    • Alan Cooke
    • Alan_Cooke
    • 4 mths ago
    • Reported - view

    Given that Edge is based on Chrome would this be doable on Edge?

    Like
    • RoSoft_Steven
    • Ninox partner
    • RoSoft_Steven.1
    • 4 mths ago
    • Reported - view

    Thanks for sharing Nick Massie ,

    Very usefull.

    Like
Like3 Follow
  • 3 Likes
  • 4 mths agoLast active
  • 2Replies
  • 401Views
  • 2 Following