Container.Remove
----------------

Removes a stream from container value.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Container](component_Container.md) | [3.3](newinversion33.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "Container.Remove"; Container; Type ) 

**MBS**( **"Container.Remove";** /\* Removes a stream from container value. \*/  
**$Container**; /\* The container field or value to inspect. \*/   
**$Type**) /\* The type code of the stream to remove. Can be "PDF ", "JPEG" or one of the other usual types.e.g. "JPEG" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Container | The container field or value to inspect. |  |
| Type | The type code of the stream to remove. Can be "PDF ", "JPEG" or one of the other usual types. | "JPEG" |

### Result

Returns modified container value or error.

### Description

Removes a stream from container value.  
This function can be used to remove the JPEG preview from an image.  
Or if you have a container with PDF and preview, you could remove the PDF to just get the preview image.  
Use [Container.GetTypes](ContainerGetTypes.md) to learn what types are inside a container.  
### Examples

Renames an image to have a new file extension.

 $jpegOnly = MBS ( "Container.Remove"; $PDFContainer ; "JPEG" )  
Remove PDF from container value:

 MBS ( "Container.Remove"; FinalPDF; "PDF " )  
/\* PDF produced with DynaPDF Pro will have Preview image. Removing PDF will reveal the preview: \*/  
Removes PDF from a PDF container with preview, so we end up with preview alone:

 MBS ( "Container.Remove"; $PDFContainer ; "PDF " )  
Remove DPI metadata:

 Set Variable \[$Image ; MBS ( "Container.Remove"; $Image ; "DPI\_" ) \]  
### See also

- [Container.GetType](ContainerGetType.md)
- [Container.GetTypes](ContainerGetTypes.md)
- [Container.RemovePreview](ContainerRemovePreview.md)
- [Container.Rename](ContainerRename.md)

### Release notes

- **Version 14.2**
    - Added [Container.RemovePreview](https://www.mbsplugins.eu/ContainerRemovePreview.shtml) function to remove preview from container.

### Example Databases

- [Containers/Container Remove Test](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Containers/Container%20Remove%20Test.shtml#1GroupButton144.0000000414.0000000169.0000000547.0000000LayoutObjectAnchor_)
- [DynaPDF/Generate Previews](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/DynaPDF/Generate%20Previews.shtml#4ScriptAnchor_)

### Blog Entries

- [MBS Filemaker Plugin, version 3.3pr3](https://www.mbsplugins.de/archive/2013-06-02/MBS_Filemaker_Plugin_version_3/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 18th August 2014 , last changed 25th February 2026

  
[Container.ReadImageFile](ContainerReadImageFile.md) - [Container.RemovePreview](ContainerRemovePreview.md)

[HTML Version](ContainerRemove.shtml)