使用sendToPrinter API using-the-sendtoprinter-api
概觀 overview
在AEM Forms中,您可以使用SendToPrinter服務將文檔發送到打印機。 SendToPrinter服務支援以下打印訪問機制:
-
可直接訪問的打印機
: A printer that is installed on the same computer is called a direct accessible printer, and the computer is named printer host. This type of printer can be a local printer that is connected to the computer directly.
-
間接可訪問打印機
: The printer that is installed on a print server is accessed from other computers. Technologies such as the common UNIX® printing system (CUPS) and the Line Printer Daemon (LPD) protocol are available to connect to a network printer. To access an indirect accessible printer, specify the print server’s IP or host name. Using this mechanism, you can send a document to an LPD URI when the network has an LPD running. The mechanism lets you route the document to any printer that is connected to the network that has an LPD running.
將文檔發送到打印機時,請指定以下打印協定之一:
- 杯
: A printing protocol named common UNIX printing system. This protocol is used for UNIX operating systems and enables a computer to function as a print server. The print server accepts print requests from client applications, processes them, and sends them to configured printers. On the IBM AIX® operating system, usage of CUPS is not recommended.
- "DirectIP
: A standard protocol for remote printing and managing print jobs. This protocol can be used locally or remotely. Print queues are not required.
- "LPD
: A printing protocol named Line Printer Daemon protocol or Line Printer Remote (LPR) protocol. This protocol provides network print server functionality for UNIX-based systems.
- SharedPrinter
: A printing protocol that enables a computer to use a printer that is configured for that computer.
- CIFS:輸出服務支援通用Internet檔案系統(CIFS)打印協定。
- 杯
使用SendToPrinter服務 using-sendtoprinter-service
下表列出:
- 有關用於各種協定的printerName或printServer的資訊。
- 打印機為打印機伺服器URI和打印機名稱的各種組合返回的值或異常
驗證支援 authentication-support
只有CIFS打印才支援身份驗證。 要驗證,請在PrinterSpec中提供用戶名/密碼/域。 您可以透過執行下列步驟,使用AEM Granite CyprotoSupport Service加密密碼:
-
前往https://<server>:<port>/system/console。
-
前往 主要 > 加密支援.
-
輸入一些純文字,然後按一下 Protect.