DynaPDF.CheckConformance
------------------------

Converts a PDF file to a specific PDF standard according to the parameter Type.

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

MBS( "DynaPDF.CheckConformance"; PDF; Type { ; Options } ) 

**MBS**( **"DynaPDF.CheckConformance";** /\* Converts a PDF file to a specific PDF standard according to the parameter Type. \*/  
**$PDF**; /\* The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). \*/   
**$Type**; /\* PDF Version to check.   
This can be "PDFA 1b 2005", "PDFA 2b", "PDFA 2u", "PDFA 3b", "PDFA 3u", "Normalize".  
  
ZUGFeRD 1.0:  
\* ZUGFeRD Basic  
\* ZUGFeRD Comfort  
\* ZUGFeRD Extended  
  
ZUGFeRD 2.0:  
\* ZUGFeRD2 Minimum  
\* ZUGFeRD2 Basic  
\* ZUGFeRD2 Basic WL  
\* ZUGFeRD2 Comfort  
\* ZUGFeRD2 Extended  
  
Factur-X / ZUGFeRD 2.1:  
\* FacturX Minimum  
\* FacturX Basic  
\* FacturX Basic WL  
\* FacturX Comfort  
\* FacturX Extended  
\* FacturX XRechnung  
  
Added "PDFA/4", "PDFA/4e" and "PDFA/4f" in v13.5. The e version includes 3D contents in rich media annotations and the f version includes file attach annotations.e.g. "PDFA 1b 2005" \*/   
**$Options**) /\* Optional; Various options. If no options are specified, we use default.   
Can be specified as number or a texts.e.g. "DeletePostscript¶DeleteOPIComments" \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| PDF | The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). | $pdf |  |
| Type | PDF Version to check.    This can be "PDFA 1b 2005", "PDFA 2b", "PDFA 2u", "PDFA 3b", "PDFA 3u", "Normalize".      ZUGFeRD 1.0:   \* ZUGFeRD Basic   \* ZUGFeRD Comfort   \* ZUGFeRD Extended      ZUGFeRD 2.0:   \* ZUGFeRD2 Minimum   \* ZUGFeRD2 Basic   \* ZUGFeRD2 Basic WL   \* ZUGFeRD2 Comfort   \* ZUGFeRD2 Extended      Factur-X / ZUGFeRD 2.1:   \* FacturX Minimum   \* FacturX Basic   \* FacturX Basic WL   \* FacturX Comfort   \* FacturX Extended   \* FacturX XRechnung      Added "PDFA/4", "PDFA/4e" and "PDFA/4f" in v13.5. The e version includes 3D contents in rich media annotations and the f version includes file attach annotations. | "PDFA 1b 2005" |  |
| Options | Various options. If no options are specified, we use default.    Can be specified as number or a texts. | "DeletePostscript¶DeleteOPIComments" | Optional |

### Result

Returns result or error.

### Description

Converts a PDF file to a specific PDF standard according to the parameter Type.  
This function can be used to convert any PDF to PDF/A.  
The conversion of arbitrary imported PDF files to PDF/A requires a separate license of the PDF/A Extension (extra purchase in addition to Pro license).  
See dynapdf\_help.pdf manual file for more details on this function.  
  
