---
title: "DataMatrix barcodes in a PDF"
published_at: "2012-04-13T05:12:00+00:00"
modified_at: "2025-04-23T11:18:26+00:00"
url: "https://www.syncfusion.com/blogs/post/datamatrix-barcodes-in-a-pdf"
excerpt: "I have had some questions about this topic and thought it a good time to post up a sample showing just how easy it is. Please download the sample here: DataMatrix sample. The WPF team made this sample and it..."
taxonomy_category:
  - "Barcode"
  - "Development"
  - "PDF"
  - "WPF"
taxonomy_post_tag:
  - "barcode"
  - "datamatrix"
  - "PDF"
---

# DataMatrix barcodes in a PDF

[Chad Church](https://www.syncfusion.com/blogs/author/chadc)

![Image](https://www.syncfusion.com/blogs/wp-content/uploads/2018/08/datametrix_pdf_3cb21fa6.png)


I have had some questions about this topic and thought it a good time to post up a sample showing just how easy it is. Please download the sample here: [DataMatrix sample](https://www.syncfusion.com/downloads/Support/DirectTrac/93245/wpf_pdf_DataMatrix_barcode265875934.zip)
.

The WPF team made this sample and it shows how to create the DataMatrix barcode.

```
  String text = "TYPE 3523 - ETWS/N FE- SDFHW 06/08";
            PdfDataMatrixBarcode dataMatrixBarcode = New PdfDataMatrixBarcode(text);
            // rectangular matrix
            dataMatrixBarcode.Size = PdfDataMatrixSize.Size16x48;
            dataMatrixBarcode.XDimension = 4;
            dataMatrixBarcode.Draw(page, New PointF(25, 300));
```
