> 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 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/ios/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.
