Class: DynamicPDFApi::MergeOptions

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby_client/MergeOptions.rb

Overview

Represents different options for merging PDF documents.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeMergeOptions

Returns a new instance of MergeOptions.



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/ruby_client/MergeOptions.rb', line 6

def initialize
  @document_info = nil
  @document_java_script = nil
  @document_properties = nil
  @embedded_files = nil
  @form_fields = nil
  @forms_xfa_data = nil
  @logical_structure = nil
  @open_action = nil
  @optional_content_info = nil
  @out_lines = nil
  @output_intent = nil
  @page_annotations = nil
  @page_labels_and_sections = nil
  @root_form_field = nil
  @xmp_metadata = nil
end

Instance Attribute Details

#document_infoObject

Gets or sets a boolean indicating whether to import document information when merging.



27
28
29
# File 'lib/ruby_client/MergeOptions.rb', line 27

def document_info
  @document_info
end

#document_java_scriptObject

Gets or sets a boolean indicating whether to import document level JavaScript when merging.



32
33
34
# File 'lib/ruby_client/MergeOptions.rb', line 32

def document_java_script
  @document_java_script
end

#document_propertiesObject

Gets or sets a boolean indicating whether to import document properties when merging.



37
38
39
# File 'lib/ruby_client/MergeOptions.rb', line 37

def document_properties
  @document_properties
end

#embedded_filesObject

Gets or sets a boolean indicating whether to import embedded files when merging.



42
43
44
# File 'lib/ruby_client/MergeOptions.rb', line 42

def embedded_files
  @embedded_files
end

#form_fieldsObject

Gets or sets a boolean indicating whether to import form fields when merging.



47
48
49
# File 'lib/ruby_client/MergeOptions.rb', line 47

def form_fields
  @form_fields
end

#forms_xfa_dataObject

Gets or sets a boolean indicating whether to import XFA form data when merging.



52
53
54
# File 'lib/ruby_client/MergeOptions.rb', line 52

def forms_xfa_data
  @forms_xfa_data
end

#logical_structureObject

Gets or sets a boolean indicating whether to import logical structure (tagging information) when merging.



57
58
59
# File 'lib/ruby_client/MergeOptions.rb', line 57

def logical_structure
  @logical_structure
end

#open_actionObject

Gets or sets a boolean indicating whether to import document’s opening action (initial page and zoom settings) when merging.



62
63
64
# File 'lib/ruby_client/MergeOptions.rb', line 62

def open_action
  @open_action
end

#optional_content_infoObject

Gets or sets a boolean indicating whether to import optional content when merging.



67
68
69
# File 'lib/ruby_client/MergeOptions.rb', line 67

def 
  @optional_content_info
end

#out_linesObject

Gets or sets a boolean indicating whether to import outlines and bookmarks when merging.



72
73
74
# File 'lib/ruby_client/MergeOptions.rb', line 72

def out_lines
  @out_lines
end

#output_intentObject

Gets or sets a boolean indicating whether to import OutputIntent when merging.



77
78
79
# File 'lib/ruby_client/MergeOptions.rb', line 77

def output_intent
  @output_intent
end

#page_annotationsObject

Gets or sets a boolean indicating whether to import PageAnnotations when merging.



82
83
84
# File 'lib/ruby_client/MergeOptions.rb', line 82

def page_annotations
  @page_annotations
end

#page_labels_and_sectionsObject

Gets or sets a boolean indicating whether to import PageLabelsAndSections when merging.



87
88
89
# File 'lib/ruby_client/MergeOptions.rb', line 87

def page_labels_and_sections
  @page_labels_and_sections
end

#root_form_fieldObject

Gets or sets the root form field for imported form fields. Useful when merging a PDF repeatedly to have a better contorl on the form field names.



92
93
94
# File 'lib/ruby_client/MergeOptions.rb', line 92

def root_form_field
  @root_form_field
end

#xmp_metadataObject

Gets or sets a boolean indicating whether to import XmpMetadata when merging.



97
98
99
# File 'lib/ruby_client/MergeOptions.rb', line 97

def 
  @xmp_metadata
end

Instance Method Details

#to_json(_options = {}) ⇒ Object



99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
# File 'lib/ruby_client/MergeOptions.rb', line 99

def to_json(_options = {})
  json_array = {}

  json_array['documentInfo'] = @document_info unless @document_info.nil?

  json_array['documentJavaScript'] = @document_java_script unless @document_java_script.nil?

  json_array['documentProperties'] = @document_properties unless @document_properties.nil?

  json_array['embeddedFiles'] = @embedded_files unless @embedded_files.nil?

  json_array['formFields'] = @form_fields unless @form_fields.nil?

  json_array['formsXfaData'] = @forms_xfa_data unless @forms_xfa_data.nil?

  json_array['logicalStructure'] = @logical_structure unless @logical_structure.nil?

  json_array['openAction'] = @open_action unless @open_action.nil?

  json_array['optionalContentInfo'] = @optional_content_info unless @optional_content_info.nil?

  json_array['outlines'] = @out_lines unless @out_lines.nil?

  json_array['outputIntent'] = @output_intent unless @output_intent.nil?

  json_array['pageAnnotations'] = @page_annotations unless @page_annotations.nil?

  json_array['pageLabelsAndSections'] = @page_labels_and_sections unless @page_labels_and_sections.nil?

  json_array['rootFormField'] = @root_form_field unless @root_form_field.nil?

  json_array['xmpMetadata'] = @xmp_metadata unless @xmp_metadata.nil?

  JSON.pretty_generate(json_array)
end