Container.GetSize
-----------------

Returns the size of the container.

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

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

**MBS**( **"Container.GetSize";** /\* Returns the size of the container. \*/  
**$Container**; /\* The container field or value to inspect. \*/   
**$Type**) /\* Name or index \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Container | The container field or value to inspect. |  |
| Type | Name or index |  |

### Description

Returns the size of the container.   
A container contains several data parts with data and this function queries size in bytes of one of them.  
You must pass either the name of the type you wish to get or its index. Index start at 0.  
  
See [Container.GetTotalSize](ContainerGetTotalSize.md) to query size of all data in a container.  
### Examples

Query size of container with PNG:

 MBS ("Container.GetSize"; Images::Image ; "PNGf")  
### See also

- [Container.GetName](ContainerGetName.md)
- [Container.GetText](ContainerGetText.md)
- [Container.GetTotalSize](ContainerGetTotalSize.md)
- [Container.GetType](ContainerGetType.md)
- [Container.GetTypes](ContainerGetTypes.md)
- [Container.GetTypeSize](ContainerGetTypeSize.md)
- [Container.GetWidth](ContainerGetWidth.md)
- [Container.Serialize](ContainerSerialize.md)
- [DynaPDF.Optimize](DynaPDFOptimize.md)
- [DynaPDF.SetOrientationEx](DynaPDFSetOrientationEx.md)

### Example Databases

- [DynaPDF/Optimize PDF](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/DynaPDF/Optimize%20PDF.shtml#1297FieldAnchor_)
- [GraphicsMagick/Reduce Image](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/GraphicsMagick/Reduce%20Image.shtml#1296FieldAnchor_)
- [Mac and iOS/PDFKit/Compress PDF](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Mac%20and%20iOS/PDFKit/Compress%20PDF.shtml#1294FieldAnchor_)

### Blog Entries

- [Custom function to optimize PDF in FileMaker via DynaPDF](https://www.mbsplugins.de/archive/2016-12-07/Custom_function_to_optimize_PD/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 18th August 2014 , last changed 6th November 2018

  
[Container.GetResolution](ContainerGetResolution.md) - [Container.GetText](ContainerGetText.md)

[HTML Version](ContainerGetSize.shtml)