DynaPDF.CheckEmbeddedFileCheckSum
---------------------------------

Checks the checksum for an embedded file.

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

MBS( "DynaPDF.CheckEmbeddedFileCheckSum"; PDF; Handle ) 

**MBS**( **"DynaPDF.CheckEmbeddedFileCheckSum";** /\* Checks the checksum for an embedded file. \*/  
**$PDF**; /\* The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). \*/   
**$Handle**) /\* The index number for the embedded file. Range from 0 to [DynaPDF.GetEmbeddedFileCount](DynaPDFGetEmbeddedFileCount.md).e.g. 0 \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| PDF | The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). | $pdf |
| Handle | The index number for the embedded file. Range from 0 to [DynaPDF.GetEmbeddedFileCount](DynaPDFGetEmbeddedFileCount.md). | 0 |

### Result

Returns status or error.

### Description

Checks the checksum for an embedded file.  
Returns 1 for checksum okay, 0 for checksum invalid and -1 if no checksum is present.  
  
You may detect bad bytes e.g. from a disk reading error or transmitting error.  
Since the checksum is just MD5, a malicious actor could swap out the content of the embedded file and fill in a new correct checksum.  
### Examples

Query name, content and check checksum:

 Set Variable \[ $name ; Value: MBS ( "[DynaPDF.GetEmbeddedFile](DynaPDFGetEmbeddedFile.md)"; $PDF ; $Index ; "name" ) \]  
Set Variable \[ $file ; Value: MBS ( "[DynaPDF.GetEmbeddedFileAsContainer](DynaPDFGetEmbeddedFileAsContainer.md)"; $PDF ; $Index ) \]  
Set Variable \[ $checksumOkay ; Value: MBS ( "DynaPDF.CheckEmbeddedFileCheckSum"; $PDF ; $Index ) \]  
### See also

- [DynaPDF.GetEmbeddedFile](DynaPDFGetEmbeddedFile.md)
- [DynaPDF.GetEmbeddedFileAsContainer](DynaPDFGetEmbeddedFileAsContainer.md)
- [DynaPDF.GetEmbeddedFileCount](DynaPDFGetEmbeddedFileCount.md)
- [DynaPDF.New](DynaPDFNew.md)

### Release notes

- **Version 15.0**
    - Added [DynaPDF.CheckEmbeddedFileCheckSum](https://www.mbsplugins.eu/DynaPDFCheckEmbeddedFileCheckSum.shtml) function.

### Blog Entries

- [Electronic invoices in FileMaker](https://www.mbsplugins.de/archive/2025-03-06/Electronic_invoices_in_FileMak/monkeybreadsoftware_blog_filemaker)
- [Elektronische Rechnungen in FileMaker](https://www.mbsplugins.de/archive/2025-03-04/Elektronische_Rechnungen_in_Fi/monkeybreadsoftware_blog_filemaker)
- [New in MBS FileMaker Plugin 15.0](https://www.mbsplugins.de/archive/2025-01-21/New_in_MBS_FileMaker_Plugin_15/monkeybreadsoftware_blog_filemaker)
- [Neues MBS Plugin 15.0 für Claris FileMaker](https://www.mbsplugins.de/archive/2025-01-14/Neues_MBS_Plugin_150_für_Clar/monkeybreadsoftware_blog_filemaker)
- [MBS Plugin 15.0 for Claris FileMaker](https://www.mbsplugins.de/archive/2025-01-14/MBS_Plugin_150_for_Claris_File/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 15.0pr7](https://www.mbsplugins.de/archive/2025-01-01/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 27th December 2024 , last changed 31st December 2024

  
[DynaPDF.CheckConformance](DynaPDFCheckConformance.md) - [DynaPDF.CheckFieldNames](DynaPDFCheckFieldNames.md)

[HTML Version](DynaPDFCheckEmbeddedFileCheckSum.shtml)