CUPS.PrintFile
--------------

Print a file to a printer or class on the default server.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [CUPS](component_CUPS.md) | [2.5](newinversion25.md) | ✅ Yes | ❌ No | ❌ No | ✅ Yes, on macOS | ❌ No |

MBS( "CUPS.PrintFile"; Printer; Path { ; Title; Options } ) 

**MBS**( **"CUPS.PrintFile";** /\* Print a file to a printer or class on the default server. \*/  
**$Printer**; /\* The name of the printer.  
Please use CUPS printer name with underscore instead of spaces.e.g. "Brother\_DCP\_8085DN" \*/   
**$Path**; /\* The file path of the file to print.e.g. "/test/testfile.txt" \*/   
**$Title**; /\* Optional; The title of the print job.e.g. "FileMaker Printout" \*/   
**$Options**) /\* Optional; List of options. Simply add key and values as string parameters to the function call.e.g. "key1"; "value1"; "key2"; "value2" \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| Printer | The name of the printer.   Please use CUPS printer name with underscore instead of spaces. | "Brother\_DCP\_8085DN" |  |
| Path | The file path of the file to print. | "/test/testfile.txt" |  |
| Title | The title of the print job. | "FileMaker Printout" | Optional |
| Options | List of options. Simply add key and values as string parameters to the function call. | "key1"; "value1"; "key2"; "value2" | Optional |

### Result

Returns job number.

### Description

Print a file to a printer or class on the default server.  
### Examples

Print a file:

 MBS ( "CUPS.PrintFile"; "Brother\_DCP\_8085DN"; "/test/testfile.txt"; "FileMaker Printout" )  
### See also

- [CUPS.PrintData](CUPSPrintData.md)

### FileMaker Magazin

- [Ausgabe 6/2017, Seite 25](https://filemaker-magazin.de/neuigkeit/3967-Appetithappen-FMM_201706)

This function checks for a license.

Created 18th August 2014 , last changed 2nd February 2021

  
[CUPS.PrintDataEncoding](CUPSPrintDataEncoding.md) - [CURL.AWSPresignURL](CURLAWSPresignURL.md)

[HTML Version](CUPSPrintFile.shtml)