Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,34 @@ RadPdfProcessing allows you to embed file streams into the document. The content
|Minimum Version|Q1 2026|
|----|----|

RadPdfProcessing allows you to set the correct MIME type when embedding the file into the PDF. This is especially important for standards like PDF/A-3 and Factur-X, which require strict metadata and MIME type declarations for embedded files.

**Set the MIME Type**
RadPdfProcessing allows you to set the MIME type when embedding a file into a PDF document via the `MimeType` property of `EmbeddedFile`. The `MimeType` property accepts any standard IANA MIME type string. If not explicitly specified, the default value is `"application/octet-stream"`.

Declaring the correct MIME type along with the proper file extension in the `Name` property ensures that PDF viewers (such as Adobe Acrobat) correctly identify the attachment format, associate it with the right host application, and meet requirements for standards like PDF/A-3 and Factur-X.

#### Common Supported MIME Types

The following table lists common MIME types used when embedding attachments:

| File Format | File Extension | MIME Type |
|---|---|---|
| PDF Document | `.pdf` | `application/pdf` |
| OpenXML Word Document | `.docx` | `application/vnd.openxmlformats-officedocument.wordprocessingml.document` |
| Microsoft Word 97–2003 | `.doc` | `application/msword` |
| OpenXML Excel Spreadsheet | `.xlsx` | `application/vnd.openxmlformats-officedocument.spreadsheetml.sheet` |
| Microsoft Excel 97–2003 | `.xls` | `application/vnd.ms-excel` |
| Plain Text | `.txt` | `text/plain` |
| XML Document | `.xml` | `application/xml` or `text/xml` |
| CSV Spreadsheet | `.csv` | `text/csv` |
| PNG Image | `.png` | `image/png` |
| JPEG Image | `.jpg`, `.jpeg` | `image/jpeg` |
| Generic Binary Data (Default) | *any* | `application/octet-stream` |

>important Notice the distinction between Office Open XML formats and legacy binary formats:
>* `.docx` uses `application/vnd.openxmlformats-officedocument.wordprocessingml.document`, while legacy `.doc` uses `application/msword`.
>* `.xlsx` uses `application/vnd.openxmlformats-officedocument.spreadsheetml.sheet`, while legacy `.xls` uses `application/vnd.ms-excel`.
>Assigning `application/msword` to a `.docx` file or omitting the extension in the `Name` property may cause PDF viewers to fail when launching the attachment.

**Example: Embedding Files with Different MIME Types**

<snippet id='pdf-set-mime-type'/>

Expand Down