From: Solomon P. <pi...@sh...> - 2025-06-03 11:33:31
|
On Sun, Jun 01, 2025 at 02:34:05PM +0300, שחר בן חמו wrote: > However, since my target environment is Windows, I am trying to determine > whether Gutenprint or any related components (e.g., via a CUPS-on-Windows > setup, or exporting PPD capabilities to another stack) could be feasible in > my case. Alternatively, I’m considering using the Windows Print Spooler and > Win32 API with the manufacturers’ official drivers, potentially modifying > DEVMODE settings to toggle the cutter programmatically. Serious question: Why Windows? It is an objectively poor platform for this sort of thing, especially if you deliberately try to bypass Windows' own printing infrastructure. (Meanwhile, DNP's Windows drivers for these printers fully support 2x6" strips, and I assume there is a programmic way for applications to request specific print options when using the Windows printing APIs) > Do you believe Gutenprint (or any part of its architecture) can be > effectively used on Windows to enable the kind of strip cutting I need? It's certainly _possible_ but it's creating a lot of extra work for yourself. (I can't comment on the technical ability of CUPS to run _natively_ under Windows but I know of folks that (1) manually generate rendered files using their application or (2) invoke the Gutenprint CUPS filter under Windows to produce rendered files and then (3) use the selphy_print backend to handle communication with the printer. In all cases their application handles queueing/spooling/state. They only did this because they had a large legacy codebase that they considered infeasible to port) > Is there any way to leverage the Gutenprint drivers or PPD logic outside > of CUPS (e.g., as a reference for building Windows-compatible workflows)? In the sense that the source code for all of this is provided under F/OSS terms, it's usable as a reference. But you can cross-compile the binaries to run under Windows and execute them directly. PPDs are still used for figuring out and specifying configurable options even if you don't use the rest of the CUPS infrastructure (eg for spooling etc) > In your experience, does the Windows Print Spooler/DEVMODE approach > offer enough control to reliably achieve 2x6 cutting, or is Gutenprint (via > CUPS/Linux) a more stable route? I'm not familiar with the nuances of Windows's printing APIs, but I have to imagine it is more "reliable" or "stable" to use the infrastructure that Windows provides versus effectively rolling your own custom approach. (Assuming that it can provide the technical capabilities you require) Meanwhile, as Till already pointed out, another approach is to run CUPS+Gutenprint natively under WSL, which is effectively a full-featured Linux VM running under Windows. That still leaves the question of how your photobooth application would interact with the printer, but it is my understanding that the latest Windows 11 release provides a native IPP print client, and if that's not viable for whatever reason there are multiple third-party IPP client libraries. Or you could also roll your own minimal interface using curl or some other http library. (This is because CUPS provides a usable IPP experience for "classic" PPD-based printer drivers. Though there are some annoying bugs if you're not on the latest release..) Best of luck, - Solomon -- Solomon Peachy pizza at shaftnet dot org (email&xmpp) @pizza:shaftnet dot org (matrix) Dowling Park, FL speachy (libera.chat) |