corelibraries-devexpress-dot-xtraprinting-dot-barcode-dot-pdf417generator-6289d2bf.md
Gets or sets whether text or binary mode should be used to encode the barcode’s data.
Namespace : DevExpress.XtraPrinting.BarCode
Assembly : DevExpress.Printing.v25.2.Core.dll
NuGet Package : DevExpress.Printing.Core
[DefaultValue(PDF417CompactionMode.Text)]
public PDF417CompactionMode CompactionMode { get; set; }
<DefaultValue(PDF417CompactionMode.Text)>
Public Property CompactionMode As PDF417CompactionMode
| Type | Default | Description |
|---|---|---|
| PDF417CompactionMode | Text |
A PDF417CompactionMode enumeration value.
|
Available values:
| Name | Description |
|---|---|
| Binary |
Specifies that the byte array should be coded into the PDF417 bar code.
| | Text |
Specifies that the textual information should be coded into the PDF417 bar code.
|
If the data encoded in text mode contains invalid characters for PDF417, switch to binary mode to interpret the data as a sequence of bytes and use this sequence to encode the barcode.
Set the barcode’s CompactionMode property to Binary to enable binary mode. To specify binary data to encode the barcode, do one of the following:
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the CompactionMode property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
reporting-add-a-bar-code-to-a-report/CS/Form1.cs#L447
((PDF417Generator)barCode.Symbology).Columns = 1;
((PDF417Generator)barCode.Symbology).CompactionMode = PDF417CompactionMode.Text;
((PDF417Generator)barCode.Symbology).ErrorCorrectionLevel = ErrorCorrectionLevel.Level2;
See Also