Utiliser l’API sendToPrinter using-the-sendtoprinter-api
Présentation overview
Dans AEM Forms, vous pouvez utiliser le service SendToPrinter pour envoyer un document vers l’imprimante. Le service SendToPrinter prend en charge les mécanismes d’accès aux imprimantes suivants :
-
Imprimante accessible directement
: 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.
-
Imprimante accessible indirectement
: 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.
Lorsque vous envoyez un document à une imprimante, indiquez l’un des protocoles d’impression suivants :
- CUPS
: 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 : le service Output prend en charge le protocole d’impression CIFS (Common Internet File System).
- CUPS
Utilisation du service SendToPrinter using-sendtoprinter-service
Le tableau ci-dessous répertorie :
- Informations sur printerName ou printServer à utiliser pour différents protocoles.
- valeur ou exception qu’une imprimante renvoie pour différentes combinaisons de serveur d’imprimante URI et de nom de l’imprimante.
Prise en charge de l’authentification authentication-support
L’authentification est prise en charge uniquement pour l’impression CIF. Pour authentifier, indiquez vos nom d’utilisateur, mot de passe et domaine dans PrinterSpec. Vous pouvez chiffrer un mot de passe à l’aide du service Granite CryptoSupport AEM en procédant de la manière suivante :
-
Accédez à https://<server>:<port>/system/console.
-
Accédez à Général > Crypto Support.
-
Entrez du texte brut puis cliquez sur Protection.