# File type specifications

## PDF
**Specification Validated Against:**
- PDF Reference (third edition) Adobe Portable Document Format Version 1.7.

**Note:** Glasswall supports PDF Reference (third edition) Adobe Portable Document Format from Version 1.3.

## Images
There are no content management switches for any of the image file formats. Images embedded in a document that do not conform to the specification will result in the original document being quarantined.

### JPEG
**Specification Validated Against:**
- JPEG File Interchange Format, Version 1.02 September 1, 1992
- JP2 for ISO/IEC 15444-1 (JPEG 2000)
- JPX for ISO/IEC 15444-2 (JPEG 2000)

### GIF
**Specification Validated Against:**
- Graphics Interchange Format, Version GIF 87a
- Graphics Interchange Format, Version GIF 89a

### PNG
**Specification Validated Against:**
- Portable Network Graphics (PNG): Functional specification. ISO/IEC 15948:2003 (E)

### EMF
**Specification Validated Against:**
- [MS-EMF]: Enhanced Metafile Format: Open Specifications Documentation. v20151016
- [MS-EMFPLUS]: Enhanced Metafile Format Plus Extensions: Open Specifications Documentation. V20121017

### WMF
**Specification Validated Against:**
- [MS-WMF]: Windows Metafile Format: Open Specifications Documentation. v20121017

### TIFF and GeoTIFF
**Specification Validated Against:**
- TIFF 6.0 Specification: Final – June 3, 1992
- GeoTIFF Format Specification - Specification Version: 1.8.1

### BMP
**Specification Validated Against:**
- BMP is covered by the WMF file specification.

## Binary Office
### Processing specific to Binary Office in Protect mode
- The content management switch `GWFILE_MANAGE_REMOVE_MACROS` when set to **sanitise** in Protect mode removes the VBA script from the regenerated file but copies over the macro container. This can give the impression that the macros have not been deleted.
- The content management switch `GWFILE_MANAGE_REMOVE_EMBEDDED_FILES` when set to **sanitise** in Protect mode follows these rules:
  1. If the embedded file is supported by Glasswall, it will be processed as a standalone file, including its own configuration management policies. If it can be regenerated, it will be re-embedded; otherwise, the parent file will be marked as non-conforming.
  2. If the embedded file is **not** supported (e.g., .mdb or .dat files), it will be removed.
- Embedded files are validated to five levels deep.

## DOC
**Specifications Validated Against:**
- [MS-DOC]: Word (.doc) Binary File Format - Microsoft Corporation, 2011, v20121003 to [MS-DOC]: Word (.doc) Binary File Format - Corporation, 2017, v20170112
- Office Common Data Types and Objects Structure Specification - Microsoft Corporation, 2011, v20110608
- Office Document Cryptography Structure Specification - Microsoft Corporation, 2011, v20110608
- Office VBA File Format Structure Specification - Microsoft Corporation, 2011, v20110608

**Non-Supported Specifications:**
- Word 95 and earlier versions (Word 1 to Word 6) are not supported. Processing these file types will result in an issue being reported in the XML report in **Analysis mode** and the file **not being regenerated** in **Protect mode**.
- Word files containing Apple Mac or LibreOffice-specific file features will be marked as non-conformant.

## XLS
**Specifications Validated Against:**
- [MS-XLS]: Excel Binary File Format (.xls) Structure Specification - Microsoft Corporation, v20141018 to v20161017.
- Spreadsheet Data Model File Format
- Office Graph Binary File Format v20141019

**Non-Supported Specifications:**
- Excel 95 and earlier versions are not supported. Processing these file types will result in an issue being reported in the XML report in **Analysis mode** and the file **not being regenerated** in **Protect mode**.
- Excel files containing Apple Mac or LibreOffice-specific file features will be marked as non-conformant.

## PPT
**Specifications Validated Against:**
- [MS-PPT]: PowerPoint (.ppt) Binary File Format - Microsoft Corporation, v20121003 to v20160922.

**Non-Supported Specifications:**
- PowerPoint 95 and earlier versions are not supported. Processing these file types will result in an issue being reported in the XML report in **Analysis mode** and the file **not being regenerated** in **Protect mode**.
- PowerPoint files containing Apple Mac or LibreOffice-specific file features will be marked as non-conformant.

## XML Office
### Processing specific to XML Office in Protect mode
- If an XML Office file has another XML Office file embedded inside it and the `GWFILE_MANAGE_REMOVE_EMBEDDED_FILES` is set to **sanitise**, the embedded file will be **removed** when a new file is regenerated.
- Office XML files are stored as **zipped archives**. If the zipped file is less than 10MB, when extracted, an individual stream exceeding 10MB:
  - **32-bit DLL:** The file is marked as **non-conforming** and will not be processed further.
  - **64-bit DLL:** Streams up to **50MB** are processed.

## Office 2010
**Specifications Validated Against:**
- [ECMA-376 5th edition Part 1](https://ecma-international.org/wp-content/uploads/ECMA-376-1_5th_edition_december_2016.zip)
- [ECMA-376 5th edition Part 2](https://ecma-international.org/wp-content/uploads/ECMA-376-2_5th_edition_december_2021.zip)
- [ECMA-376 5th edition Part 3](https://ecma-international.org/wp-content/uploads/ECMA-376-3_5th_edition_december_2015.zip)
- [ECMA-376 5th edition Part 4](https://ecma-international.org/wp-content/uploads/ECMA-376-4_5th_edition_december_2016.zip)

## Office 2013
**Specifications Validated Against:**
- Word (.docx) Extensions to the Office Open XML SpreadsheetML File Format
- Excel (.xlsx) Extensions to the Office Open XML SpreadsheetML File Format
- PowerPoint (.pptx) Extensions to the Office Open XML SpreadsheetML File Format
- Office Drawing Extensions to the Office Open XML Structure

**Non-Supported Specifications:**
- Office 2010 or Office 2013 files containing Apple Mac or LibreOffice-specific file features may be marked as **non-conformant** or the components may be **removed** from the file.

## Other
### WAV
**Specifications Validated Against:**
- Multimedia Programming Interface and Data Specifications 1.0 August 1991.

### MPG
**Specifications Validated Against:**
- ISO/IEC 13818-1:2000(E). Second edition 2000-12-01

### MP3
**Specifications Validated Against:**
- MPEG Layer III audio encoding is defined in two ISO/IEC specification families:
  - **MPEG-1:** ISO/IEC 11172-3
  - **MPEG-2:** ISO/IEC 13818-3

### MP4
**Specifications Validated Against:**
- ISO/IEC 14496-12:2005(E). Part 12: Corrected version 2005-10-01.

### PE and COFF
**Specifications Validated Against:**
- Microsoft Portable Executable and Common Object File Format Specification Revision 6.0 – February 1999.

### ELF
**Specifications Validated Against:**
- Tool Interface Standard (TIS) Executable and Linking Format (ELF) Specification Version 1.2. May 1995
- ELF-64 Object File Format Version 1.2 Draft 2. May 27, 1998.

### Mach-O
**Specifications Validated Against:**
- OS X ABI Mach-O File Format Reference. 2009-02-04.