You can pass those texts for options:  
| Default | Default options. |
|---|---|
| EmbedSubsets | Embed Subsets |
| DeleteTransferFuncs | Delete Transfer Functions |
| DeleteMultiMediaContents | Delete MultiMedia content |
| DeleteActionsAndScripts | Delete Actions and Scripts |
| DeleteInvRenderingIntent | Delete Invisible Rendering Intent |
| FlattenFormFields | Flatten form fields |
| ReplaceV4ICCProfiles | Replace V4 ICC Profiles |
| DeleteEmbeddedFiles | Delete embedded files |
| DeleteOPIComments | Delete OPI comments. |
| DeleteSignatures | Delete signatures. |
| DeletePostscript | Delete Postscript XObjects. Rarely used and such Postscript fragments are meaningful on a Postscript device only. It is usually safe to delete such objects. |
| DeleteAlternateImages | Alternate images are seldom used and prohibited in PDF/A. |
| ReComprJPEG2000Images | Recompression results usually in larger images. It is often better to keep such files as is. |
| ResolveOverprint | PDF/A 2 and 3. Set the overprint mode to 0 if overprint mode = 1 and if overprinting for fill or stroke is true and if an ICCBased CMYK color space is used. Note that DeviceCMYK is treated as ICCBased color space due to implicit color conversion rules. |
| DeleteAppEvents | PDF/A 2 and 3. Application events are prohibited in PDF/A. The view state will be applied. |
| ApplyExportState | Meaningful only if coDeleteAppEvents is set. Apply the export state. |
| ApplyPrintState | Meaningful only if coDeleteAppEvents is set. Apply the print state. |
| DeleteReplies | Delete annotation replies. If absent, replies will be converted to regular text annotations. |
| ReplCCITTFaxWithFlate | Replace CCITT Fax compression with Flate. |
| DeleteHalftones | Delete halftone screens. |
| FlattenLayers | Flatten layers if any. |
| DeletePresentation | Presentations are prohibited in PDF/A 2 and 3. |
| NoFontEmbedding | If this flag is set no valid PDF/A file will be produced! |
| FlushPages | Write converted pages directly into the output file to reduce the memory usage. |
| AllowDeviceSpaces | If set, device color spaces will not be replaced with ICC based color spaces. This flag is meaningful for normalization only. |
| MakeLayerVisible | PDF/A 2 and 3 prohibit invisible layers. Layers can also be flattened if this is no option. |
| CheckImages | Images will be decompressed to identify damages. |
| DeleteDamagedImages | Meaningful only if CheckImages is set. |
| RepairDamagedImages | Meaningful only if coCheckImages is set. If set, try to recompress a damaged image. The new image is maybe incomplete but error free. This flag can be combined with coDeleteDamagedImages to delete the image if recompression fails. |
| AllowDeviceSpaces | If set, device color spaces will not be replaced with ICC based color spaces. This flag is meaningful for normalization only. |
| ResetAnnotAppearance | If set, appearance streams of annotations are rebuild before executing CheckConformance(). |
| DefaultNormalize | Common default flags for different PDF/A versions. |
| DefaultPDFA1 | The ability to flatten layers was added after coDefault was defined. |
| DefaultPDFA2 | Presentations are prohibited in PDF/A 2 and PDF/A 3. |
| DefaultPDFA3 | Embedded files are allowed in PDF/A 3. |
| DefaultPDFA4 | Embedded files are allowed in PDF/A 4. |

  
The result is either an error message or a number &gt;= 0:  
  
If the PDF file is compatible to PDF/A 1b the function returns one of the following values:  
  
