kysdk.Print(3)
✨ NAME ✨
okay so bestie, this is the manual page for kysdk.Print — aka 获取打印信息, the printing info era. It's the kysdk.Print(3) page, and it's mainly here to generate all local printers (both available printers and unavailable printers), get all local available printers (printers chilling in idle state), set print parameters — every time you set them it clears the previous print parameters, and this setting is global, so after you set it all printers will use these parameters to print — download network files, print local files, clear all print queues for a certain printer, get current printer status (status is not updated in real time), get current print job status (after sending a print job you need to wait a bit before getting status, status is not updated in real time), and get the filename inside a url. periodt. 💅
🌸 SYNOPSIS 🌸
Inherits kysdk.Base.
✨ Public Member Functions ✨
def __init__ (self)— the constructor, bestie. no description in the original, just vibes.def getPrinterList (self)— get all local printers (including available printers and unavailable printers).def getPrinterAvailableList (self)— get all local available printers (printers inidlestate).def setPrinterOptions (self, num, paper_type, cups, option)— set print parameters; every set clears the previous print parameters; this is a global setting, and after setting it all printers will use these parameters to print.def getPrinterPrintLocalFile (self, print_name, file_path)— print local file.def getPrinterCancelAllJobs (self, print_name)— clear all print queues for a certain printer.def getPrinterStatus (self, print_name)— get current printer status (status is not updated in real time).def getPrinterFilename (self, url)— get filename inside url.def getPrinterJobStatus (self, print_name, jobid)— get current print job status (after sending a print job you need to wait a bit before getting status, status is not updated in real time).def getPrinterDownloadRemoteFile (self, url, path)— download network file.
🦋 Additional Inherited Members 🦋
(nothing else here, bestie — that's the whole inherited-members section. 💅)
💅 Detailed Description 💅
This one is giving: 获取打印信息. It's mainly used to generate all local printers (including available printers and unavailable printers), get all local available printers (printers in idle state), set print parameters — every set clears the previous print parameters, this setting is global, and after setting it all printers will use these parameters to print — download network files, print local files, clear all print queues for a certain printer, get current printer status (status is not updated in real time), get current print job status (after sending a print job you need to wait a bit before getting status, status is not updated in real time), and get the filename inside url. periodt. 💖
🎀 Member Function Documentation 🎀
🦋 def kysdk.Print.getPrinterAvailableList ( self) 🦋
Get all local available printers (printers in idle state). no cap.
Returns: a list of names of all local available printers (原: 本地的所有可用打印机名称列表).
References: kysdk.SessionBase.interface, and kysdk.Base.interface.
💖 def kysdk.Print.getPrinterCancelAllJobs ( self, print_name) 💖
Clear all print queues for a certain printer. bye queue. 👋
Parameters:
print_name— printer name (打印机名).
Returns: success returns 0, failure returns -1. no in-between, bestie.
References: kysdk.SessionBase.interface, and kysdk.Base.interface.
🌈 def kysdk.Print.getPrinterDownloadRemoteFile ( self, url, path) 🌈
Download a network file. yes, we're downloading.
Parameters:
url— the url to print (要打印的url).path— the file path to save (保存的文件路径).
Returns: print job id (打印作业的id).
References: kysdk.SessionBase.interface, and kysdk.Base.interface.
🍓 def kysdk.Print.getPrinterFilename ( self, url) 🍓
Get the filename inside the url.
Parameters:
url— path (路径).
Returns: the parsed function name (原: 解析出来的函数名). yes, it says function name, not filename. iykyk. 💀
References: kysdk.SessionBase.interface, and kysdk.Base.interface.
⭐ def kysdk.Print.getPrinterJobStatus ( self, print_name, jobid) ⭐
Get current print job status (after sending a print job you need to wait a bit before getting status, status is not updated in real time). so don't spam it, bestie. 😭
Parameters:
print_name— printer name (打印机名).jobid— print job id (打印作业的id).
Returns: status code (状态码).
References: kysdk.SessionBase.interface, and kysdk.Base.interface.
👑 def kysdk.Print.getPrinterList ( self) 👑
Get all local printers (including available printers and unavailable printers). we love a full roster.
Returns: list of all printer names (原: 地的所有打印机名称列表). the original literally says 地的所有打印机名称列表 — we're keeping it real. 💅
References: kysdk.SessionBase.interface, and kysdk.Base.interface.
🧚 def kysdk.Print.getPrinterPrintLocalFile ( self, print_name, file_path) 🧚
Print a local file.
Parameters:
print_name— printer name (打印机名).file_path— absolute file path (文件绝对路径).
Returns: print job id (打印作业的id).
@notice: Even though it supports printing multiple formats, printing anything other than pdf doesn't look good enough — bestie, print pdf files. When the printer is in stop state, the function returns 0. Files with wrong format can successfully create a print job, but they won't print. What is "wrong format"? For example, if you currently want to print log file a.log, then rename a.log to a.pdf; at this point a.pdf becomes a wrong-format file and won't print. 💀
References: kysdk.SessionBase.interface, and kysdk.Base.interface.
🌸 def kysdk.Print.getPrinterStatus ( self, print_name) 🌸
Get current printer status (status is not updated in real time).
Parameters:
print_name— printer name (打印机名).
Returns: status code (状态码).
References: kysdk.SessionBase.interface, and kysdk.Base.interface.
💜 def kysdk.Print.setPrinterOptions ( self, num, paper_type, cups, option) 💜
Set print parameters. Every set clears the previous print parameters. This setting is global; after setting, all printers will use these parameters to print. so set it once and let it cook. 🔥
Parameters:
num— cups attribute, how many pages to print on one sheet, e.g.2,4, etc. (cups属性,一张纸打印几页,如2 4等).paper_type— cups attribute, paper type, e.g.A4(cups属性,纸张类型,如A4).cups— cups attribute, e.g.lrtb(cups属性,如lrtb).option— cups attribute, single-sided likeone-sided, double-sided liketwo-sided-long-edge(long-edge flip / 长边翻转),two-sided-short-edge(short-edge flip / 短边翻转).
References: kysdk.SessionBase.interface, and kysdk.Base.interface.
👑 Author 👑
Generated automatically by Doxygen for kysdk.py from the source code. so it's not a human, it's Doxygen doing its thing. iconic. 💅
byeee bestie 💖 — this page came from My Project, dated Thu Sep 21 2023, and it's the kysdk.Print(3) manual. mwah 🫶
📦 where this page comes from
- arch rolling: libkysdk-system 3.0.1.4-1 · LGPL-3.0-or-later AND LGPL-2.1-only OR LGPL-3.0-only AND LGPL-2.1-only WITH Qt-LGPL-exception-1.1 OR LGPL-3.0-only WITH Qt-LGPL-exception-1.1 AND MIT
- ubuntu resolute: libkysdk-system-dev 3.0.1.2-0ubuntu1 · LGPL-3.0-only
- ubuntu stonking: libkysdk-system-dev 3.0.1.3-0ubuntu1 · LGPL-3.0-or-later
- 💖 girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms