-
Notifications
You must be signed in to change notification settings - Fork 281
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ability to print to CUPS URL #384
Comments
Here is another log using a different
|
Correct, this is not supported. The underlying Java tray/src/qz/printer/action/PrintRaw.java Lines 214 to 228 in 8f2e617
In this case To properly support URLs we would need to add URL support to the API. Here's an example from Oracle: import java.net.*;
import java.io.*;
public class URLConnectionReader {
public static void main(String[] args) throws Exception {
URL oracle = new URL("http://www.oracle.com/");
URLConnection yc = oracle.openConnection();
BufferedReader in = new BufferedReader(new InputStreamReader(
yc.getInputStream()));
String inputLine;
while ((inputLine = in.readLine()) != null)
System.out.println(inputLine);
in.close();
}
} The API would have to change slightly, we'd need to expand the printer to accept a URL. e.g. var config = qz.configs.create({ url: "http://path/to/some/endpoint", port: 9100 }); |
@arpaulnet hi, I'm not sure if you're still actively using QZ Tray, but if so, do you mind testing the new socket feature for this purpose? #750 |
I am attempting to print ZPL to a CUPS printer URL. The documentation shows:
I have attempted a few different combinations for the
qz.configs.create()
function:qz.configs.create('http://<cups-server>:<port>/printers/<my-printer>')
qz.configs.create({host: 'http://<cups-server>/printers/<my-printer>', port: <port>})
qz.configs.create({host: 'http://<cups-server>:<port>/printers/<my-printer>'})
Regardless of how I create the config, I get a
java.net.UnknownHostException
.I can successfully print (same payload) with the
alternatePrinting: true
option as well as using a RAW socket instead of a CUPS URI. The CUPS server requires no authentication, and I have verified it works both locally and remotely. The CUPS queue is configured as a raw queue.Here a log of an attempt, with my network IPs and queue names removed:
The text was updated successfully, but these errors were encountered: