Clever PrintNode Integration provides integration with the 3rd party printing service PrintNode to enumerate available printers and printer trays and submit print jobs to a given printer.

This functionality relies on having an API key provided by PrintNode and a PrintNode client installed with access to the printers to which you need to print.

The following functions are available in the PrintNode Mgt. codeunit:

ConnectionEstablished

  • Parameter: None

  • Returns: Boolean to indicate whether Clever PrintNode Integration can communicate with the PrintNode service

Tests whether Clever PrintNode Integration can communicate with the PrintNode service with the current setup. See PrintNode Setup to enter the API Key.

GetAvailablePrinters

  • Parameter: var temp Name/Value Buffer

  • Returns: Nothing

  • The record parameter is populated with the IDs and names of printers which are available to the account that is associated with the API Key entered on the PrintNode Setup page.

GetAvailablePrinterTrays

  • Parameter: PrinterId (text) – ID of the printer to get printer trays for

  • Parameter: var temp Name/Value Buffer

  • Returns: Nothing

  • The Name/Value Buffer is populated with the available trays for the given printer.

GetIDForPrinterName

  • Parameter: PrinterName (text) – name of the printer for which to return the PrintNode ID

  • Returns: text – the ID corresponding to the required printer, blank if not found

  • Finds the PrintNode ID for the requested printer.

SubmitBase64FileToPrinter

  • Parameter: ClientFileName (text) – the file name to attach to the base64 that is submitted

  • Parameter: Base64File (text) – base64 encoded text of the file to print

  • Parameter: PrinterId (text) – PrintNode ID of the printer to submit the print job to

  • Parameter: PrinterTray (text) – the tray to submit the print job to

  • Parameter: ShowMsg (Boolean) – set to true to show success or error message

  • Parameter: FileType (option: PDF, Raw) – whether PrintNode should treat the base64 content as PDF or Raw

  • Returns: Nothing

  • Submits a base64 encoded file to the specified printer for PrintNode to print.

SelectTestFileToPrint

  • Parameter: None

  • Returns: Nothing

  • Prompts the user to select a file to upload and submit to the printer set as the “Test Printer” on the PrintNode Setup page.

PrintPDFFile

  • Parameter: ClientFileName (text) – the file name to attach to the base64 that is submitted

  • Parameter: Base64File (text) – base64 encoded text of the file to print

  • Parameter: PrinterId (text) – PrintNode ID of the printer to submit the print job to

  • Parameter: PrinterTray (text) – the tray to submit the print job to

  • Parameter: ShowMsg (Boolean) – set to true to show success or error message

  • Returns: Nothing

  • Wrapper for SubmitBase64FileToPrinter for PDF files

PrintRawFile

  • Parameter: ClientFileName (text) – the file name to attach to the base64 that is submitted

  • Parameter: Base64File (text) – base64 encoded text of the file to print

  • Parameter: PrinterId (text) – PrintNode ID of the printer to submit the print job to

  • Parameter: PrinterTray (text) – the tray to submit the print job to

  • Parameter: ShowMsg (Boolean) – set to true to show success or error message

  • Returns: Nothing

  • Wrapper for SubmitBase64FileToPrinter for Raw files