---
title: "Print from an Android app with PosPrinterDriver"
description: "Android Intent and ACTION_SEND examples for sending text, images and PDF to PosPrinterDriver."
canonical: "https://www.posprinterdriver.com/en-printfromapp"
date_modified: "2026-09-14"
language: "en"
---

# Send jobs from another Android app.

Use standard Android mechanisms and specify the PosPrinterDriver package to route content to the correct app.

## Send text

Minimal Kotlin example. device_id accepts values from 1 to 5.

```kotlin
val intent = Intent(Intent.ACTION_SEND).apply {
    type = "text/plain"
    setPackage("com.fidelier.posprinterdriver")
    putExtra(Intent.EXTRA_TEXT, "Order #123
Total: 12,50 €")
    putExtra("device_id", 1)
}
startActivity(intent)
```

- First check that the selected printer exists and passes the built-in test.
- Special text commands are explained in the command reference.

## Send an image

Share a content:// URI through FileProvider and grant temporary read permission.

```kotlin
val intent = Intent(Intent.ACTION_SEND).apply {
    type = "image/png"
    setPackage("com.fidelier.posprinterdriver")
    putExtra(Intent.EXTRA_STREAM, imageUri)
    putExtra("device_id", 1)
    addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION)
}
startActivity(intent)
```

- The app may show a preview and allow printer selection.
- The extra option direct with value "1" skips preview in the supported flow; test it explicitly with your version.

## Send a PDF

```kotlin
val intent = Intent(Intent.ACTION_SEND).apply {
    type = "application/pdf"
    setPackage("com.fidelier.posprinterdriver")
    putExtra(Intent.EXTRA_STREAM, pdfUri)
    putExtra("device_id", 1)
    addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION)
}
startActivity(intent)
```

## PDF limitation

> The reviewed implementation rasterises and prints only the first page. Split a multi-page PDF before sending it if you need to print every page.

## Checks before release

- Handle cases where PosPrinterDriver is not installed.
- Use content:// URIs and temporary permissions; do not expose private filesystem paths.
- Test large images, transparency and orientation.
- Test accented characters and the selected code page.
- Avoid automatic retries that could duplicate tickets.
