> For the complete documentation index, see [llms.txt](https://docs.octoxlabs.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.octoxlabs.com/adapters/p/papercut.md).

# PaperCut

PaperCut NG/MF manages printing. OctoXLabs reads the print queues that the Application Server lists and adds them as printer devices.

## Use cases

* List printers that PaperCut reports.

```
Adapters = papercut
```

## Before you begin

### Network

| Source              | Destination                         | Port                                        | Protocol                |
| ------------------- | ----------------------------------- | ------------------------------------------- | ----------------------- |
| OctoXLabs connector | Primary PaperCut Application Server | 9192 (HTTPS), 9191 (HTTP), some setups 9195 | HTTPS or HTTP (XML-RPC) |

### Required permissions

| Scope or role                                            | Permission                                   | Needed for    |
| -------------------------------------------------------- | -------------------------------------------- | ------------- |
| Web Services auth token (`auth.webservices.auth-token`)  | Allowed to call `api.listPrinters`           | Devices       |
| Caller IP allowed (`auth.webservices.allowed-addresses`) | The OctoXLabs server address must be allowed | All API calls |

## Create credentials in PaperCut

{% stepper %}
{% step %}

### Open the config editor

In the PaperCut admin interface click **Options**, then in the **Actions** menu click **Config editor (advanced)**.
{% endstep %}

{% step %}

### Set the token

Find the `auth.webservices.auth-token` key, enter the token in **Value** and click **Update**. Enter only the token string in OctoXLabs. The key also accepts a JSON array or object.
{% endstep %}

{% step %}

### Allow the caller IP

PaperCut allows only 127.0.0.1 by default. Add the OctoXLabs server under **Options > Advanced > Allowed XML Web Services callers**, or in `auth.webservices.allowed-addresses`. Without it every call is rejected, whatever the token.
{% endstep %}
{% endstepper %}

## Connection parameters

| Parameter  | Required | Type    | Default | Description                                                                                             |
| ---------- | -------- | ------- | ------- | ------------------------------------------------------------------------------------------------------- |
| IP         | Yes      | String  |         | Hostname or IP of the primary Application Server. Use the primary server even if Site Servers exist.    |
| Port       | No       | Integer | 9192    | 9192 for HTTPS, 9191 for HTTP. Some installs serve HTTPS on 9195.                                       |
| Auth Token | Yes      | String  |         | Web Services auth token. The built-in admin password is also accepted, but a token is faster and safer. |
| Is Secure  | No       | Boolean | True    | Use HTTPS. The port must match.                                                                         |
| Timeout    | No       | Integer | 30      | Seconds to wait for API responses.                                                                      |

## Troubleshooting

| Error message                              | Cause                       | Fix                                                                        |
| ------------------------------------------ | --------------------------- | -------------------------------------------------------------------------- |
| Fault (bad token or caller IP not allowed) | PaperCut rejected the call. | Check the auth token and add the OctoXLabs address to the allowed callers. |

## Change history

{% hint style="info" %}
Available starting from version 6.7.2.
{% endhint %}
