DynaPDF.SetCompressionLevel
---------------------------

Sets the current compression level.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [DynaPDF](component_DynaPDF.md) | [4.0](newinversion40.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "DynaPDF.SetCompressionLevel"; PDF; CompressLevel ) 

**MBS**( **"DynaPDF.SetCompressionLevel";** /\* Sets the current compression level. \*/  
**$PDF**; /\* The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). \*/   
**$CompressLevel**) /\* The new compression level.   
Can be none, default, fastest or max.e.g. "none" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| PDF | The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). | $pdf |
| CompressLevel | The new compression level.    Can be none, default, fastest or max. | "none" |

### Result

Returns OK or error.

### Description

Sets the current compression level.   
If the compression level is None, content streams will be left uncompressed. This value is useful if a content stream must be debugged, the value will be ignored for image streams. The compression level is also used by certain image compression filters, see [DynaPDF.InsertImage](DynaPDFInsertImage.md) for further information.  
See also [DynaPDF.GetCompressionLevel](DynaPDFGetCompressionLevel.md).  
See also [SetCompressionLevel](https://www.monkeybreadsoftware.com/DynaPDF-Manual/SetCompressionLevel.shtml) function in DynaPDF manual.

### See also

- [DynaPDF.GetCompressionFilter](DynaPDFGetCompressionFilter.md)
- [DynaPDF.GetCompressionLevel](DynaPDFGetCompressionLevel.md)
- [DynaPDF.InsertImage](DynaPDFInsertImage.md)
- [DynaPDF.New](DynaPDFNew.md)
- [DynaPDF.SetCompressionFilter](DynaPDFSetCompressionFilter.md)
- [ZipFile.SetCompressionLevel](ZipFileSetCompressionLevel.md)

### Example Databases

- [DynaPDF/Add Page Links](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/DynaPDF/Add%20Page%20Links.shtml#2ScriptAnchor_)
- [DynaPDF/Merge PDFs](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/DynaPDF/Merge%20PDFs.shtml#2ScriptAnchor_)
- [DynaPDF/Signature Appearance](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/DynaPDF/Signature%20Appearance.shtml#1ScriptAnchor_)
- [Mac and iOS/PDFKit/Pictures to PDF](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Mac%20and%20iOS/PDFKit/Pictures%20to%20PDF.shtml#10ScriptAnchor_)

### Blog Entries

- [Create PDF/UA with DynaPDF in FileMaker](https://www.mbsplugins.de/archive/2026-05-27/Create_PDFUA_with_DynaPDF_in_F/monkeybreadsoftware_blog_filemaker)
- [DynaPDF graphics flags](https://www.mbsplugins.de/archive/2023-08-02/DynaPDF_graphics_flags/monkeybreadsoftware_blog_filemaker)
- [Add page links for FileMaker](https://www.mbsplugins.de/archive/2022-06-18/Add_page_links_for_FileMaker/monkeybreadsoftware_blog_filemaker)
- [MBS Filemaker Plugin, version 4.0pr5](https://www.mbsplugins.de/archive/2014-01-27/MBS_Filemaker_Plugin_version_4/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 18th August 2014 , last changed 29th January 2026

  
[DynaPDF.SetCompressionFilter](DynaPDFSetCompressionFilter.md) - [DynaPDF.SetContent](DynaPDFSetContent.md)

[HTML Version](DynaPDFSetCompressionLevel.shtml)