Sha256: 0dc99b2c36fdecbafdb2b9788f838dd6777685efa0e98c91a59960c81a4cc4f3

Contents?: true

Size: 934 Bytes

Versions: 1

Compression:

Stored size: 934 Bytes

Contents

module Asposewordsjavaforruby
  module SaveAsMultipageTiff
    def initialize()
        # The path to the documents directory.
        data_dir = File.dirname(File.dirname(File.dirname(__FILE__))) + '/data/'

        # Open the document.
        doc = Rjb::import('com.aspose.words.Document').new(data_dir + "TestFile.doc")

        # Save the document as multipage TIFF.
        doc.save(data_dir + "TestFile Out.doc")

        save_format = Rjb::import('com.aspose.words.SaveFormat')

        options = Rjb::import('com.aspose.words.ImageSaveOptions').new(save_format.TIFF)
        options.setPageIndex(0)
        options.setPageCount(2)
        
        tiff_compression = Rjb::import('com.aspose.words.TiffCompression')
        options.setTiffCompression(tiff_compression.CCITT_4)
        options.setResolution(160)

        doc.save(data_dir + "TestFileWithOptions Out.tiff", options)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
asposewordsjavaforruby-0.0.5 lib/asposewordsjavaforruby/saveasmultipagetiff.rb