> 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/ios/editing-page-content/remove.md).

# Removing images from PDF page on iOS

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. The Apryse iOS SDK streamlines secure docume

To remove all images from a document page.

{% tabs %}
{% tab title="Obj-C" %}
{% code lineNumbers="true" %}

```objc
PTPDFDoc *doc = [[PTPDFDoc alloc] initWithFilepath: filename];
PTPage *page = [doc GetPage:1];

PTElementWriter *writer = [[PTElementWriter alloc] init];
PTElementReader *reader = [[PTElementReader alloc] init];
[reader Begin: page];
[writer Begin:page placement:e_ptreplacement page_coord_sys:NO compress:YES];

PTElement *element;	
while ((element = [reader Next])) 	// Read page contents
{
    switch ([element GetType])
    {		
        case e_ptimage: 
        case e_ptinline_image: 
            // remove all images by skipping them			
            break;
        default:
            [writer WriteElement: element];
    }
}

[writer End];
[reader End];
```

{% endcode %}
{% endtab %}

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

```swift
let doc: PTPDFDoc = PTPDFDoc(filepath: filename)
let page: PTPage = doc.getPage(1)

let writer: PTElementWriter = PTElementWriter()
let reader: PTElementReader = PTElementReader()
reader.begin(page)
writer.begin(page, placement: e_ptreplacement, page_coord_sys: false, compress: true)

while let element = reader.next()
{
    switch element.getType()
    {
        case e_ptimage, e_ptinline_image:
            // remove all images by skipping them
            break
        default:
            writer.write(element)
    }
}

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

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

[PDF Editor (Programmatic)](/ios/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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
