Class: DynamicPDFApi::TiffImageFormat

Inherits:
ImageFormat show all
Defined in:
lib/ruby_client/Imaging/TiffImageFormat.rb

Overview

Represents TIFF image format with color format.

Instance Attribute Summary collapse

Attributes inherited from ImageFormat

#type

Instance Method Summary collapse

Constructor Details

#initializeTiffImageFormat

Initializes a new instance of the TiffImageFormat class.



15
16
17
18
19
# File 'lib/ruby_client/Imaging/TiffImageFormat.rb', line 15

def initialize
  super(ImageFormatType::TIFF)
  @multi_page = false
  @color_format = nil
end

Instance Attribute Details

#color_formatObject

Gets or sets the color format for TIFF, TiffColorFormat.



10
11
12
# File 'lib/ruby_client/Imaging/TiffImageFormat.rb', line 10

def color_format
  @color_format
end

#multi_pageObject

Gets or sets a value indicating whether the TIFF image format supports multiple pages.



9
10
11
# File 'lib/ruby_client/Imaging/TiffImageFormat.rb', line 9

def multi_page
  @multi_page
end

Instance Method Details

#to_json(_options = {}) ⇒ String

Returns a JSON representation of the TiffImageFormat object.

Returns:

  • (String)

    JSON string representing the TiffImageFormat object.



26
27
28
29
30
31
32
# File 'lib/ruby_client/Imaging/TiffImageFormat.rb', line 26

def to_json(_options = {})
  json_array = {}
  json_array['multiPage'] = @multi_page
  json_array['colorFormat'] = @color_format  # Assuming TiffColorFormat has implemented to_json method.

  JSON.pretty_generate(json_array)
end