For developers
Link reference
Every rollcast://print parameter, limit and a link to try.
URL
rollcast://print?type=<raw|text|html>&data=<base64>&printer=<id>| Parameter | Meaning |
|---|---|
| type | raw (default, also escpos): ESC/POS bytes. text (also txt): UTF-8 text. html (also htm): UTF-8 HTML document. |
| data | Required. Base64 of the payload. Standard or URL-safe alphabet, padding optional. Percent-encode standard base64, because '+' would become a space. |
| printer | Optional printer ID (up to 128 characters). If it is missing or unknown, the default printer is used. |
Limits
| Limit | Value |
|---|---|
| Query length | 2 MB (2,097,152 characters). Android may fail near 1 MB, so keep links small. |
| Rate | 1 link per second; extras are dropped. |
| Allow web prints | Must be on for every rollcast:// link, from browsers and apps. |
| Shared files | 20 MB per file, up to 32 files. Always printed on the default printer. |
Get a printer ID
- 1Open RollCast.
- 2Find the printer on the main screen.
- 3Tap "Copy ID".
- 4Paste the ID as the printer parameter.
Chrome intent form
From web pages, use this form so users without RollCast go to a fallback page or the Play Store.
URL
intent://print?type=text&data=<base64>#Intent;scheme=rollcast;package=com.rollcast.app;S.browser_fallback_url=<percent-encoded https URL>;endTry it
This link prints "Hello from RollCast!" on the default printer:
URL
rollcast://print?type=text&data=SGVsbG8gZnJvbSBSb2xsQ2FzdCETesters can send it from a computer with adb:
Shell
adb shell "am start -a android.intent.action.VIEW -d 'rollcast://print?type=text&data=SGVsbG8gZnJvbSBSb2xsQ2FzdCE'"Tip
The inner single quotes stop the phone's shell from treating '&' as a command separator.
Messages you may see
| Message | Meaning |
|---|---|
| Sent to printer | The job was accepted. |
| Printing from web links is disabled in RollCast settings | Turn on "Allow web prints". |
| Too many print requests | More than one link per second. |
| Nothing to print: … | The link was rejected. The reason follows (missing data, invalid base64, unknown type, payload too large). |
| No printer configured. Open RollCast to add one. | Notification: the printer ID was missing or unknown and there is no default printer. |