Class: GroupDocsConversionCloud::PdfConvertOptions
- Inherits:
-
Object
- Object
- GroupDocsConversionCloud::PdfConvertOptions
- Defined in:
- lib/groupdocs_conversion_cloud/models/pdf_convert_options.rb
Overview
Options for to PDF conversion
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#center_window ⇒ Object
Specify whether position of the document’s window will be centered on the screen.
-
#compress_images ⇒ Object
If CompressImages set to true, all images in the document are recompressed.
-
#direction ⇒ Object
Sets reading order of text: L2R (left to right) or R2L (right to left).
-
#display_doc_title ⇒ Object
Specifying whether document’s window title bar should display document title.
-
#dpi ⇒ Object
Desired page DPI after conversion.
-
#fit_window ⇒ Object
Specify whether document window must be resized to fit the first displayed page.
-
#from_page ⇒ Object
Start conversion from FromPage page.
-
#grayscale ⇒ Object
Convert a PDF from RGB colorspace to Grayscale.
-
#height ⇒ Object
Desired page height in pixels after conversion.
-
#hide_menu_bar ⇒ Object
Specify whether menu bar should be hidden when document is active.
-
#hide_tool_bar ⇒ Object
Specifying whether toolbar should be hidden when document is active.
-
#hide_window_ui ⇒ Object
Specify whether user interface elements should be hidden when document is active.
-
#image_quality ⇒ Object
Value in percent where 100% is unchanged quality and image size.
-
#linearize ⇒ Object
Linearize PDF Document for the Web.
-
#link_duplicate_streams ⇒ Object
Link duplicate streams.
-
#margin_bottom ⇒ Object
Desired page bottom margin in pixels after conversion.
-
#margin_left ⇒ Object
Desired page left margin in pixels after conversion.
-
#margin_right ⇒ Object
Desired page right margin in pixels after conversion.
-
#margin_top ⇒ Object
Desired page top margin in pixels after conversion.
-
#non_full_screen_page_mode ⇒ Object
Sets page mode, specifying how to display the document on exiting full-screen mode.
-
#page_layout ⇒ Object
Sets page layout which shall be used when the document is opened.
-
#page_mode ⇒ Object
Sets page mode, specifying how document should be displayed when opened.
-
#page_orientation ⇒ Object
Specifies page orientation.
-
#page_size ⇒ Object
Specifies page size.
-
#pages ⇒ Object
Convert specific pages.
-
#pages_count ⇒ Object
Number of pages to convert.
-
#password ⇒ Object
Set this property if you want to protect the converted document with a password.
-
#pdf_format ⇒ Object
Set the pdf format of the converted document.
-
#remove_pdfa_compliance ⇒ Object
Remove Pdf-A Compliance.
-
#remove_unused_objects ⇒ Object
Remove unused objects.
-
#remove_unused_streams ⇒ Object
Remove unused streams.
-
#rotate ⇒ Object
Rotate page.
-
#unembed_fonts ⇒ Object
Make fonts not embedded if set to true.
-
#watermark_options ⇒ Object
Watermark specific options.
-
#width ⇒ Object
Desired page width in pixels after conversion.
-
#zoom ⇒ Object
Specifies the zoom level in percentage.
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 = {}) ⇒ PdfConvertOptions
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 = {}) ⇒ PdfConvertOptions
Initializes the object
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 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 |
# File 'lib/groupdocs_conversion_cloud/models/pdf_convert_options.rb', line 249 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?(:'FromPage') self.from_page = attributes[:'FromPage'] end if attributes.key?(:'PagesCount') self.pages_count = attributes[:'PagesCount'] end if attributes.key?(:'Pages') if (value = attributes[:'Pages']).is_a?(Array) self.pages = value end end if attributes.key?(:'WatermarkOptions') self. = attributes[:'WatermarkOptions'] end if attributes.key?(:'Width') self.width = attributes[:'Width'] end if attributes.key?(:'Height') self.height = attributes[:'Height'] end if attributes.key?(:'Dpi') self.dpi = attributes[:'Dpi'] end if attributes.key?(:'Password') self.password = attributes[:'Password'] end if attributes.key?(:'MarginTop') self.margin_top = attributes[:'MarginTop'] end if attributes.key?(:'MarginBottom') self.margin_bottom = attributes[:'MarginBottom'] end if attributes.key?(:'MarginLeft') self.margin_left = attributes[:'MarginLeft'] end if attributes.key?(:'MarginRight') self.margin_right = attributes[:'MarginRight'] end if attributes.key?(:'PdfFormat') self.pdf_format = attributes[:'PdfFormat'] end if attributes.key?(:'RemovePdfaCompliance') self.remove_pdfa_compliance = attributes[:'RemovePdfaCompliance'] end if attributes.key?(:'Zoom') self.zoom = attributes[:'Zoom'] end if attributes.key?(:'Linearize') self.linearize = attributes[:'Linearize'] end if attributes.key?(:'LinkDuplicateStreams') self.link_duplicate_streams = attributes[:'LinkDuplicateStreams'] end if attributes.key?(:'RemoveUnusedObjects') self.remove_unused_objects = attributes[:'RemoveUnusedObjects'] end if attributes.key?(:'RemoveUnusedStreams') self.remove_unused_streams = attributes[:'RemoveUnusedStreams'] end if attributes.key?(:'CompressImages') self.compress_images = attributes[:'CompressImages'] end if attributes.key?(:'ImageQuality') self.image_quality = attributes[:'ImageQuality'] end if attributes.key?(:'UnembedFonts') self. = attributes[:'UnembedFonts'] end if attributes.key?(:'Grayscale') self.grayscale = attributes[:'Grayscale'] end if attributes.key?(:'CenterWindow') self.center_window = attributes[:'CenterWindow'] end if attributes.key?(:'Direction') self.direction = attributes[:'Direction'] end if attributes.key?(:'DisplayDocTitle') self.display_doc_title = attributes[:'DisplayDocTitle'] end if attributes.key?(:'FitWindow') self.fit_window = attributes[:'FitWindow'] end if attributes.key?(:'HideMenuBar') self. = attributes[:'HideMenuBar'] end if attributes.key?(:'HideToolBar') self. = attributes[:'HideToolBar'] end if attributes.key?(:'HideWindowUI') self.hide_window_ui = attributes[:'HideWindowUI'] end if attributes.key?(:'NonFullScreenPageMode') self.non_full_screen_page_mode = attributes[:'NonFullScreenPageMode'] end if attributes.key?(:'PageLayout') self.page_layout = attributes[:'PageLayout'] end if attributes.key?(:'PageMode') self.page_mode = attributes[:'PageMode'] end if attributes.key?(:'Rotate') self.rotate = attributes[:'Rotate'] end if attributes.key?(:'PageSize') self.page_size = attributes[:'PageSize'] end if attributes.key?(:'PageOrientation') self.page_orientation = attributes[:'PageOrientation'] end end |
Instance Attribute Details
#center_window ⇒ Object
Specify whether position of the document’s window will be centered on the screen. Default: false.
104 105 106 |
# File 'lib/groupdocs_conversion_cloud/models/pdf_convert_options.rb', line 104 def center_window @center_window end |
#compress_images ⇒ Object
If CompressImages set to true, all images in the document are recompressed. The compression is defined by the ImageQuality property.
92 93 94 |
# File 'lib/groupdocs_conversion_cloud/models/pdf_convert_options.rb', line 92 def compress_images @compress_images end |
#direction ⇒ Object
Sets reading order of text: L2R (left to right) or R2L (right to left). Default: L2R.
107 108 109 |
# File 'lib/groupdocs_conversion_cloud/models/pdf_convert_options.rb', line 107 def direction @direction end |
#display_doc_title ⇒ Object
Specifying whether document’s window title bar should display document title. Default: false.
110 111 112 |
# File 'lib/groupdocs_conversion_cloud/models/pdf_convert_options.rb', line 110 def display_doc_title @display_doc_title end |
#dpi ⇒ Object
Desired page DPI after conversion. The default resolution is: 96dpi
53 54 55 |
# File 'lib/groupdocs_conversion_cloud/models/pdf_convert_options.rb', line 53 def dpi @dpi end |
#fit_window ⇒ Object
Specify whether document window must be resized to fit the first displayed page. Default: false.
113 114 115 |
# File 'lib/groupdocs_conversion_cloud/models/pdf_convert_options.rb', line 113 def fit_window @fit_window end |
#from_page ⇒ Object
Start conversion from FromPage page
35 36 37 |
# File 'lib/groupdocs_conversion_cloud/models/pdf_convert_options.rb', line 35 def from_page @from_page end |
#grayscale ⇒ Object
Convert a PDF from RGB colorspace to Grayscale
101 102 103 |
# File 'lib/groupdocs_conversion_cloud/models/pdf_convert_options.rb', line 101 def grayscale @grayscale end |
#height ⇒ Object
Desired page height in pixels after conversion
50 51 52 |
# File 'lib/groupdocs_conversion_cloud/models/pdf_convert_options.rb', line 50 def height @height end |
#hide_menu_bar ⇒ Object
Specify whether menu bar should be hidden when document is active. Default: false.
116 117 118 |
# File 'lib/groupdocs_conversion_cloud/models/pdf_convert_options.rb', line 116 def @hide_menu_bar end |
#hide_tool_bar ⇒ Object
Specifying whether toolbar should be hidden when document is active. Default: false.
119 120 121 |
# File 'lib/groupdocs_conversion_cloud/models/pdf_convert_options.rb', line 119 def @hide_tool_bar end |
#hide_window_ui ⇒ Object
Specify whether user interface elements should be hidden when document is active. Default: false.
122 123 124 |
# File 'lib/groupdocs_conversion_cloud/models/pdf_convert_options.rb', line 122 def hide_window_ui @hide_window_ui end |
#image_quality ⇒ Object
Value in percent where 100% is unchanged quality and image size. To decrease the image size, use ImageQuality less than 100
95 96 97 |
# File 'lib/groupdocs_conversion_cloud/models/pdf_convert_options.rb', line 95 def image_quality @image_quality end |
#linearize ⇒ Object
Linearize PDF Document for the Web
80 81 82 |
# File 'lib/groupdocs_conversion_cloud/models/pdf_convert_options.rb', line 80 def linearize @linearize end |
#link_duplicate_streams ⇒ Object
Link duplicate streams
83 84 85 |
# File 'lib/groupdocs_conversion_cloud/models/pdf_convert_options.rb', line 83 def link_duplicate_streams @link_duplicate_streams end |
#margin_bottom ⇒ Object
Desired page bottom margin in pixels after conversion
62 63 64 |
# File 'lib/groupdocs_conversion_cloud/models/pdf_convert_options.rb', line 62 def margin_bottom @margin_bottom end |
#margin_left ⇒ Object
Desired page left margin in pixels after conversion
65 66 67 |
# File 'lib/groupdocs_conversion_cloud/models/pdf_convert_options.rb', line 65 def margin_left @margin_left end |
#margin_right ⇒ Object
Desired page right margin in pixels after conversion
68 69 70 |
# File 'lib/groupdocs_conversion_cloud/models/pdf_convert_options.rb', line 68 def margin_right @margin_right end |
#margin_top ⇒ Object
Desired page top margin in pixels after conversion
59 60 61 |
# File 'lib/groupdocs_conversion_cloud/models/pdf_convert_options.rb', line 59 def margin_top @margin_top end |
#non_full_screen_page_mode ⇒ Object
Sets page mode, specifying how to display the document on exiting full-screen mode.
125 126 127 |
# File 'lib/groupdocs_conversion_cloud/models/pdf_convert_options.rb', line 125 def non_full_screen_page_mode @non_full_screen_page_mode end |
#page_layout ⇒ Object
Sets page layout which shall be used when the document is opened.
128 129 130 |
# File 'lib/groupdocs_conversion_cloud/models/pdf_convert_options.rb', line 128 def page_layout @page_layout end |
#page_mode ⇒ Object
Sets page mode, specifying how document should be displayed when opened.
131 132 133 |
# File 'lib/groupdocs_conversion_cloud/models/pdf_convert_options.rb', line 131 def page_mode @page_mode end |
#page_orientation ⇒ Object
Specifies page orientation
140 141 142 |
# File 'lib/groupdocs_conversion_cloud/models/pdf_convert_options.rb', line 140 def page_orientation @page_orientation end |
#page_size ⇒ Object
Specifies page size
137 138 139 |
# File 'lib/groupdocs_conversion_cloud/models/pdf_convert_options.rb', line 137 def page_size @page_size end |
#pages ⇒ Object
Convert specific pages. The list contains the page indexes of the pages to be converted
41 42 43 |
# File 'lib/groupdocs_conversion_cloud/models/pdf_convert_options.rb', line 41 def pages @pages end |
#pages_count ⇒ Object
Number of pages to convert
38 39 40 |
# File 'lib/groupdocs_conversion_cloud/models/pdf_convert_options.rb', line 38 def pages_count @pages_count end |
#password ⇒ Object
Set this property if you want to protect the converted document with a password
56 57 58 |
# File 'lib/groupdocs_conversion_cloud/models/pdf_convert_options.rb', line 56 def password @password end |
#pdf_format ⇒ Object
Set the pdf format of the converted document.
71 72 73 |
# File 'lib/groupdocs_conversion_cloud/models/pdf_convert_options.rb', line 71 def pdf_format @pdf_format end |
#remove_pdfa_compliance ⇒ Object
Remove Pdf-A Compliance
74 75 76 |
# File 'lib/groupdocs_conversion_cloud/models/pdf_convert_options.rb', line 74 def remove_pdfa_compliance @remove_pdfa_compliance end |
#remove_unused_objects ⇒ Object
Remove unused objects
86 87 88 |
# File 'lib/groupdocs_conversion_cloud/models/pdf_convert_options.rb', line 86 def remove_unused_objects @remove_unused_objects end |
#remove_unused_streams ⇒ Object
Remove unused streams
89 90 91 |
# File 'lib/groupdocs_conversion_cloud/models/pdf_convert_options.rb', line 89 def remove_unused_streams @remove_unused_streams end |
#rotate ⇒ Object
Rotate page
134 135 136 |
# File 'lib/groupdocs_conversion_cloud/models/pdf_convert_options.rb', line 134 def rotate @rotate end |
#unembed_fonts ⇒ Object
Make fonts not embedded if set to true
98 99 100 |
# File 'lib/groupdocs_conversion_cloud/models/pdf_convert_options.rb', line 98 def @unembed_fonts end |
#watermark_options ⇒ Object
Watermark specific options
44 45 46 |
# File 'lib/groupdocs_conversion_cloud/models/pdf_convert_options.rb', line 44 def @watermark_options end |
#width ⇒ Object
Desired page width in pixels after conversion
47 48 49 |
# File 'lib/groupdocs_conversion_cloud/models/pdf_convert_options.rb', line 47 def width @width end |
#zoom ⇒ Object
Specifies the zoom level in percentage. Default is 100.
77 78 79 |
# File 'lib/groupdocs_conversion_cloud/models/pdf_convert_options.rb', line 77 def zoom @zoom end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
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 195 196 197 198 199 200 201 202 203 |
# File 'lib/groupdocs_conversion_cloud/models/pdf_convert_options.rb', line 164 def self.attribute_map { :'from_page' => :'FromPage', :'pages_count' => :'PagesCount', :'pages' => :'Pages', :'watermark_options' => :'WatermarkOptions', :'width' => :'Width', :'height' => :'Height', :'dpi' => :'Dpi', :'password' => :'Password', :'margin_top' => :'MarginTop', :'margin_bottom' => :'MarginBottom', :'margin_left' => :'MarginLeft', :'margin_right' => :'MarginRight', :'pdf_format' => :'PdfFormat', :'remove_pdfa_compliance' => :'RemovePdfaCompliance', :'zoom' => :'Zoom', :'linearize' => :'Linearize', :'link_duplicate_streams' => :'LinkDuplicateStreams', :'remove_unused_objects' => :'RemoveUnusedObjects', :'remove_unused_streams' => :'RemoveUnusedStreams', :'compress_images' => :'CompressImages', :'image_quality' => :'ImageQuality', :'unembed_fonts' => :'UnembedFonts', :'grayscale' => :'Grayscale', :'center_window' => :'CenterWindow', :'direction' => :'Direction', :'display_doc_title' => :'DisplayDocTitle', :'fit_window' => :'FitWindow', :'hide_menu_bar' => :'HideMenuBar', :'hide_tool_bar' => :'HideToolBar', :'hide_window_ui' => :'HideWindowUI', :'non_full_screen_page_mode' => :'NonFullScreenPageMode', :'page_layout' => :'PageLayout', :'page_mode' => :'PageMode', :'rotate' => :'Rotate', :'page_size' => :'PageSize', :'page_orientation' => :'PageOrientation' } end |
.swagger_types ⇒ Object
Attribute type mapping.
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 |
# File 'lib/groupdocs_conversion_cloud/models/pdf_convert_options.rb', line 206 def self.swagger_types { :'from_page' => :'Integer', :'pages_count' => :'Integer', :'pages' => :'Array<Integer>', :'watermark_options' => :'WatermarkOptions', :'width' => :'Integer', :'height' => :'Integer', :'dpi' => :'Integer', :'password' => :'String', :'margin_top' => :'Integer', :'margin_bottom' => :'Integer', :'margin_left' => :'Integer', :'margin_right' => :'Integer', :'pdf_format' => :'String', :'remove_pdfa_compliance' => :'BOOLEAN', :'zoom' => :'Integer', :'linearize' => :'BOOLEAN', :'link_duplicate_streams' => :'BOOLEAN', :'remove_unused_objects' => :'BOOLEAN', :'remove_unused_streams' => :'BOOLEAN', :'compress_images' => :'BOOLEAN', :'image_quality' => :'Integer', :'unembed_fonts' => :'BOOLEAN', :'grayscale' => :'BOOLEAN', :'center_window' => :'BOOLEAN', :'direction' => :'String', :'display_doc_title' => :'BOOLEAN', :'fit_window' => :'BOOLEAN', :'hide_menu_bar' => :'BOOLEAN', :'hide_tool_bar' => :'BOOLEAN', :'hide_window_ui' => :'BOOLEAN', :'non_full_screen_page_mode' => :'String', :'page_layout' => :'String', :'page_mode' => :'String', :'rotate' => :'String', :'page_size' => :'String', :'page_orientation' => :'String' } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 |
# File 'lib/groupdocs_conversion_cloud/models/pdf_convert_options.rb', line 711 def ==(other) return true if self.equal?(other) self.class == other.class && from_page == other.from_page && pages_count == other.pages_count && pages == other.pages && == other. && width == other.width && height == other.height && dpi == other.dpi && password == other.password && margin_top == other.margin_top && margin_bottom == other.margin_bottom && margin_left == other.margin_left && margin_right == other.margin_right && pdf_format == other.pdf_format && remove_pdfa_compliance == other.remove_pdfa_compliance && zoom == other.zoom && linearize == other.linearize && link_duplicate_streams == other.link_duplicate_streams && remove_unused_objects == other.remove_unused_objects && remove_unused_streams == other.remove_unused_streams && compress_images == other.compress_images && image_quality == other.image_quality && == other. && grayscale == other.grayscale && center_window == other.center_window && direction == other.direction && display_doc_title == other.display_doc_title && fit_window == other.fit_window && == other. && == other. && hide_window_ui == other.hide_window_ui && non_full_screen_page_mode == other.non_full_screen_page_mode && page_layout == other.page_layout && page_mode == other.page_mode && rotate == other.rotate && page_size == other.page_size && page_orientation == other.page_orientation end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 |
# File 'lib/groupdocs_conversion_cloud/models/pdf_convert_options.rb', line 797 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 = GroupDocsConversionCloud.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
864 865 866 867 868 869 870 871 872 873 874 875 876 |
# File 'lib/groupdocs_conversion_cloud/models/pdf_convert_options.rb', line 864 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
773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 |
# File 'lib/groupdocs_conversion_cloud/models/pdf_convert_options.rb', line 773 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
754 755 756 |
# File 'lib/groupdocs_conversion_cloud/models/pdf_convert_options.rb', line 754 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
760 761 762 |
# File 'lib/groupdocs_conversion_cloud/models/pdf_convert_options.rb', line 760 def hash [from_page, pages_count, pages, , width, height, dpi, password, margin_top, margin_bottom, margin_left, margin_right, pdf_format, remove_pdfa_compliance, zoom, linearize, link_duplicate_streams, remove_unused_objects, remove_unused_streams, compress_images, image_quality, , grayscale, center_window, direction, display_doc_title, fit_window, , , hide_window_ui, non_full_screen_page_mode, page_layout, page_mode, rotate, page_size, page_orientation].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 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 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 |
# File 'lib/groupdocs_conversion_cloud/models/pdf_convert_options.rb', line 405 def list_invalid_properties invalid_properties = [] if @from_page.nil? invalid_properties.push("invalid value for 'from_page', from_page cannot be nil.") end if @pages_count.nil? invalid_properties.push("invalid value for 'pages_count', pages_count cannot be nil.") end if @width.nil? invalid_properties.push("invalid value for 'width', width cannot be nil.") end if @height.nil? invalid_properties.push("invalid value for 'height', height cannot be nil.") end if @dpi.nil? invalid_properties.push("invalid value for 'dpi', dpi cannot be nil.") end if @margin_top.nil? invalid_properties.push("invalid value for 'margin_top', margin_top cannot be nil.") end if @margin_bottom.nil? invalid_properties.push("invalid value for 'margin_bottom', margin_bottom cannot be nil.") end if @margin_left.nil? invalid_properties.push("invalid value for 'margin_left', margin_left cannot be nil.") end if @margin_right.nil? invalid_properties.push("invalid value for 'margin_right', margin_right cannot be nil.") end if @pdf_format.nil? invalid_properties.push("invalid value for 'pdf_format', pdf_format cannot be nil.") end if @remove_pdfa_compliance.nil? invalid_properties.push("invalid value for 'remove_pdfa_compliance', remove_pdfa_compliance cannot be nil.") end if @zoom.nil? invalid_properties.push("invalid value for 'zoom', zoom cannot be nil.") end if @linearize.nil? invalid_properties.push("invalid value for 'linearize', linearize cannot be nil.") end if @link_duplicate_streams.nil? invalid_properties.push("invalid value for 'link_duplicate_streams', link_duplicate_streams cannot be nil.") end if @remove_unused_objects.nil? invalid_properties.push("invalid value for 'remove_unused_objects', remove_unused_objects cannot be nil.") end if @remove_unused_streams.nil? invalid_properties.push("invalid value for 'remove_unused_streams', remove_unused_streams cannot be nil.") end if @compress_images.nil? invalid_properties.push("invalid value for 'compress_images', compress_images cannot be nil.") end if @image_quality.nil? invalid_properties.push("invalid value for 'image_quality', image_quality cannot be nil.") end if @unembed_fonts.nil? invalid_properties.push("invalid value for 'unembed_fonts', unembed_fonts cannot be nil.") end if @grayscale.nil? invalid_properties.push("invalid value for 'grayscale', grayscale cannot be nil.") end if @center_window.nil? invalid_properties.push("invalid value for 'center_window', center_window cannot be nil.") end if @direction.nil? invalid_properties.push("invalid value for 'direction', direction cannot be nil.") end if @display_doc_title.nil? invalid_properties.push("invalid value for 'display_doc_title', display_doc_title cannot be nil.") end if @fit_window.nil? invalid_properties.push("invalid value for 'fit_window', fit_window cannot be nil.") end if @hide_menu_bar.nil? invalid_properties.push("invalid value for 'hide_menu_bar', hide_menu_bar cannot be nil.") end if @hide_tool_bar.nil? invalid_properties.push("invalid value for 'hide_tool_bar', hide_tool_bar cannot be nil.") end if @hide_window_ui.nil? invalid_properties.push("invalid value for 'hide_window_ui', hide_window_ui cannot be nil.") end if @non_full_screen_page_mode.nil? invalid_properties.push("invalid value for 'non_full_screen_page_mode', non_full_screen_page_mode cannot be nil.") end if @page_layout.nil? invalid_properties.push("invalid value for 'page_layout', page_layout cannot be nil.") end if @page_mode.nil? invalid_properties.push("invalid value for 'page_mode', page_mode cannot be nil.") end if @rotate.nil? invalid_properties.push("invalid value for 'rotate', rotate cannot be nil.") end if @page_size.nil? invalid_properties.push("invalid value for 'page_size', page_size cannot be nil.") end if @page_orientation.nil? invalid_properties.push("invalid value for 'page_orientation', page_orientation cannot be nil.") end return invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
844 845 846 |
# File 'lib/groupdocs_conversion_cloud/models/pdf_convert_options.rb', line 844 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
850 851 852 853 854 855 856 857 858 |
# File 'lib/groupdocs_conversion_cloud/models/pdf_convert_options.rb', line 850 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
838 839 840 |
# File 'lib/groupdocs_conversion_cloud/models/pdf_convert_options.rb', line 838 def to_s to_hash.to_s end |
#uncap(str) ⇒ Object
Downcases first letter.
766 767 768 |
# File 'lib/groupdocs_conversion_cloud/models/pdf_convert_options.rb', line 766 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
544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 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 |
# File 'lib/groupdocs_conversion_cloud/models/pdf_convert_options.rb', line 544 def valid? return false if @from_page.nil? return false if @pages_count.nil? return false if @width.nil? return false if @height.nil? return false if @dpi.nil? return false if @margin_top.nil? return false if @margin_bottom.nil? return false if @margin_left.nil? return false if @margin_right.nil? return false if @pdf_format.nil? pdf_format_validator = EnumAttributeValidator.new('String', ["Default", "PdfA_1A", "PdfA_1B", "PdfA_2A", "PdfA_3A", "PdfA_2B", "PdfA_2U", "PdfA_3B", "PdfA_3U", "v1_3", "v1_4", "v1_5", "v1_6", "v1_7", "PdfX_1A", "PdfX3"]) return false unless pdf_format_validator.valid?(@pdf_format) return false if @remove_pdfa_compliance.nil? return false if @zoom.nil? return false if @linearize.nil? return false if @link_duplicate_streams.nil? return false if @remove_unused_objects.nil? return false if @remove_unused_streams.nil? return false if @compress_images.nil? return false if @image_quality.nil? return false if @unembed_fonts.nil? return false if @grayscale.nil? return false if @center_window.nil? return false if @direction.nil? direction_validator = EnumAttributeValidator.new('String', ["L2R", "R2L"]) return false unless direction_validator.valid?(@direction) return false if @display_doc_title.nil? return false if @fit_window.nil? return false if @hide_menu_bar.nil? return false if @hide_tool_bar.nil? return false if @hide_window_ui.nil? return false if @non_full_screen_page_mode.nil? non_full_screen_page_mode_validator = EnumAttributeValidator.new('String', ["UseNone", "UseOutlines", "UseThumbs", "FullScreen", "UseOC", "UseAttachments"]) return false unless non_full_screen_page_mode_validator.valid?(@non_full_screen_page_mode) return false if @page_layout.nil? page_layout_validator = EnumAttributeValidator.new('String', ["Default", "SinglePage", "OneColumn", "TwoColumnLeft", "TwoColumnRight", "TwoPageLeft", "TwoPageRight"]) return false unless page_layout_validator.valid?(@page_layout) return false if @page_mode.nil? page_mode_validator = EnumAttributeValidator.new('String', ["UseNone", "UseOutlines", "UseThumbs", "FullScreen", "UseOC", "UseAttachments"]) return false unless page_mode_validator.valid?(@page_mode) return false if @rotate.nil? rotate_validator = EnumAttributeValidator.new('String', ["None", "On90", "On180", "On270"]) return false unless rotate_validator.valid?(@rotate) return false if @page_size.nil? page_size_validator = EnumAttributeValidator.new('String', ["Default", "A3", "Statement", "Quarto", "Paper11x17", "Paper10x14", "Letter", "Legal", "Ledger", "Folio", "Executive", "EnvelopeDL", "Custom", "B5", "B4", "A5", "A4", "Tabloid"]) return false unless page_size_validator.valid?(@page_size) return false if @page_orientation.nil? page_orientation_validator = EnumAttributeValidator.new('String', ["Default", "Landscape", "Portrait"]) return false unless page_orientation_validator.valid?(@page_orientation) return true end |