JSPrintManager Maintenance Update – Version 9.0.26.1025: TcpComm CLOSE_WAIT, faster printer queries, and more reliable printing and notifications.
JSPrintManager version 9.0.26.1025 ships with the following main fixes and improvements:
Improve: Expose the Client App version in JSPrintManager JS Lib
JSPrintManager's JavaScript library now exposes the version of the Client App it's connected to through a new property: JSPrintManager.clientAppVersion.
The version was always sent during the connection handshake, but the JS lib never made it available. Now you can read it as soon as the connection opens and compare it with the Client App build you require. If a station is running an outdated local Client App, you can warn the user or prompt an update before printing.
JSPM.JSPrintManager.start();
JSPM.JSPrintManager.WS.onStatusChanged = function () {
if (JSPM.JSPrintManager.websocket_status == JSPM.WSStatus.Open) {
console.log(JSPM.JSPrintManager.clientAppVersion);
}
};
The property returns undefined when there is no open connection, or when the Client App is an older build that doesn't report its version.
Improve: Faster printer status, bye bye WMI!
getPrintersInfo(PrintersInfoLevel.Extended) on Windows no longer relies on WMI, which could take seconds per printer on system with many queues. It now reads printer data directly from the Windows print spooler. Now it takes a few milliseconds per printer and it uses far less CPU when many clients query at once under print server mode.
Improve: More reliable print job notifications
We've improved how the print job watcher works on Windows systems with many printers. Previously, large installations could stop receiving job status updates (SPOOLING, PRINTING, PRINTED) after the first acknowledgement. The watcher now monitors only the printers that have active jobs, so there is no limit on the number of printers, and clients always receive a final status, even for cancelled jobs or printers waiting for user action.
Improve: More reliable printing on print servers and Remote Desktop
- Accurate job tracking. Print jobs are now tracked from the moment the spooler creates them. Jobs that leave the queue without being printed are reported through onError, and the final status includes a new
outcomefield (printed,failedorunconfirmed). - Multi-file print jobs fixed. Temporary files are no longer removed before every file in a
ClientPrintJobhas been printed, and "done" is sent only after every job has reached a final state. - Remote Desktop resilience. Printer events keep flowing when RDP sessions connect or disconnect, redirected printers from other sessions are filtered out, and an unavailable default printer no longer cancels jobs sent to other printers.
- Better unattended operation. JSPrintManager now detects when Windows unloads the user profile it runs under, logs it once with a clear explanation, and recovers automatically when the profile is loaded again.
Improve: Clearer SSL errors
If your site connects with wss:// while the JSPrintManager Client App has SSL disabled (or the reverse), the connection used to hang for about 30 seconds and be reported as a certificate error. Now the app reports its SSL mode, and the JS lib fails immediately with a clear message telling you which setting to change (WSStatus.SslModeMismatch). The app also closes stalled connections right away, so they no longer tie up threads.
Update both the Client App and the JS lib to get the new error. With an older app, the lib works as before, but waits at most 10 seconds instead of 30.
Improve: Faster printer queries
- Read-only queries no longer wait behind print jobs. Call
JSPrintManager.startFastLane()once the main connection is open.getPrintersandgetPrintersInfothen run on a second connection, so a large document or an open print dialog no longer delays them. - New
spooler_onlyoption forgetPrintersInfo(Basic)can now answer straight from the Windows spooler without contacting each driver. A printer that is switched off or asleep can no longer stall the request. Use it for printer pickers, then request full details for the printer the user selects.
Improve: Faster and safer printing under busy environments (mainly for print server mode)
- Safer under load: We fixed a thread-safety race in how each browser connection tracks its active jobs. The fix removes a rare source of random crashes and lost job IDs when many clients connect and disconnect at once.
- Faster RAW printing: ZPL, EPL and other RAW jobs no longer query paper, tray, media type or duplex settings.
- Smarter tray lookups: The list of printer trays is now read once per printer instead of on every access. Jobs that use specific trays or per-page tray selection finish with far fewer driver round-trips.
The result is less overhead per label and a more stable print server for high-volume setups.
Fix: TcpComm connections now close cleanly when a printer hangs up
A printer closing a TcpComm connection was not detected by JSPrintManager. The socket stayed in CLOSE_WAIT, onClose never fired on the client, and in some cases the reader thread kept spinning and used excessive CPU. Now, when the device closes the connection, JSPrintManager closes the socket, releases the thread and fires TcpComm.onClose. Calling close() from the client also releases the printer connection immediately. This is especially relevant for print servers with many clients and printers.
Fix: license validation now completes before your jobs run
Previously, a job sent right after the connection opened (for example from onStatusChanged) could reach the Client App before the license was validated and trigger the "EVALUATION MODE" dialog. On unattended print servers, that left the job waiting for a click nobody could give.
The JS Lib now sends the license first and holds print, scan and comm jobs until validation finishes, then releases them in order. No code changes are needed. If you want the result, use the new await JSPM.JSPrintManager.whenLicensed().
If the license server is slow or unreachable, held jobs are released after 10 seconds, so nothing stays stuck.
How to update
Update both components: some of the changes above live in the JS lib, others in the Client App, and a few (like the new SSL mode error and clientAppVersion) need both.
1. Update the JSPrintManager JS lib to 9.0.3
From npm:
npm install jsprintmanager@9.0.3
Or from NuGet, in your project file:
<PackageReference Include="JSPrintManager.js" Version="9.0.3" />
2. Update the JSPrintManager Client App to 9.0.26.1025
Download the Client App for Windows, macOS or Linux from the JSPrintManager downloads page and install it on every client machine (or on the print server, if you use print server mode).
Once both are updated, you can check which Client App each station is running with the new JSPrintManager.clientAppVersion property.
More information
- Full release notes: version history
- Quick Start and API reference: JSPrintManager
| Tweet |
|