Class: AsposeWordsCloud::PageSetup
- Inherits:
-
Object
- Object
- AsposeWordsCloud::PageSetup
- Defined in:
- lib/aspose_words_cloud/models/page_setup.rb
Overview
Represents the page setup properties of a section. PageSetup object contains all the page setup attributes of a section (left margin, bottom margin, paper size, and so on) as properties.
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#bidi ⇒ Object
Gets or sets a value indicating whether this section contains bidirectional (complex scripts) text.
-
#border_always_in_front ⇒ Object
Gets or sets a value indicating whether the page border is positioned relative to intersecting texts and objects.
-
#border_applies_to ⇒ Object
Gets or sets the option that controls which pages the page border is printed on.
-
#border_distance_from ⇒ Object
Gets or sets the value, that indicates whether the specified page border is measured from the edge of the page or from the text it surrounds.
-
#bottom_margin ⇒ Object
Gets or sets the distance (in points) between the bottom edge of the page and the bottom boundary of the body text.
-
#different_first_page_header_footer ⇒ Object
Gets or sets a value indicating whether a different header or footer is used on the first page.
-
#first_page_tray ⇒ Object
Gets or sets the paper tray (bin) to use for the first page of a section.
-
#footer_distance ⇒ Object
Gets or sets the distance (in points) between the footer and the bottom of the page.
-
#gutter ⇒ Object
Gets or sets the amount of extra space added to the margin for document binding.
-
#header_distance ⇒ Object
Gets or sets the distance (in points) between the header and the top of the page.
-
#left_margin ⇒ Object
Gets or sets the distance (in points) between the left edge of the page and the left boundary of the body text.
-
#line_number_count_by ⇒ Object
Gets or sets the numeric increment for line numbers.
-
#line_number_distance_from_text ⇒ Object
Gets or sets the distance between the right edge of line numbers and the left edge of the document.
-
#line_number_restart_mode ⇒ Object
Gets or sets the way line numbering runs that is, whether it starts over at the beginning of a new page or section or runs continuously.
-
#line_starting_number ⇒ Object
Gets or sets the starting line number.
-
#link ⇒ Object
Gets or sets the link to the document.
-
#orientation ⇒ Object
Gets or sets the orientation of the page.
-
#other_pages_tray ⇒ Object
Gets or sets the paper tray (bin) to be used for all but the first page of a section.
-
#page_height ⇒ Object
Gets or sets the height of the page in points.
-
#page_number_style ⇒ Object
Gets or sets the page number format.
-
#page_starting_number ⇒ Object
Gets or sets the starting page number of the section.
-
#page_width ⇒ Object
Gets or sets the width of the page in points.
-
#paper_size ⇒ Object
Gets or sets the paper size.
-
#restart_page_numbering ⇒ Object
Gets or sets a value indicating whether page numbering restarts at the beginning of the section.
-
#right_margin ⇒ Object
Gets or sets the distance (in points) between the right edge of the page and the right boundary of the body text.
-
#rtl_gutter ⇒ Object
Gets or sets a value indicating whether Microsoft Word uses gutters for the section based on a right-to-left language or a left-to-right language.
-
#section_start ⇒ Object
Gets or sets the type of section break for the specified object.
-
#suppress_endnotes ⇒ Object
Gets or sets a value indicating whether endnotes are printed at the end of the next section that doesn’t suppress endnotes.
-
#top_margin ⇒ Object
Gets or sets the distance (in points) between the top edge of the page and the top boundary of the body text.
-
#vertical_alignment ⇒ Object
Gets or sets the vertical alignment of text on each page in the document.or section.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(other) ⇒ Object
Checks equality by comparing each attribute.
-
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #collectFilesContent(resultFilesContent) ⇒ Object
- #eql?(other) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ PageSetup
constructor
Initializes the object.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
- #validate ⇒ Object
Constructor Details
#initialize(attributes = {}) ⇒ PageSetup
Initializes the object
227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 |
# File 'lib/aspose_words_cloud/models/page_setup.rb', line 227 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } if attributes.key?(:'Link') self.link = attributes[:'Link'] end if attributes.key?(:'Bidi') self.bidi = attributes[:'Bidi'] end if attributes.key?(:'BorderAlwaysInFront') self.border_always_in_front = attributes[:'BorderAlwaysInFront'] end if attributes.key?(:'BorderAppliesTo') self.border_applies_to = attributes[:'BorderAppliesTo'] end if attributes.key?(:'BorderDistanceFrom') self.border_distance_from = attributes[:'BorderDistanceFrom'] end if attributes.key?(:'BottomMargin') self.bottom_margin = attributes[:'BottomMargin'] end if attributes.key?(:'DifferentFirstPageHeaderFooter') self. = attributes[:'DifferentFirstPageHeaderFooter'] end if attributes.key?(:'FirstPageTray') self.first_page_tray = attributes[:'FirstPageTray'] end if attributes.key?(:'FooterDistance') self. = attributes[:'FooterDistance'] end if attributes.key?(:'Gutter') self.gutter = attributes[:'Gutter'] end if attributes.key?(:'HeaderDistance') self.header_distance = attributes[:'HeaderDistance'] end if attributes.key?(:'LeftMargin') self.left_margin = attributes[:'LeftMargin'] end if attributes.key?(:'LineNumberCountBy') self.line_number_count_by = attributes[:'LineNumberCountBy'] end if attributes.key?(:'LineNumberDistanceFromText') self.line_number_distance_from_text = attributes[:'LineNumberDistanceFromText'] end if attributes.key?(:'LineNumberRestartMode') self.line_number_restart_mode = attributes[:'LineNumberRestartMode'] end if attributes.key?(:'LineStartingNumber') self.line_starting_number = attributes[:'LineStartingNumber'] end if attributes.key?(:'Orientation') self.orientation = attributes[:'Orientation'] end if attributes.key?(:'OtherPagesTray') self.other_pages_tray = attributes[:'OtherPagesTray'] end if attributes.key?(:'PageHeight') self.page_height = attributes[:'PageHeight'] end if attributes.key?(:'PageNumberStyle') self.page_number_style = attributes[:'PageNumberStyle'] end if attributes.key?(:'PageStartingNumber') self.page_starting_number = attributes[:'PageStartingNumber'] end if attributes.key?(:'PageWidth') self.page_width = attributes[:'PageWidth'] end if attributes.key?(:'PaperSize') self.paper_size = attributes[:'PaperSize'] end if attributes.key?(:'RestartPageNumbering') self.restart_page_numbering = attributes[:'RestartPageNumbering'] end if attributes.key?(:'RightMargin') self.right_margin = attributes[:'RightMargin'] end if attributes.key?(:'RtlGutter') self.rtl_gutter = attributes[:'RtlGutter'] end if attributes.key?(:'SectionStart') self.section_start = attributes[:'SectionStart'] end if attributes.key?(:'SuppressEndnotes') self.suppress_endnotes = attributes[:'SuppressEndnotes'] end if attributes.key?(:'TopMargin') self.top_margin = attributes[:'TopMargin'] end if attributes.key?(:'VerticalAlignment') self.vertical_alignment = attributes[:'VerticalAlignment'] end end |
Instance Attribute Details
#bidi ⇒ Object
Gets or sets a value indicating whether this section contains bidirectional (complex scripts) text. When true, the columns in this section are laid out from right to left.
38 39 40 |
# File 'lib/aspose_words_cloud/models/page_setup.rb', line 38 def bidi @bidi end |
#border_always_in_front ⇒ Object
Gets or sets a value indicating whether the page border is positioned relative to intersecting texts and objects.
41 42 43 |
# File 'lib/aspose_words_cloud/models/page_setup.rb', line 41 def border_always_in_front @border_always_in_front end |
#border_applies_to ⇒ Object
Gets or sets the option that controls which pages the page border is printed on.
44 45 46 |
# File 'lib/aspose_words_cloud/models/page_setup.rb', line 44 def border_applies_to @border_applies_to end |
#border_distance_from ⇒ Object
Gets or sets the value, that indicates whether the specified page border is measured from the edge of the page or from the text it surrounds.
47 48 49 |
# File 'lib/aspose_words_cloud/models/page_setup.rb', line 47 def border_distance_from @border_distance_from end |
#bottom_margin ⇒ Object
Gets or sets the distance (in points) between the bottom edge of the page and the bottom boundary of the body text.
50 51 52 |
# File 'lib/aspose_words_cloud/models/page_setup.rb', line 50 def bottom_margin @bottom_margin end |
#different_first_page_header_footer ⇒ Object
Gets or sets a value indicating whether a different header or footer is used on the first page.
53 54 55 |
# File 'lib/aspose_words_cloud/models/page_setup.rb', line 53 def @different_first_page_header_footer end |
#first_page_tray ⇒ Object
Gets or sets the paper tray (bin) to use for the first page of a section. The value is implementation (printer) specific.
57 58 59 |
# File 'lib/aspose_words_cloud/models/page_setup.rb', line 57 def first_page_tray @first_page_tray end |
#footer_distance ⇒ Object
Gets or sets the distance (in points) between the footer and the bottom of the page.
60 61 62 |
# File 'lib/aspose_words_cloud/models/page_setup.rb', line 60 def @footer_distance end |
#gutter ⇒ Object
Gets or sets the amount of extra space added to the margin for document binding.
63 64 65 |
# File 'lib/aspose_words_cloud/models/page_setup.rb', line 63 def gutter @gutter end |
#header_distance ⇒ Object
Gets or sets the distance (in points) between the header and the top of the page.
66 67 68 |
# File 'lib/aspose_words_cloud/models/page_setup.rb', line 66 def header_distance @header_distance end |
#left_margin ⇒ Object
Gets or sets the distance (in points) between the left edge of the page and the left boundary of the body text.
69 70 71 |
# File 'lib/aspose_words_cloud/models/page_setup.rb', line 69 def left_margin @left_margin end |
#line_number_count_by ⇒ Object
Gets or sets the numeric increment for line numbers.
72 73 74 |
# File 'lib/aspose_words_cloud/models/page_setup.rb', line 72 def line_number_count_by @line_number_count_by end |
#line_number_distance_from_text ⇒ Object
Gets or sets the distance between the right edge of line numbers and the left edge of the document. Set this property to zero for automatic distance between the line numbers and text of the document.
76 77 78 |
# File 'lib/aspose_words_cloud/models/page_setup.rb', line 76 def line_number_distance_from_text @line_number_distance_from_text end |
#line_number_restart_mode ⇒ Object
Gets or sets the way line numbering runs that is, whether it starts over at the beginning of a new page or section or runs continuously.
79 80 81 |
# File 'lib/aspose_words_cloud/models/page_setup.rb', line 79 def line_number_restart_mode @line_number_restart_mode end |
#line_starting_number ⇒ Object
Gets or sets the starting line number.
82 83 84 |
# File 'lib/aspose_words_cloud/models/page_setup.rb', line 82 def line_starting_number @line_starting_number end |
#link ⇒ Object
Gets or sets the link to the document.
34 35 36 |
# File 'lib/aspose_words_cloud/models/page_setup.rb', line 34 def link @link end |
#orientation ⇒ Object
Gets or sets the orientation of the page. Changing Orientation swaps PageWidth and PageHeight.
86 87 88 |
# File 'lib/aspose_words_cloud/models/page_setup.rb', line 86 def orientation @orientation end |
#other_pages_tray ⇒ Object
Gets or sets the paper tray (bin) to be used for all but the first page of a section. The value is implementation (printer) specific.
90 91 92 |
# File 'lib/aspose_words_cloud/models/page_setup.rb', line 90 def other_pages_tray @other_pages_tray end |
#page_height ⇒ Object
Gets or sets the height of the page in points.
93 94 95 |
# File 'lib/aspose_words_cloud/models/page_setup.rb', line 93 def page_height @page_height end |
#page_number_style ⇒ Object
Gets or sets the page number format.
96 97 98 |
# File 'lib/aspose_words_cloud/models/page_setup.rb', line 96 def page_number_style @page_number_style end |
#page_starting_number ⇒ Object
Gets or sets the starting page number of the section. The RestartPageNumbering property, if set to false, will override the PageStartingNumber property so that page numbering can continue from the previous section.
100 101 102 |
# File 'lib/aspose_words_cloud/models/page_setup.rb', line 100 def page_starting_number @page_starting_number end |
#page_width ⇒ Object
Gets or sets the width of the page in points.
103 104 105 |
# File 'lib/aspose_words_cloud/models/page_setup.rb', line 103 def page_width @page_width end |
#paper_size ⇒ Object
Gets or sets the paper size. Setting this property updates PageWidth and PageHeight values. Setting this value to Custom does not change existing values.
107 108 109 |
# File 'lib/aspose_words_cloud/models/page_setup.rb', line 107 def paper_size @paper_size end |
#restart_page_numbering ⇒ Object
Gets or sets a value indicating whether page numbering restarts at the beginning of the section. If set to false, the RestartPageNumbering property will override the PageStartingNumber property so that page numbering can continue from the previous section.
111 112 113 |
# File 'lib/aspose_words_cloud/models/page_setup.rb', line 111 def restart_page_numbering @restart_page_numbering end |
#right_margin ⇒ Object
Gets or sets the distance (in points) between the right edge of the page and the right boundary of the body text.
114 115 116 |
# File 'lib/aspose_words_cloud/models/page_setup.rb', line 114 def right_margin @right_margin end |
#rtl_gutter ⇒ Object
Gets or sets a value indicating whether Microsoft Word uses gutters for the section based on a right-to-left language or a left-to-right language.
117 118 119 |
# File 'lib/aspose_words_cloud/models/page_setup.rb', line 117 def rtl_gutter @rtl_gutter end |
#section_start ⇒ Object
Gets or sets the type of section break for the specified object.
120 121 122 |
# File 'lib/aspose_words_cloud/models/page_setup.rb', line 120 def section_start @section_start end |
#suppress_endnotes ⇒ Object
Gets or sets a value indicating whether endnotes are printed at the end of the next section that doesn’t suppress endnotes. Suppressed endnotes are printed before the endnotes in that section.
123 124 125 |
# File 'lib/aspose_words_cloud/models/page_setup.rb', line 123 def suppress_endnotes @suppress_endnotes end |
#top_margin ⇒ Object
Gets or sets the distance (in points) between the top edge of the page and the top boundary of the body text.
126 127 128 |
# File 'lib/aspose_words_cloud/models/page_setup.rb', line 126 def top_margin @top_margin end |
#vertical_alignment ⇒ Object
Gets or sets the vertical alignment of text on each page in the document.or section.
129 130 131 |
# File 'lib/aspose_words_cloud/models/page_setup.rb', line 129 def vertical_alignment @vertical_alignment end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 |
# File 'lib/aspose_words_cloud/models/page_setup.rb', line 154 def self.attribute_map { :'link' => :'Link', :'bidi' => :'Bidi', :'border_always_in_front' => :'BorderAlwaysInFront', :'border_applies_to' => :'BorderAppliesTo', :'border_distance_from' => :'BorderDistanceFrom', :'bottom_margin' => :'BottomMargin', :'different_first_page_header_footer' => :'DifferentFirstPageHeaderFooter', :'first_page_tray' => :'FirstPageTray', :'footer_distance' => :'FooterDistance', :'gutter' => :'Gutter', :'header_distance' => :'HeaderDistance', :'left_margin' => :'LeftMargin', :'line_number_count_by' => :'LineNumberCountBy', :'line_number_distance_from_text' => :'LineNumberDistanceFromText', :'line_number_restart_mode' => :'LineNumberRestartMode', :'line_starting_number' => :'LineStartingNumber', :'orientation' => :'Orientation', :'other_pages_tray' => :'OtherPagesTray', :'page_height' => :'PageHeight', :'page_number_style' => :'PageNumberStyle', :'page_starting_number' => :'PageStartingNumber', :'page_width' => :'PageWidth', :'paper_size' => :'PaperSize', :'restart_page_numbering' => :'RestartPageNumbering', :'right_margin' => :'RightMargin', :'rtl_gutter' => :'RtlGutter', :'section_start' => :'SectionStart', :'suppress_endnotes' => :'SuppressEndnotes', :'top_margin' => :'TopMargin', :'vertical_alignment' => :'VerticalAlignment' } end |
.swagger_types ⇒ Object
Attribute type mapping.
190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 |
# File 'lib/aspose_words_cloud/models/page_setup.rb', line 190 def self.swagger_types { :'link' => :'WordsApiLink', :'bidi' => :'BOOLEAN', :'border_always_in_front' => :'BOOLEAN', :'border_applies_to' => :'String', :'border_distance_from' => :'String', :'bottom_margin' => :'Float', :'different_first_page_header_footer' => :'BOOLEAN', :'first_page_tray' => :'Integer', :'footer_distance' => :'Float', :'gutter' => :'Float', :'header_distance' => :'Float', :'left_margin' => :'Float', :'line_number_count_by' => :'Integer', :'line_number_distance_from_text' => :'Float', :'line_number_restart_mode' => :'String', :'line_starting_number' => :'Integer', :'orientation' => :'String', :'other_pages_tray' => :'Integer', :'page_height' => :'Float', :'page_number_style' => :'String', :'page_starting_number' => :'Integer', :'page_width' => :'Float', :'paper_size' => :'String', :'restart_page_numbering' => :'BOOLEAN', :'right_margin' => :'Float', :'rtl_gutter' => :'BOOLEAN', :'section_start' => :'String', :'suppress_endnotes' => :'BOOLEAN', :'top_margin' => :'Float', :'vertical_alignment' => :'String' } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 |
# File 'lib/aspose_words_cloud/models/page_setup.rb', line 492 def ==(other) return true if self.equal?(other) self.class == other.class && link == other.link && bidi == other.bidi && border_always_in_front == other.border_always_in_front && border_applies_to == other.border_applies_to && border_distance_from == other.border_distance_from && bottom_margin == other.bottom_margin && == other. && first_page_tray == other.first_page_tray && == other. && gutter == other.gutter && header_distance == other.header_distance && left_margin == other.left_margin && line_number_count_by == other.line_number_count_by && line_number_distance_from_text == other.line_number_distance_from_text && line_number_restart_mode == other.line_number_restart_mode && line_starting_number == other.line_starting_number && orientation == other.orientation && other_pages_tray == other.other_pages_tray && page_height == other.page_height && page_number_style == other.page_number_style && page_starting_number == other.page_starting_number && page_width == other.page_width && paper_size == other.paper_size && restart_page_numbering == other.restart_page_numbering && right_margin == other.right_margin && rtl_gutter == other.rtl_gutter && section_start == other.section_start && suppress_endnotes == other.suppress_endnotes && top_margin == other.top_margin && vertical_alignment == other.vertical_alignment end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 |
# File 'lib/aspose_words_cloud/models/page_setup.rb', line 564 def _deserialize(type, value) case type.to_sym when :DateTime Time.at(/\d/.match(value)[0].to_f).to_datetime when :Date Time.at(/\d/.match(value)[0].to_f).to_date when :String value.to_s when :Integer value.to_i when :Float value.to_f when :BOOLEAN if value.to_s =~ /\A(true|t|yes|y|1)\z/i true else false end when :Object # generic object (usually a Hash), return directly value when /\AArray<(?<inner_type>.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/ k_type = Regexp.last_match[:k_type] v_type = Regexp.last_match[:v_type] {}.tap do |hash| value.each do |k, v| hash[_deserialize(k_type, k)] = _deserialize(v_type, v) end end else # model if value[:'$type'] type = value[:'$type'][0..-4] end temp_model = AsposeWordsCloud.const_get(type).new temp_model.build_from_hash(value) end end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
635 636 637 638 639 640 641 642 643 644 645 646 647 |
# File 'lib/aspose_words_cloud/models/page_setup.rb', line 635 def _to_hash(value) if value.is_a?(Array) value.compact.map { |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 |
# File 'lib/aspose_words_cloud/models/page_setup.rb', line 542 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end |
#collectFilesContent(resultFilesContent) ⇒ Object
649 650 |
# File 'lib/aspose_words_cloud/models/page_setup.rb', line 649 def collectFilesContent(resultFilesContent) end |
#eql?(other) ⇒ Boolean
529 530 531 |
# File 'lib/aspose_words_cloud/models/page_setup.rb', line 529 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
535 536 537 |
# File 'lib/aspose_words_cloud/models/page_setup.rb', line 535 def hash [link, bidi, border_always_in_front, border_applies_to, border_distance_from, bottom_margin, , first_page_tray, , gutter, header_distance, left_margin, line_number_count_by, line_number_distance_from_text, line_number_restart_mode, line_starting_number, orientation, other_pages_tray, page_height, page_number_style, page_starting_number, page_width, paper_size, restart_page_numbering, right_margin, rtl_gutter, section_start, suppress_endnotes, top_margin, vertical_alignment].hash end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
615 616 617 |
# File 'lib/aspose_words_cloud/models/page_setup.rb', line 615 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
621 622 623 624 625 626 627 628 629 |
# File 'lib/aspose_words_cloud/models/page_setup.rb', line 621 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) next if value.nil? hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
609 610 611 |
# File 'lib/aspose_words_cloud/models/page_setup.rb', line 609 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 |
# File 'lib/aspose_words_cloud/models/page_setup.rb', line 356 def valid? border_applies_to_validator = EnumAttributeValidator.new('String', ["AllPages", "FirstPage", "OtherPages"]) return false unless border_applies_to_validator.valid?(@border_applies_to) border_distance_from_validator = EnumAttributeValidator.new('String', ["Text", "PageEdge"]) return false unless border_distance_from_validator.valid?(@border_distance_from) line_number_restart_mode_validator = EnumAttributeValidator.new('String', ["RestartPage", "RestartSection", "Continuous"]) return false unless line_number_restart_mode_validator.valid?(@line_number_restart_mode) orientation_validator = EnumAttributeValidator.new('String', ["Portrait", "Landscape"]) return false unless orientation_validator.valid?(@orientation) page_number_style_validator = EnumAttributeValidator.new('String', ["Arabic", "UppercaseRoman", "LowercaseRoman", "UppercaseLetter", "LowercaseLetter", "Ordinal", "Number", "OrdinalText", "Hex", "ChicagoManual", "Kanji", "KanjiDigit", "AiueoHalfWidth", "IrohaHalfWidth", "ArabicFullWidth", "ArabicHalfWidth", "KanjiTraditional", "KanjiTraditional2", "NumberInCircle", "DecimalFullWidth", "Aiueo", "Iroha", "LeadingZero", "Bullet", "Ganada", "Chosung", "GB1", "GB2", "GB3", "GB4", "Zodiac1", "Zodiac2", "Zodiac3", "TradChinNum1", "TradChinNum2", "TradChinNum3", "TradChinNum4", "SimpChinNum1", "SimpChinNum2", "SimpChinNum3", "SimpChinNum4", "HanjaRead", "HanjaReadDigit", "Hangul", "Hanja", "Hebrew1", "Arabic1", "Hebrew2", "Arabic2", "HindiLetter1", "HindiLetter2", "HindiArabic", "HindiCardinalText", "ThaiLetter", "ThaiArabic", "ThaiCardinalText", "VietCardinalText", "NumberInDash", "LowercaseRussian", "UppercaseRussian", "None", "Custom"]) return false unless page_number_style_validator.valid?(@page_number_style) paper_size_validator = EnumAttributeValidator.new('String', ["A3", "A4", "A5", "B4", "B5", "Executive", "Folio", "Ledger", "Legal", "Letter", "EnvelopeDL", "Quarto", "Statement", "Tabloid", "Paper10x14", "Paper11x17", "Number10Envelope", "Custom"]) return false unless paper_size_validator.valid?(@paper_size) section_start_validator = EnumAttributeValidator.new('String', ["Continuous", "NewColumn", "NewPage", "EvenPage", "OddPage"]) return false unless section_start_validator.valid?(@section_start) vertical_alignment_validator = EnumAttributeValidator.new('String', ["Top", "Center", "Justify", "Bottom"]) return false unless vertical_alignment_validator.valid?(@vertical_alignment) return true end |
#validate ⇒ Object
652 653 654 655 656 657 |
# File 'lib/aspose_words_cloud/models/page_setup.rb', line 652 def validate() unless self.link.nil? self.link.validate end end |