-1

Is there a way to use the CUPS library to get all the list of byte commands for the printer that should be sent to the printer to perform an operation. for example: If I want to find out the byte command for the Autocut features for a printer, Can I Do it with CUPS? Do they have an API for this feature?

Rishabh Rawat
  • 647
  • 4
  • 11
  • What did you do to research? Please show some effort. – the busybee Jan 09 '20 at 13:12
  • Your question is not fully clear. We don't have all the background information you might have. Please [edit] your question and add more details about what you want to achieve. (Do you want to find out what functions are supported by the printer and use these via CUPS? Or do you want to find the command bytes that would be sent to the printer?) – Bodo Jan 09 '20 at 13:19
  • @Bodo Hi, I have updated my question and just to be clear I want to find out the command bytes that would be sent to the printer. Thanks – Rishabh Rawat Jan 10 '20 at 06:48
  • I'm not sure about CUPS specifically, but generally the intention of libraries is to hide the details from the callers. CUPS is a generic system the specific handling is done by the printer driver for your printer. I guess you might be able to find the information in the source code of the printer driver. Look for `CutMedia`, see https://www.cups.org/doc/spec-ppd.html – Bodo Jan 10 '20 at 12:00

1 Answers1

0

No.
Languages and/or libraries do not usually include utilities to list their features or component functions. But things like operating systems, and their built in utility languages do. C, Awk and grep, etc are all examples of built-in capabilities within the Linux operating system to do what I think you are asking. Or, if using Windows the GNU Utilities for WIN32 contains such utilities as more and type. And, if the language is open source you can view the header files, or you can just do what most of us do, look for, and use the documentation for the particular language of interest.

ryyker
  • 20,437
  • 3
  • 35
  • 78