DynaPDF.CloseImportFile
-----------------------

Closes the current import PDF.

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

MBS( "DynaPDF.CloseImportFile"; PDF ) 

**MBS**( **"DynaPDF.CloseImportFile";** /\* Closes the current import PDF. \*/  
**$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.

### Description

Closes the current import PDF.  
The current working PDF stays in memory.  
See also [CloseImportFile](https://www.monkeybreadsoftware.com/DynaPDF-Manual/CloseImportFile.shtml) function in DynaPDF manual.

### Examples

Load a PDF from container, work with it and close PDF:

 Set Variable \[ $r ; Value: MBS ("[DynaPDF.OpenPDFFromContainer](DynaPDFOpenPDFFromContainer.md)"; $PDF ; Test::data ) \]  
\# work with import PDF   
Set Variable \[ $r ; Value: MBS ( "DynaPDF.CloseImportFile"; $PDF ) \]  
### See also

- [DynaPDF.New](DynaPDFNew.md)
- [DynaPDF.OpenOutputFile](DynaPDFOpenOutputFile.md)
- [DynaPDF.OpenOutputFileEncrypted](DynaPDFOpenOutputFileEncrypted.md)
- [DynaPDF.OpenPDFFromContainer](DynaPDFOpenPDFFromContainer.md)
- [DynaPDF.OpenPDFFromFile](DynaPDFOpenPDFFromFile.md)
- [DynaPDF.SetUseGlobalImpFiles](DynaPDFSetUseGlobalImpFiles.md)

### Example Databases

- [DynaPDF/Apply Letter Paper to PDF](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/DynaPDF/Apply%20Letter%20Paper%20to%20PDF.shtml#2ScriptAnchor_)
- [DynaPDF/Batch Preview](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/DynaPDF/Batch%20Preview.shtml#3ScriptAnchor_)
- [DynaPDF/Merge PDFs](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/DynaPDF/Merge%20PDFs.shtml#2ScriptAnchor_)

### Blog Entries

- [Merge PDF with table of contents](https://www.mbsplugins.de/archive/2020-02-25/Merge_PDF_with_table_of_conten/monkeybreadsoftware_blog_filemaker)
- [Introducing DynaPDF to MBS Filemaker Plugin](https://www.mbsplugins.de/archive/2012-11-27/Introducing_DynaPDF_to_MBS_Fil/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

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

  
[DynaPDF.ClipPath](DynaPDFClipPath.md) - [DynaPDF.ClosePath](DynaPDFClosePath.md)

[HTML Version](DynaPDFCloseImportFile.shtml)