DynaPDF.SaveGraphicState
------------------------

The function saves the current graphics state.

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

MBS( "DynaPDF.SaveGraphicState"; PDF ) 

**MBS**( **"DynaPDF.SaveGraphicState";** /\* The function saves the current graphics state. \*/  
**$PDF**) /\* The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| PDF | The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). | $pdf |

### Result

Returns OK or error message.

### Description

The function saves the current graphics state.   
A saved graphics state must be restored before the page, template or pattern will be closed.  
see also [DynaPDF.RestoreGraphicState](DynaPDFRestoreGraphicState.md).  
  
You can use DynaPDF.SaveGraphicState with RestorePageCoords option to define whether this saves the page coordinate option (bottom-up or top-down).   
See also [SaveGraphicState](https://www.monkeybreadsoftware.com/DynaPDF-Manual/SaveGraphicState.shtml) function in DynaPDF manual.

### See also

- [DynaPDF.ClipPath](DynaPDFClipPath.md)
- [DynaPDF.CreateRadialShading](DynaPDFCreateRadialShading.md)
- [DynaPDF.DrawCircle](DynaPDFDrawCircle.md)
- [DynaPDF.New](DynaPDFNew.md)
- [DynaPDF.Rectangle](DynaPDFRectangle.md)
- [DynaPDF.Save](DynaPDFSave.md)
- [DynaPDF.ScaleCoords](DynaPDFScaleCoords.md)
- [DynaPDF.SetAlpha](DynaPDFSetAlpha.md)
- [DynaPDF.SkewCoords](DynaPDFSkewCoords.md)
- [DynaPDF.TranslateCoords](DynaPDFTranslateCoords.md)

### Example Databases

- [Barcode/DynaPDF Barcode](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Barcode/DynaPDF%20Barcode.shtml#2ScriptAnchor_)
- [DynaPDF/Coordinates](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/DynaPDF/Coordinates.shtml#1ScriptAnchor_)
- [DynaPDF/Create Text as PDFA](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/DynaPDF/Create%20Text%20as%20PDFA.shtml#3ScriptAnchor_)
- [DynaPDF/Page Layouting](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/DynaPDF/Page%20Layouting.shtml#2ScriptAnchor_)
- [DynaPDF/Place Template](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/DynaPDF/Place%20Template.shtml#2ScriptAnchor_)
- [DynaPDF/Signature Appearance](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/DynaPDF/Signature%20Appearance.shtml#1ScriptAnchor_)
- [DynaPDF/Watermark pages](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/DynaPDF/Watermark%20pages.shtml#2ScriptAnchor_)

### 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)

This function checks for a license.

Created 18th August 2014 , last changed 2nd August 2023

  
[DynaPDF.SaveAndSignFileWinCryptDialog](DynaPDFSaveAndSignFileWinCryptDialog.md) - [DynaPDF.ScaleCoords](DynaPDFScaleCoords.md)

[HTML Version](DynaPDFSaveGraphicState.shtml)