Class: GroupDocsViewerCloud::PdfOptions
- Inherits:
-
Object
- Object
- GroupDocsViewerCloud::PdfOptions
- Defined in:
- lib/groupdocs_viewer_cloud/models/pdf_options.rb
Overview
Options for rendering document into PDF
Instance Attribute Summary collapse
-
#archive_options ⇒ Object
Rendering options for Archive source file formats.
-
#cad_options ⇒ Object
Rendering options for CAD source file formats CAD file formats include files with extensions: .dwg, .dxf, .dgn, .ifc, .stl.
-
#count_pages_to_render ⇒ Object
Count pages which should be rendered.
-
#default_encoding ⇒ Object
Default encoding for the plain text files such as .csv, .txt and .eml files when encoding is not specified in header.
-
#default_font_name ⇒ Object
Default font name may be specified in following cases: - You want to generally specify the default font to fall back on, if particular font in the document cannot be found during rendering.
-
#detect_encoding ⇒ Object
This option enables TXT, TSV, and CSV files encoding detection.
-
#document_open_password ⇒ Object
The password required to open the PDF document.
-
#email_options ⇒ Object
Rendering options for Email source file formats Email file formats include files with extensions: .msg, .eml, .emlx, .ifc, .stl.
-
#image_height ⇒ Object
The height of an output image in pixels.
-
#image_max_height ⇒ Object
Max height of an output image in pixels.
-
#image_max_width ⇒ Object
Max width of an output image in pixels.
-
#image_width ⇒ Object
The width of the output image in pixels.
-
#mail_storage_options ⇒ Object
Rendering options for Mail storage (Lotus Notes, MBox) data files.
-
#outlook_options ⇒ Object
Rendering options for Outlook source file formats.
-
#page_rotations ⇒ Object
Page rotations.
-
#pages_to_render ⇒ Object
Pages list to render.
-
#pdf_document_options ⇒ Object
Rendering options for PDF source file formats.
-
#pdf_optimization_options ⇒ Object
Contains options for rendering documents into PDF format.
-
#permissions ⇒ Object
The array of PDF document permissions.
-
#permissions_password ⇒ Object
The password required to change permission settings; Using a permissions password you can restrict printing, modification and data extraction.
-
#project_management_options ⇒ Object
Rendering options for MS Project source file formats Project file formats include files with extensions: .mpt, .mpp.
-
#render_comments ⇒ Object
When enabled comments will be rendered to the output.
-
#render_hidden_pages ⇒ Object
When enabled hidden pages, sheets or slides will be rendered to the output.
-
#render_notes ⇒ Object
When enabled notes will be rendered to the output.
-
#spreadsheet_options ⇒ Object
Rendering options for Spreadsheet source file formats Spreadsheet file formats include files with extensions: .xls, .xlsx, .xlsm, .xlsb, .csv, .ods, .ots, .xltx, .xltm, .tsv.
-
#start_page_number ⇒ Object
Page number from which rendering should be started.
-
#text_options ⇒ Object
Rendering options for Text source file formats.
-
#visio_rendering_options ⇒ Object
Rendering options for Visio source file formats.
-
#web_document_options ⇒ Object
This rendering options enables you to customize the appearance of the output HTML/PDF/PNG/JPEG when rendering Web documents.
-
#word_processing_options ⇒ Object
Rendering options for WordProcessing source file formats.
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.
- #eql?(other) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ PdfOptions
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#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.
-
#uncap(str) ⇒ Object
Downcases first letter.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ PdfOptions
Initializes the object
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 224 225 226 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 |
# File 'lib/groupdocs_viewer_cloud/models/pdf_options.rb', line 198 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?(:'StartPageNumber') self.start_page_number = attributes[:'StartPageNumber'] end if attributes.key?(:'CountPagesToRender') self.count_pages_to_render = attributes[:'CountPagesToRender'] end if attributes.key?(:'PagesToRender') if (value = attributes[:'PagesToRender']).is_a?(Array) self.pages_to_render = value end end if attributes.key?(:'PageRotations') if (value = attributes[:'PageRotations']).is_a?(Array) self.page_rotations = value end end if attributes.key?(:'DefaultFontName') self.default_font_name = attributes[:'DefaultFontName'] end if attributes.key?(:'DefaultEncoding') self.default_encoding = attributes[:'DefaultEncoding'] end if attributes.key?(:'DetectEncoding') self.detect_encoding = attributes[:'DetectEncoding'] end if attributes.key?(:'RenderComments') self.render_comments = attributes[:'RenderComments'] end if attributes.key?(:'RenderNotes') self.render_notes = attributes[:'RenderNotes'] end if attributes.key?(:'RenderHiddenPages') self.render_hidden_pages = attributes[:'RenderHiddenPages'] end if attributes.key?(:'SpreadsheetOptions') self. = attributes[:'SpreadsheetOptions'] end if attributes.key?(:'CadOptions') self. = attributes[:'CadOptions'] end if attributes.key?(:'EmailOptions') self. = attributes[:'EmailOptions'] end if attributes.key?(:'ProjectManagementOptions') self. = attributes[:'ProjectManagementOptions'] end if attributes.key?(:'PdfDocumentOptions') self. = attributes[:'PdfDocumentOptions'] end if attributes.key?(:'WordProcessingOptions') self. = attributes[:'WordProcessingOptions'] end if attributes.key?(:'OutlookOptions') self. = attributes[:'OutlookOptions'] end if attributes.key?(:'ArchiveOptions') self. = attributes[:'ArchiveOptions'] end if attributes.key?(:'TextOptions') self. = attributes[:'TextOptions'] end if attributes.key?(:'MailStorageOptions') self. = attributes[:'MailStorageOptions'] end if attributes.key?(:'VisioRenderingOptions') self. = attributes[:'VisioRenderingOptions'] end if attributes.key?(:'WebDocumentOptions') self. = attributes[:'WebDocumentOptions'] end if attributes.key?(:'DocumentOpenPassword') self.document_open_password = attributes[:'DocumentOpenPassword'] end if attributes.key?(:'PermissionsPassword') self. = attributes[:'PermissionsPassword'] end if attributes.key?(:'Permissions') if (value = attributes[:'Permissions']).is_a?(Array) self. = value end end if attributes.key?(:'PdfOptimizationOptions') self. = attributes[:'PdfOptimizationOptions'] end if attributes.key?(:'ImageMaxWidth') self.image_max_width = attributes[:'ImageMaxWidth'] end if attributes.key?(:'ImageMaxHeight') self.image_max_height = attributes[:'ImageMaxHeight'] end if attributes.key?(:'ImageWidth') self.image_width = attributes[:'ImageWidth'] end if attributes.key?(:'ImageHeight') self.image_height = attributes[:'ImageHeight'] end end |
Instance Attribute Details
#archive_options ⇒ Object
Rendering options for Archive source file formats
86 87 88 |
# File 'lib/groupdocs_viewer_cloud/models/pdf_options.rb', line 86 def @archive_options end |
#cad_options ⇒ Object
Rendering options for CAD source file formats CAD file formats include files with extensions: .dwg, .dxf, .dgn, .ifc, .stl
68 69 70 |
# File 'lib/groupdocs_viewer_cloud/models/pdf_options.rb', line 68 def @cad_options end |
#count_pages_to_render ⇒ Object
Count pages which should be rendered
38 39 40 |
# File 'lib/groupdocs_viewer_cloud/models/pdf_options.rb', line 38 def count_pages_to_render @count_pages_to_render end |
#default_encoding ⇒ Object
Default encoding for the plain text files such as .csv, .txt and .eml files when encoding is not specified in header
50 51 52 |
# File 'lib/groupdocs_viewer_cloud/models/pdf_options.rb', line 50 def default_encoding @default_encoding end |
#default_font_name ⇒ Object
Default font name may be specified in following cases: - You want to generally specify the default font to fall back on, if particular font in the document cannot be found during rendering. - Your document uses fonts, that contain non-English characters and you want to make sure any missing font is replaced with one that has the same character set available.
47 48 49 |
# File 'lib/groupdocs_viewer_cloud/models/pdf_options.rb', line 47 def default_font_name @default_font_name end |
#detect_encoding ⇒ Object
This option enables TXT, TSV, and CSV files encoding detection. In case the encoding can’t be detected the DefaultEncoding is used.
53 54 55 |
# File 'lib/groupdocs_viewer_cloud/models/pdf_options.rb', line 53 def detect_encoding @detect_encoding end |
#document_open_password ⇒ Object
The password required to open the PDF document
101 102 103 |
# File 'lib/groupdocs_viewer_cloud/models/pdf_options.rb', line 101 def document_open_password @document_open_password end |
#email_options ⇒ Object
Rendering options for Email source file formats Email file formats include files with extensions: .msg, .eml, .emlx, .ifc, .stl
71 72 73 |
# File 'lib/groupdocs_viewer_cloud/models/pdf_options.rb', line 71 def @email_options end |
#image_height ⇒ Object
The height of an output image in pixels. (When converting single image to PDF only)
122 123 124 |
# File 'lib/groupdocs_viewer_cloud/models/pdf_options.rb', line 122 def image_height @image_height end |
#image_max_height ⇒ Object
Max height of an output image in pixels. (When converting single image to PDF only)
116 117 118 |
# File 'lib/groupdocs_viewer_cloud/models/pdf_options.rb', line 116 def image_max_height @image_max_height end |
#image_max_width ⇒ Object
Max width of an output image in pixels. (When converting single image to PDF only)
113 114 115 |
# File 'lib/groupdocs_viewer_cloud/models/pdf_options.rb', line 113 def image_max_width @image_max_width end |
#image_width ⇒ Object
The width of the output image in pixels. (When converting single image to PDF only)
119 120 121 |
# File 'lib/groupdocs_viewer_cloud/models/pdf_options.rb', line 119 def image_width @image_width end |
#mail_storage_options ⇒ Object
Rendering options for Mail storage (Lotus Notes, MBox) data files.
92 93 94 |
# File 'lib/groupdocs_viewer_cloud/models/pdf_options.rb', line 92 def @mail_storage_options end |
#outlook_options ⇒ Object
Rendering options for Outlook source file formats
83 84 85 |
# File 'lib/groupdocs_viewer_cloud/models/pdf_options.rb', line 83 def @outlook_options end |
#page_rotations ⇒ Object
Page rotations
44 45 46 |
# File 'lib/groupdocs_viewer_cloud/models/pdf_options.rb', line 44 def page_rotations @page_rotations end |
#pages_to_render ⇒ Object
Pages list to render. Ignored, if StartPageNumber and CountPagesToRender are provided
41 42 43 |
# File 'lib/groupdocs_viewer_cloud/models/pdf_options.rb', line 41 def pages_to_render @pages_to_render end |
#pdf_document_options ⇒ Object
Rendering options for PDF source file formats
77 78 79 |
# File 'lib/groupdocs_viewer_cloud/models/pdf_options.rb', line 77 def @pdf_document_options end |
#pdf_optimization_options ⇒ Object
Contains options for rendering documents into PDF format.
110 111 112 |
# File 'lib/groupdocs_viewer_cloud/models/pdf_options.rb', line 110 def @pdf_optimization_options end |
#permissions ⇒ Object
The array of PDF document permissions. Allowed values are: AllowAll, DenyPrinting, DenyModification, DenyDataExtraction, DenyAll Default value is AllowAll, if now permissions are set.
107 108 109 |
# File 'lib/groupdocs_viewer_cloud/models/pdf_options.rb', line 107 def @permissions end |
#permissions_password ⇒ Object
The password required to change permission settings; Using a permissions password you can restrict printing, modification and data extraction
104 105 106 |
# File 'lib/groupdocs_viewer_cloud/models/pdf_options.rb', line 104 def @permissions_password end |
#project_management_options ⇒ Object
Rendering options for MS Project source file formats Project file formats include files with extensions: .mpt, .mpp
74 75 76 |
# File 'lib/groupdocs_viewer_cloud/models/pdf_options.rb', line 74 def @project_management_options end |
#render_comments ⇒ Object
When enabled comments will be rendered to the output
56 57 58 |
# File 'lib/groupdocs_viewer_cloud/models/pdf_options.rb', line 56 def render_comments @render_comments end |
#render_hidden_pages ⇒ Object
When enabled hidden pages, sheets or slides will be rendered to the output
62 63 64 |
# File 'lib/groupdocs_viewer_cloud/models/pdf_options.rb', line 62 def render_hidden_pages @render_hidden_pages end |
#render_notes ⇒ Object
When enabled notes will be rendered to the output
59 60 61 |
# File 'lib/groupdocs_viewer_cloud/models/pdf_options.rb', line 59 def render_notes @render_notes end |
#spreadsheet_options ⇒ Object
Rendering options for Spreadsheet source file formats Spreadsheet file formats include files with extensions: .xls, .xlsx, .xlsm, .xlsb, .csv, .ods, .ots, .xltx, .xltm, .tsv
65 66 67 |
# File 'lib/groupdocs_viewer_cloud/models/pdf_options.rb', line 65 def @spreadsheet_options end |
#start_page_number ⇒ Object
Page number from which rendering should be started
35 36 37 |
# File 'lib/groupdocs_viewer_cloud/models/pdf_options.rb', line 35 def start_page_number @start_page_number end |
#text_options ⇒ Object
Rendering options for Text source file formats
89 90 91 |
# File 'lib/groupdocs_viewer_cloud/models/pdf_options.rb', line 89 def @text_options end |
#visio_rendering_options ⇒ Object
Rendering options for Visio source file formats
95 96 97 |
# File 'lib/groupdocs_viewer_cloud/models/pdf_options.rb', line 95 def @visio_rendering_options end |
#web_document_options ⇒ Object
This rendering options enables you to customize the appearance of the output HTML/PDF/PNG/JPEG when rendering Web documents.
98 99 100 |
# File 'lib/groupdocs_viewer_cloud/models/pdf_options.rb', line 98 def @web_document_options end |
#word_processing_options ⇒ Object
Rendering options for WordProcessing source file formats
80 81 82 |
# File 'lib/groupdocs_viewer_cloud/models/pdf_options.rb', line 80 def @word_processing_options end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 |
# File 'lib/groupdocs_viewer_cloud/models/pdf_options.rb', line 125 def self.attribute_map { :'start_page_number' => :'StartPageNumber', :'count_pages_to_render' => :'CountPagesToRender', :'pages_to_render' => :'PagesToRender', :'page_rotations' => :'PageRotations', :'default_font_name' => :'DefaultFontName', :'default_encoding' => :'DefaultEncoding', :'detect_encoding' => :'DetectEncoding', :'render_comments' => :'RenderComments', :'render_notes' => :'RenderNotes', :'render_hidden_pages' => :'RenderHiddenPages', :'spreadsheet_options' => :'SpreadsheetOptions', :'cad_options' => :'CadOptions', :'email_options' => :'EmailOptions', :'project_management_options' => :'ProjectManagementOptions', :'pdf_document_options' => :'PdfDocumentOptions', :'word_processing_options' => :'WordProcessingOptions', :'outlook_options' => :'OutlookOptions', :'archive_options' => :'ArchiveOptions', :'text_options' => :'TextOptions', :'mail_storage_options' => :'MailStorageOptions', :'visio_rendering_options' => :'VisioRenderingOptions', :'web_document_options' => :'WebDocumentOptions', :'document_open_password' => :'DocumentOpenPassword', :'permissions_password' => :'PermissionsPassword', :'permissions' => :'Permissions', :'pdf_optimization_options' => :'PdfOptimizationOptions', :'image_max_width' => :'ImageMaxWidth', :'image_max_height' => :'ImageMaxHeight', :'image_width' => :'ImageWidth', :'image_height' => :'ImageHeight' } end |
.swagger_types ⇒ Object
Attribute type mapping.
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 188 189 190 191 192 193 194 |
# File 'lib/groupdocs_viewer_cloud/models/pdf_options.rb', line 161 def self.swagger_types { :'start_page_number' => :'Integer', :'count_pages_to_render' => :'Integer', :'pages_to_render' => :'Array<Integer>', :'page_rotations' => :'Array<PageRotation>', :'default_font_name' => :'String', :'default_encoding' => :'String', :'detect_encoding' => :'BOOLEAN', :'render_comments' => :'BOOLEAN', :'render_notes' => :'BOOLEAN', :'render_hidden_pages' => :'BOOLEAN', :'spreadsheet_options' => :'SpreadsheetOptions', :'cad_options' => :'CadOptions', :'email_options' => :'EmailOptions', :'project_management_options' => :'ProjectManagementOptions', :'pdf_document_options' => :'PdfDocumentOptions', :'word_processing_options' => :'WordProcessingOptions', :'outlook_options' => :'OutlookOptions', :'archive_options' => :'ArchiveOptions', :'text_options' => :'TextOptions', :'mail_storage_options' => :'MailStorageOptions', :'visio_rendering_options' => :'VisioRenderingOptions', :'web_document_options' => :'WebDocumentOptions', :'document_open_password' => :'String', :'permissions_password' => :'String', :'permissions' => :'Array<String>', :'pdf_optimization_options' => :'PdfOptimizationOptions', :'image_max_width' => :'Integer', :'image_max_height' => :'Integer', :'image_width' => :'Integer', :'image_height' => :'Integer' } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 |
# File 'lib/groupdocs_viewer_cloud/models/pdf_options.rb', line 392 def ==(other) return true if self.equal?(other) self.class == other.class && start_page_number == other.start_page_number && count_pages_to_render == other.count_pages_to_render && pages_to_render == other.pages_to_render && page_rotations == other.page_rotations && default_font_name == other.default_font_name && default_encoding == other.default_encoding && detect_encoding == other.detect_encoding && render_comments == other.render_comments && render_notes == other.render_notes && render_hidden_pages == other.render_hidden_pages && == other. && == other. && == other. && == other. && == other. && == other. && == other. && == other. && == other. && == other. && == other. && == other. && document_open_password == other.document_open_password && == other. && == other. && == other. && image_max_width == other.image_max_width && image_max_height == other.image_max_height && image_width == other.image_width && image_height == other.image_height end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 |
# File 'lib/groupdocs_viewer_cloud/models/pdf_options.rb', line 472 def _deserialize(type, value) case type.to_sym when :DateTime Date.parse value when :Date Date.parse value 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 temp_model = GroupDocsViewerCloud.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
539 540 541 542 543 544 545 546 547 548 549 550 551 |
# File 'lib/groupdocs_viewer_cloud/models/pdf_options.rb', line 539 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
448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 |
# File 'lib/groupdocs_viewer_cloud/models/pdf_options.rb', line 448 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| pname = uncap(self.class.attribute_map[key]).intern value = attributes[pname] 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 value.is_a?(Array) self.send("#{key}=", value.map { |v| _deserialize($1, v) }) end elsif !value.nil? self.send("#{key}=", _deserialize(type, value)) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end |
#eql?(other) ⇒ Boolean
429 430 431 |
# File 'lib/groupdocs_viewer_cloud/models/pdf_options.rb', line 429 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
435 436 437 |
# File 'lib/groupdocs_viewer_cloud/models/pdf_options.rb', line 435 def hash [start_page_number, count_pages_to_render, pages_to_render, page_rotations, default_font_name, default_encoding, detect_encoding, render_comments, render_notes, render_hidden_pages, , , , , , , , , , , , , document_open_password, , , , image_max_width, image_max_height, image_width, image_height].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 |
# File 'lib/groupdocs_viewer_cloud/models/pdf_options.rb', line 334 def list_invalid_properties invalid_properties = [] if @start_page_number.nil? invalid_properties.push("invalid value for 'start_page_number', start_page_number cannot be nil.") end if @count_pages_to_render.nil? invalid_properties.push("invalid value for 'count_pages_to_render', count_pages_to_render cannot be nil.") end if @render_comments.nil? invalid_properties.push("invalid value for 'render_comments', render_comments cannot be nil.") end if @render_notes.nil? invalid_properties.push("invalid value for 'render_notes', render_notes cannot be nil.") end if @render_hidden_pages.nil? invalid_properties.push("invalid value for 'render_hidden_pages', render_hidden_pages cannot be nil.") end if @image_max_width.nil? invalid_properties.push("invalid value for 'image_max_width', image_max_width cannot be nil.") end if @image_max_height.nil? invalid_properties.push("invalid value for 'image_max_height', image_max_height cannot be nil.") end if @image_width.nil? invalid_properties.push("invalid value for 'image_width', image_width cannot be nil.") end if @image_height.nil? invalid_properties.push("invalid value for 'image_height', image_height cannot be nil.") end return invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
519 520 521 |
# File 'lib/groupdocs_viewer_cloud/models/pdf_options.rb', line 519 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
525 526 527 528 529 530 531 532 533 |
# File 'lib/groupdocs_viewer_cloud/models/pdf_options.rb', line 525 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
513 514 515 |
# File 'lib/groupdocs_viewer_cloud/models/pdf_options.rb', line 513 def to_s to_hash.to_s end |
#uncap(str) ⇒ Object
Downcases first letter.
441 442 443 |
# File 'lib/groupdocs_viewer_cloud/models/pdf_options.rb', line 441 def uncap(str) str[0, 1].downcase + str[1..-1] end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
377 378 379 380 381 382 383 384 385 386 387 388 |
# File 'lib/groupdocs_viewer_cloud/models/pdf_options.rb', line 377 def valid? return false if @start_page_number.nil? return false if @count_pages_to_render.nil? return false if @render_comments.nil? return false if @render_notes.nil? return false if @render_hidden_pages.nil? return false if @image_max_width.nil? return false if @image_max_height.nil? return false if @image_width.nil? return false if @image_height.nil? return true end |