PDFView4NET WPF Edition
AlternateData Property
Example 




O2S.Components.PDFView4NET.Graphics.Barcodes Namespace > PDFBidimensionalBarcode Class : AlternateData Property
Gets or sets the alternate data to encode as a barcode.
Syntax
'Declaration
 
Public Property AlternateData As Byte()
'Usage
 
Dim instance As PDFBidimensionalBarcode
Dim value() As Byte
 
instance.AlternateData = value
 
value = instance.AlternateData
public byte[] AlternateData {get; set;}
public: __property byte[]* get_AlternateData();
public: __property void set_AlternateData( 
   byte[][]* value
);
public:
property array<byte>^ AlternateData {
   array<byte>^ get();
   void set (    array<byte>^ value);
}

Property Value

A byte array specifying the data to be encoded as a barcode.
Remarks
Barcodes were designed to work with 8bit characters. Because .NET strings are Unicode, when they are converted to 8bit characters (using Windows 1252 encoding) the Unicode characters are removed. This property allows you to specify directly the byte array to encode.
If both PDFBarcode.Data and AlternateData properties are specified, the AlternateData property is used.
Example
The following line of code shows how to encode a Unicode string:
...
barcode.AlternateData = Encoding.Unicode.GetBytes("my unicode string");
...
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

PDFBidimensionalBarcode Class
PDFBidimensionalBarcode Members