DynaPDF.SetSaveNewImageFormat
-----------------------------

Whether to recompress images.

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

MBS( "DynaPDF.SetSaveNewImageFormat"; PDF; Value ) 

**MBS**( **"DynaPDF.SetSaveNewImageFormat";** /\* Whether to recompress images. \*/  
**$PDF**; /\* The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). \*/   
**$Value**) /\* Whether to recompress images. Value can be 0 or 1.e.g. 0 \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| PDF | The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). | $pdf |
| Value | Whether to recompress images. Value can be 0 or 1. | 0 |

### Result

Returns OK on success.

### Description

Whether to recompress images.  
The property SaveNewImageFormat specifies whether images should be downscaled if the original resolution of the image is higher than the value of the property resolution (see also [DynaPDF.SetResolution](DynaPDFSetResolution.md)). If the property SaveNewImageFormat is false, JPEG compressed images will be inserted in pass- through mode as long as the image is not a CMYK JPEG (such images must be converted because Acrobat viewer require another byte order).  
Default value = true  
See also [SetSaveNewImageFormat](https://www.monkeybreadsoftware.com/DynaPDF-Manual/SetSaveNewImageFormat.shtml) function in DynaPDF manual.

### Examples

Pass through JPEGs if possible:

 MBS ( "DynaPDF.SetSaveNewImageFormat"; $PDF ; 0 )  
Maximum 300 dpi, pass through preferred and otherwise 90% JPEG compression:

 MBS ( "[DynaPDF.SetJPEGQuality](DynaPDFSetJPEGQuality.md)"; $PDF ; 90 )  
MBS ( "[DynaPDF.SetCompressionFilter](DynaPDFSetCompressionFilter.md)"; $PDF ; "jpeg" )  
MBS ( "DynaPDF.SetSaveNewImageFormat"; $PDF ; 0 )  
MBS ( "[DynaPDF.SetResolution](DynaPDFSetResolution.md)"; $PDF ; 300 )  
MBS ( "[DynaPDF.SetUseTransparency](DynaPDFSetUseTransparency.md)"; $PDF ; 0 )  
### See also

- [DynaPDF.ClipPath](DynaPDFClipPath.md)
- [DynaPDF.DrawCircle](DynaPDFDrawCircle.md)
- [DynaPDF.GetSaveNewImageFormat](DynaPDFGetSaveNewImageFormat.md)
- [DynaPDF.InsertImage](DynaPDFInsertImage.md)
- [DynaPDF.InsertImageFile](DynaPDFInsertImageFile.md)
- [DynaPDF.New](DynaPDFNew.md)
- [DynaPDF.SetCompressionFilter](DynaPDFSetCompressionFilter.md)
- [DynaPDF.SetJPEGQuality](DynaPDFSetJPEGQuality.md)
- [DynaPDF.SetResolution](DynaPDFSetResolution.md)
- [DynaPDF.SetUseTransparency](DynaPDFSetUseTransparency.md)

### Example Databases

- [DynaPDF/Merge PDFs](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/DynaPDF/Merge%20PDFs.shtml#11ScriptAnchor_)
- [DynaPDF/Picture to PDF](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/DynaPDF/Picture%20to%20PDF.shtml#3ScriptAnchor_)
- [DynaPDF/Place Picture](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/DynaPDF/Place%20Picture.shtml#1ScriptAnchor_)
- [DynaPDF/Place Template](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/DynaPDF/Place%20Template.shtml#2ScriptAnchor_)
- [DynaPDF/PSD Conversion](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/DynaPDF/PSD%20Conversion.shtml#3ScriptAnchor_)
- [DynaPDF/Scan with WIA to PDF](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/DynaPDF/Scan%20with%20WIA%20to%20PDF.shtml#24ScriptAnchor_)
- [DynaPDF/Tables](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/DynaPDF/Tables.shtml#2ScriptAnchor_)
- [DynaPDF/Watermark pages](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/DynaPDF/Watermark%20pages.shtml#2ScriptAnchor_)
- [OCR/OCR with DynaPDF](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/OCR/OCR%20with%20DynaPDF.shtml#1ScriptAnchor_)

### Blog Entries

- [Page Layouting in DynaPDF](https://www.mbsplugins.de/archive/2024-04-05/Page_Layouting_in_DynaPDF/monkeybreadsoftware_blog_filemaker)
- [DynaPDF graphics flags](https://www.mbsplugins.de/archive/2023-08-02/DynaPDF_graphics_flags/monkeybreadsoftware_blog_filemaker)
- [Merge documents with DynaPDF](https://www.mbsplugins.de/archive/2023-07-06/Merge_documents_with_DynaPDF/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 18th August 2014 , last changed 30th April 2020

  
[DynaPDF.SetResolution](DynaPDFSetResolution.md) - [DynaPDF.SetSeparationInfo](DynaPDFSetSeparationInfo.md)

[HTML Version](DynaPDFSetSaveNewImageFormat.shtml)