> For the complete documentation index, see [llms.txt](https://docs.apryse.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.apryse.com/android/editing-page-content/remove.md).

# Removing images from PDF page in Android

Learn how to remove all images from a document page using PDF Editor (Programmatic) with this full code sample. Strip images and change text color to blue effortlessly. The Apryse Android SDK streamli

To remove all images from a document page.

{% tabs %}
{% tab title="Java" %}
{% code lineNumbers="true" %}

```java
PDFDoc doc = new PDFDoc(filename);
Page page = doc.getPage(1);

ElementWriter writer = new ElementWriter();
ElementReader reader = new ElementReader();
reader.begin(page);
writer.begin(page, ElementWriter.e_replacement, false);

Element element;
while ((element = reader.next()) != null) 
{
    switch (element.getType()) 
    {
        case Element.e_image:
        case Element.e_inline_image:
            // remove all images by skipping them
            break;
        default:
            writer.writeElement(element);
            break;
    }
}

writer.end();
reader.end();
```

{% endcode %}
{% endtab %}

{% tab title="Kotlin" %}
{% code lineNumbers="true" %}

```kotlin
val doc = PDFDoc(filename)
val page = doc.getPage(1)

val writer = ElementWriter()
val reader = ElementReader()
reader.begin(page)
writer.begin(page, ElementWriter.e_replacement, false)

var element = reader.next()
while (element != null)
{
    when (element.type)
    {
        Element.e_image, Element.e_inline_image -> {
            // remove all images by skipping them
        }
        else -> writer.writeElement(element)
    }
    element = reader.next()
}

writer.end()
reader.end()
```

{% endcode %}
{% endtab %}
{% endtabs %}

[PDF Editor (Programmatic)](/android/get-started/samples.md#elementedit) Full code sample which strips all images from the page and changes text color to blue.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.apryse.com/android/editing-page-content/remove.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
