CIFilter_Generator_PDF417Barcode - linhay/Stem GitHub Wiki
CIFilter.Generator.PDF417Barcode
Discussion Generates an output image representing the input data according to the ISO 15438 standard. PDF417 codes are commonly used in postage, package tracking, personal identification documents, and coffeeshop membership cards. The width and height of each module (square dot) of the code in the output image is one point. To create a PDF417 code from a string or URL, convert it to an NSData object using the NSISOLatin1StringEncoding string encoding.
struct PDF417Barcode: CIFilterContainerProtocol
Available in OS X v10.11 and later and in iOS 9 and later.
Inheritance
Initializers
init()
init()
Properties
filter
var filter: CIFilter
message
The data to be encoded as a barcode. An NSData object whose display name is Message.
var message: Data?
minWidth
The minimum width of the barcode’s data area, in pixels. An NSNumber object whose display name is MinWidth. Default value: 0.00 Minimum: 56.00 Maximum: 583.00 Slider minimum: 56.00 Slider maximum: 583.00 Identity: 0.00
var minWidth: NSNumber
maxWidth
The maximum width of the barcode’s data area, in pixels. An NSNumber object whose display name is MaxWidth. Default value: 0.00 Minimum: 56.00 Maximum: 583.00 Slider minimum: 56.00 Slider maximum: 583.00 Identity: 0.00
var maxWidth: NSNumber
minHeight
The minimum height of the barcode’s data area, in pixels. An NSNumber object whose display name is MinHeight. Default value: 0.00 Minimum: 13.00 Maximum: 283.00 Slider minimum: 13.00 Slider maximum: 283.00 Identity: 0.00
var minHeight: NSNumber
maxHeight
The maximum height of the barcode’s data area, in pixels. An NSNumber object whose display name is MaxHeight. Default value: 0.00 Minimum: 13.00 Maximum: 283.00 Slider minimum: 13.00 Slider maximum: 283.00 Identity: 0.00
var maxHeight: NSNumber
dataColumns
The number of data columns in the generated code. If zero, the generator uses a number of columns based on the width, height, and aspect ratio. An NSNumber object whose display name is DataColumns. Default value: 0.00 Minimum: 1.00 Maximum: 30.00 Slider minimum: 1.00 Slider maximum: 30.00 Identity: 0.00
var dataColumns: NSNumber
rows
The number of data rows in the generated code. If zero, the generator uses a number of rows based on the width, height, and aspect ratio. An NSNumber object whose display name is Rows. Default value: 0.00 Minimum: 3.00 Maximum: 90.00 Slider minimum: 3.00 Slider maximum: 90.00 Identity: 0.00
var rows: NSNumber
preferredAspectRatio
The preferred ratio of width over height for the generated barcode. The generator approximates this with an actual aspect ratio based on the data and other parameters you specify. An NSNumber object whose display name is PreferredAspectRatio. Default value: 0.00 Minimum: 0.00 Maximum: 9223372036854775808.00 Slider minimum: 0.00 Slider maximum: 9223372036854775808.00 Identity: 0.00
var preferredAspectRatio: NSNumber
compactionMode
An option that determines which method the generator uses to compress data. Automatic. The generator automatically chooses a compression method. This option is the default. Numeric. Valid only when the message is an ASCII-encoded string of digits, achieving optimal compression for that type of data. Text. Valid only when the message is all ASCII-encoded alphanumeric and punctuation characters, achieving optimal compression for that type of data. Byte. Valid for any data, but least compact. An NSNumber object whose display name is CompactionMode. Default value: 0.00 Minimum: 0.00 Maximum: 3.00 Slider minimum: 0.00 Slider maximum: 3.00 Identity: 0.00
var compactionMode: NSNumber?
compactStyle
A Boolean value that determines whether to omit redundant elements to make the generated barcode more compact. An NSNumber object whose display name is CompactStyle. Default value: 0.00 Minimum: 0.00 Maximum: 1.00 Slider minimum: 0.00 Slider maximum: 1.00 Identity: 0.00
var compactStyle: NSNumber
correctionLevel
An integer between 0 and 8, inclusive, that determines the amount of redundancy to include in the barcode’s data to prevent errors when the barcode is read. If unspecified, the generator chooses a correction level based on the size of the message data. An NSNumber object whose display name is CorrectionLevel. Default value: 0.00 Minimum: 0.00 Maximum: 8.00 Slider minimum: 0.00 Slider maximum: 8.00 Identity: 0.00
var correctionLevel: NSNumber
alwaysSpecifyCompaction
A Boolean value that determines whether to include information about the compaction mode in the barcode even when such information is redundant. (If a PDF417 barcode does not contain compaction mode information, a reader assumes text-based compaction. Some barcodes include this information even when using text-based compaction.) An NSNumber object whose display name is AlwaysSpecifyCompaction. Default value: 0.00 Minimum: -9223372036854775808.00 Maximum: 9223372036854775808.00 Slider minimum: -9223372036854775808.00 Slider maximum: 9223372036854775808.00 Identity: 0.00
var alwaysSpecifyCompaction: NSNumber