Class: DynamicPDFApi::PdfInstructions
- Inherits:
-
Object
- Object
- DynamicPDFApi::PdfInstructions
- Defined in:
- lib/ruby_client/PdfInstructions.rb
Instance Attribute Summary collapse
-
#_author ⇒ Object
Returns the value of attribute _author.
-
#_creator ⇒ Object
Returns the value of attribute _creator.
-
#_flatten_all_form_fields ⇒ Object
Returns the value of attribute _flatten_all_form_fields.
-
#_fonts ⇒ Object
Returns the value of attribute _fonts.
-
#_form_fields ⇒ Object
Returns the value of attribute _form_fields.
-
#_inputs ⇒ Object
Returns the value of attribute _inputs.
-
#_keywords ⇒ Object
Returns the value of attribute _keywords.
-
#_out_lines ⇒ Object
Returns the value of attribute _out_lines.
-
#_producer ⇒ Object
Returns the value of attribute _producer.
-
#_retain_signature_form_fields ⇒ Object
Returns the value of attribute _retain_signature_form_fields.
-
#_security ⇒ Object
Returns the value of attribute _security.
-
#_subject ⇒ Object
Returns the value of attribute _subject.
-
#_tag ⇒ Object
Returns the value of attribute _tag.
-
#_templates ⇒ Object
Returns the value of attribute _templates.
-
#_title ⇒ Object
Returns the value of attribute _title.
Instance Method Summary collapse
-
#initialize ⇒ PdfInstructions
constructor
A new instance of PdfInstructions.
- #to_json(indented = false) ⇒ Object
Constructor Details
#initialize ⇒ PdfInstructions
Returns a new instance of PdfInstructions.
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/ruby_client/PdfInstructions.rb', line 10 def initialize @_author = '' @_title = '' @_subject = '' @_creator = '' @_producer = '' @_tag = nil @_keywords = '' @_form_fields = [] @_templates = {} @_fonts = {} @_out_lines = [] @_inputs = [] @_security = nil @_flatten_all_form_fields = nil @_retain_signature_form_fields = nil end |
Instance Attribute Details
#_author ⇒ Object
Returns the value of attribute _author.
7 8 9 |
# File 'lib/ruby_client/PdfInstructions.rb', line 7 def @_author end |
#_creator ⇒ Object
Returns the value of attribute _creator.
7 8 9 |
# File 'lib/ruby_client/PdfInstructions.rb', line 7 def _creator @_creator end |
#_flatten_all_form_fields ⇒ Object
Returns the value of attribute _flatten_all_form_fields.
7 8 9 |
# File 'lib/ruby_client/PdfInstructions.rb', line 7 def _flatten_all_form_fields @_flatten_all_form_fields end |
#_fonts ⇒ Object
Returns the value of attribute _fonts.
7 8 9 |
# File 'lib/ruby_client/PdfInstructions.rb', line 7 def _fonts @_fonts end |
#_form_fields ⇒ Object
Returns the value of attribute _form_fields.
7 8 9 |
# File 'lib/ruby_client/PdfInstructions.rb', line 7 def _form_fields @_form_fields end |
#_inputs ⇒ Object
Returns the value of attribute _inputs.
7 8 9 |
# File 'lib/ruby_client/PdfInstructions.rb', line 7 def _inputs @_inputs end |
#_keywords ⇒ Object
Returns the value of attribute _keywords.
7 8 9 |
# File 'lib/ruby_client/PdfInstructions.rb', line 7 def _keywords @_keywords end |
#_out_lines ⇒ Object
Returns the value of attribute _out_lines.
7 8 9 |
# File 'lib/ruby_client/PdfInstructions.rb', line 7 def _out_lines @_out_lines end |
#_producer ⇒ Object
Returns the value of attribute _producer.
7 8 9 |
# File 'lib/ruby_client/PdfInstructions.rb', line 7 def _producer @_producer end |
#_retain_signature_form_fields ⇒ Object
Returns the value of attribute _retain_signature_form_fields.
7 8 9 |
# File 'lib/ruby_client/PdfInstructions.rb', line 7 def _retain_signature_form_fields @_retain_signature_form_fields end |
#_security ⇒ Object
Returns the value of attribute _security.
7 8 9 |
# File 'lib/ruby_client/PdfInstructions.rb', line 7 def _security @_security end |
#_subject ⇒ Object
Returns the value of attribute _subject.
7 8 9 |
# File 'lib/ruby_client/PdfInstructions.rb', line 7 def _subject @_subject end |
#_tag ⇒ Object
Returns the value of attribute _tag.
7 8 9 |
# File 'lib/ruby_client/PdfInstructions.rb', line 7 def _tag @_tag end |
#_templates ⇒ Object
Returns the value of attribute _templates.
7 8 9 |
# File 'lib/ruby_client/PdfInstructions.rb', line 7 def _templates @_templates end |
#_title ⇒ Object
Returns the value of attribute _title.
7 8 9 |
# File 'lib/ruby_client/PdfInstructions.rb', line 7 def _title @_title end |
Instance Method Details
#to_json(indented = false) ⇒ Object
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 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 |
# File 'lib/ruby_client/PdfInstructions.rb', line 28 def to_json( indented = false) # @inputJsonArray = [] # @_Inputs.each do |input| # if(input != nil) # @inputJsonArray << input # end # end fonts_json = [] @_fonts.each_value do |font| fonts_json << font end templates_json = [] @_templates.each_value do |template| templates_json << template unless template.nil? end json_array = {} if(templates_json.length > 0) json_array['templates'] = templates_json end if(fonts_json.length > 0) json_array['fonts'] = fonts_json end if(@_author != nil) json_array['author'] = @_author end if(@_title != nil) json_array['title'] = @_title end json_array['subject'] = @_subject unless @_subject.nil? json_array['creator'] = @_creator unless @_creator.nil? json_array['producer'] = @_producer unless @_producer.nil? json_array['tag'] = @_tag unless @_tag.nil? json_array['keywords'] = @_keywords unless @_keywords.nil? json_array['security'] = @_security unless @_security.nil? json_array['flattenAllFormFields'] = @_flatten_all_form_fields unless @_flatten_all_form_fields.nil? json_array['retainSignatureFormFields'] = @_retain_signature_form_fields unless @_retain_signature_form_fields.nil? json_array['inputs'] = @_inputs if(@_form_fields.length > 0) json_array['formFields'] = @_form_fields end if(!@_out_lines._out_lines.empty?) json_array['outlines'] = @_out_lines end if(indented) JSON.pretty_generate(json_array) else JSON.generate(json_array) end end |