0: The PDF file is fully compatible to PDF/A 1b. Close the file and finished.  
1: A RGB ICC profile must be added to the document with [DynaPDF.AddOutputIntent](DynaPDFAddOutputIntent.md).  
2: A CMYK ICC profile must be added to the document with [DynaPDF.AddOutputIntent](DynaPDFAddOutputIntent.md).  
3: A Gray, RGB, or CMYK ICC profile must be added to the document with [DynaPDF.AddOutputIntent](DynaPDFAddOutputIntent.md). DeviceGray compatible ICC profiles are rarely available since this is mostly just a gamma table. However, you can use a RGB or CMYK profile instead (a sRGB profile is preferred due to the smaller size).  
See also [CheckConformance](https://www.monkeybreadsoftware.com/DynaPDF-Manual/CheckConformance.shtml) function in DynaPDF manual.

### Examples

Check conformance for ZUGFeRD Extended:

 MBS ( "DynaPDF.CheckConformance"; $pdf ; "ZUGFeRD Extended"; "Default" )  
Check conformance only:

 MBS ("DynaPDF.CheckConformance"; $pdf ; "PDFA 1b 2005"; 0)  
Check conformance for ZUGFeRD with Pro license:

 MBS ("DynaPDF.CheckConformance"; $pdf ; "ZUGFeRD Basic")   
// using default options  
Check conformance for ZUGFeRD with Lite license:

 MBS ("DynaPDF.CheckConformance"; $pdf ; "ZUGFeRD Basic"; 0)   
// no corrections  
### See also

- [DynaPDF.AddOutputIntent](DynaPDFAddOutputIntent.md)
- [DynaPDF.AddOutputIntentEx](DynaPDFAddOutputIntentEx.md)
- [DynaPDF.New](DynaPDFNew.md)
- [DynaPDF.SetReplaceICCProfile](DynaPDFSetReplaceICCProfile.md)
- [DynaPDF.SetReplaceICCProfileData](DynaPDFSetReplaceICCProfileData.md)

### Release notes

- **Version 16.0**
    - Fixed a problem with DynaPDF where it crashed on saving after calling [DynaPDF.CheckConformance](https://www.mbsplugins.eu/DynaPDFCheckConformance.shtml).
- **Version 13.5**
    - Added "DefaultPDFA4" flag for [DynaPDF.CheckConformance](https://www.mbsplugins.eu/DynaPDFCheckConformance.shtml) function.
    - Added "PDF/A 4", "PDF/A 4e" and "PDF/A 4f" conformation types for [DynaPDF.CheckConformance](https://www.mbsplugins.eu/DynaPDFCheckConformance.shtml) function.
- **Version 12.2**
    - Fixed problem with [DynaPDF.CheckConformance](https://www.mbsplugins.eu/DynaPDFCheckConformance.shtml) not parsing options right, e.g. for DefaultPDFA3.
- **Version 12.1**
    - Added PDF/A 2u and PDF/A 3u for [DynaPDF.CheckConformance](https://www.mbsplugins.eu/DynaPDFCheckConformance.shtml) function.
- **Version 11.2**
    - Added DefaultNormalize, DefaultPDFA1, DefaultPDFA2, DefaultPDFA3 flags to [DynaPDF.CheckConformance](https://www.mbsplugins.eu/DynaPDFCheckConformance.shtml) function.
- **Version 10.5**
    - Added ZUGFeRD 2.x names for the Conformance Types enum for [DynaPDF.CheckConformance](https://www.mbsplugins.eu/DynaPDFCheckConformance.shtml) function.

### Example Databases

- [DynaPDF/Convert to PDFA](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/DynaPDF/Convert%20to%20PDFA.shtml#1ScriptAnchor_)
- [DynaPDF/Create Text as PDFA](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/DynaPDF/Create%20Text%20as%20PDFA.shtml#2ScriptAnchor_)
- [DynaPDF/Scan with WIA to PDF](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/DynaPDF/Scan%20with%20WIA%20to%20PDF.shtml#12ScriptAnchor_)
- [DynaPDF/ZUGFeRD and Facture-X/ZUGFeRD Invoice](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/DynaPDF/ZUGFeRD%20and%20Facture-X/ZUGFeRD%20Invoice.shtml#2ScriptAnchor_)
- [DynaPDF/ZUGFeRD and Facture-X/ZUGFeRD Rechnung erstellen](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/DynaPDF/ZUGFeRD%20and%20Facture-X/ZUGFeRD%20Rechnung%20erstellen.shtml#9ScriptAnchor_)

### Blog Entries

- [MBS FileMaker Plugin, version 15.6pr1](https://www.mbsplugins.de/archive/2025-12-01/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)
- [Unlocking the Power of PDFs in FileMaker with DynaPDF and the MBS FileMaker Plugin](https://www.mbsplugins.de/archive/2024-09-16/Unlocking_the_Power_of_PDFs_in/monkeybreadsoftware_blog_filemaker)
- [MBS Plugin 13.5 for Claris FileMaker](https://www.mbsplugins.de/archive/2023-11-07/MBS_Plugin_135_for_Claris_File/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 13.5pr5](https://www.mbsplugins.de/archive/2023-10-19/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin 12.1 - More than 6700 Functions In One Plugin](https://www.mbsplugins.de/archive/2022-03-15/MBS_FileMaker_Plugin_121_-_Mor/monkeybreadsoftware_blog_filemaker)
- [Things you can do with DynaPDF](https://www.mbsplugins.de/archive/2021-07-02/Things_you_can_do_with_DynaPDF/monkeybreadsoftware_blog_filemaker)
- [FileMaker with ZUGFeRD 2.0 and Factur-X](https://www.mbsplugins.de/archive/2019-06-14/FileMaker_with_ZUGFeRD_20_and_/monkeybreadsoftware_blog_filemaker)
- [How to Convert a PDF document to a PDF/A](https://www.mbsplugins.de/archive/2019-03-18/How_to_Convert_a_PDF_document_/monkeybreadsoftware_blog_filemaker)
- [Creating PDF/A in FileMaker with ZUGFeRD standard](https://www.mbsplugins.de/archive/2018-04-05/Creating_PDFA_in_FileMaker_wit/monkeybreadsoftware_blog_filemaker)
- [Creating PDF/A in FileMaker with ZUGFeRD standard](https://www.mbsplugins.de/archive/2017-03-07/Creating_PDFA_in_FileMaker_wit/monkeybreadsoftware_blog_filemaker)

### FileMaker Magazin

- [Ausgabe 1/2018, Seite 24 bis 25](https://filemaker-magazin.de/neuigkeit/3981-Appetithappen-FMM_201801)

This function checks for a license.

Created 2nd November 2014 , last changed 17th December 2024

  
[DynaPDF.ChangeSeparationColor](DynaPDFChangeSeparationColor.md) - [DynaPDF.CheckEmbeddedFileCheckSum](DynaPDFCheckEmbeddedFileCheckSum.md)

[HTML Version](DynaPDFCheckConformance.shtml)