Class: DynamicPDFApi::Pdf417BarcodeElement
- Inherits:
-
Dim2BarcodeElement
- Object
- Element
- BarcodeElement
- Dim2BarcodeElement
- DynamicPDFApi::Pdf417BarcodeElement
- Defined in:
- lib/ruby_client/Elements/Pdf417BarcodeElement.rb
Overview
Represents Pdf417 barcode element.
This class can be used to generate Pdf417 barcode symbol.
Instance Attribute Summary collapse
-
#_type ⇒ Object
Returns the value of attribute _type.
-
#columns ⇒ Object
Gets or sets the columns of the barcode.
-
#compact_pdf417 ⇒ Object
Gets or sets the Compact Pdf417.
-
#compaction ⇒ Object
Gets or sets the type of compaction.
-
#error_correction ⇒ Object
Gets or sets the error correction level for the PDF417 barcode.
-
#process_tilde ⇒ Object
Gets or Sets a boolean indicating whether to process the tilde character.
-
#y_dimension ⇒ Object
Gets or sets the YDimension of the barcode.
Attributes inherited from Dim2BarcodeElement
Attributes inherited from BarcodeElement
#_color_name, #value, #x_dimension
Attributes inherited from Element
#_input_value, #_resource, #_text_font, #even_pages, #odd_pages, #placement, #x_offset, #y_offset
Instance Method Summary collapse
-
#initialize(value, columns, placement = ElementPlacement::TOP_LEFT, x_offset = 0, y_offset = 0) ⇒ Pdf417BarcodeElement
constructor
Initializes a new instance of the Pdf417BarcodeElement class.
- #to_json(_options = {}) ⇒ Object
Methods inherited from BarcodeElement
Constructor Details
#initialize(value, columns, placement = ElementPlacement::TOP_LEFT, x_offset = 0, y_offset = 0) ⇒ Pdf417BarcodeElement
Initializes a new instance of the Pdf417BarcodeElement class.
22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/ruby_client/Elements/Pdf417BarcodeElement.rb', line 22 def initialize(value, columns, placement= ElementPlacement::TOP_LEFT, x_offset = 0, y_offset = 0) @columns = nil @y_dimension = nil @process_tilde = nil @compact_pdf417 = nil @error_correction = nil @compaction = nil super(value, placement, x_offset, y_offset) @columns = columns @_type = ElementType::PDF417_BARCODE end |
Instance Attribute Details
#_type ⇒ Object
Returns the value of attribute _type.
35 36 37 |
# File 'lib/ruby_client/Elements/Pdf417BarcodeElement.rb', line 35 def _type @_type end |
#columns ⇒ Object
Gets or sets the columns of the barcode.
40 41 42 |
# File 'lib/ruby_client/Elements/Pdf417BarcodeElement.rb', line 40 def columns @columns end |
#compact_pdf417 ⇒ Object
Gets or sets the Compact Pdf417.
54 55 56 |
# File 'lib/ruby_client/Elements/Pdf417BarcodeElement.rb', line 54 def compact_pdf417 @compact_pdf417 end |
#compaction ⇒ Object
Gets or sets the type of compaction.
62 63 64 |
# File 'lib/ruby_client/Elements/Pdf417BarcodeElement.rb', line 62 def compaction @compaction end |
#error_correction ⇒ Object
Gets or sets the error correction level for the PDF417 barcode.
58 59 60 |
# File 'lib/ruby_client/Elements/Pdf417BarcodeElement.rb', line 58 def error_correction @error_correction end |
#process_tilde ⇒ Object
Gets or Sets a boolean indicating whether to process the tilde character.
50 51 52 |
# File 'lib/ruby_client/Elements/Pdf417BarcodeElement.rb', line 50 def process_tilde @process_tilde end |
#y_dimension ⇒ Object
Gets or sets the YDimension of the barcode.
45 46 47 |
# File 'lib/ruby_client/Elements/Pdf417BarcodeElement.rb', line 45 def y_dimension @y_dimension end |
Instance Method Details
#to_json(_options = {}) ⇒ Object
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 |
# File 'lib/ruby_client/Elements/Pdf417BarcodeElement.rb', line 64 def to_json( = {}) json_array = {} json_array['type'] = 'pdf417Barcode' json_array['columns'] = @columns unless @columns.nil? json_array['yDimension'] = @y_dimension unless @y_dimension.nil? json_array["processTilde"] = @process_tilde unless @process_tilde.nil? json_array['compactPdf417'] = @compact_pdf417 unless @compact_pdf417.nil? json_array['errorCorrection'] = @error_correction unless @error_correction.nil? json_array['compaction'] = @compaction unless @compaction.nil? #--------------Dim2BarcodeElement------------------------------ json_array['valueType'] = @_value_type unless @_value_type.nil? #----------------barcodeElement-------------------------------- json_array['color'] = @color._color_string if !@color.nil? && !@color._color_string.nil? json_array['xDimension'] = @x_dimension unless @x_dimension.nil? json_array['value'] = @value unless @value.nil? # ------------element--------------------- json_array['placement'] = @placement unless @placement.nil? json_array['xOffset'] = @x_offset unless @x_offset.nil? json_array['yOffset'] = @y_offset unless @y_offset.nil? json_array["evenPages"] = @even_pages unless @even_pages.nil? json_array["oddPages"] = @odd_pages unless @odd_pages.nil? JSON.pretty_generate(json_array) end |