Sha256: 7ddef130fa192187c85beffe04eadf60ec8631318a1603f48786985098b42003

Contents?: true

Size: 742 Bytes

Versions: 2

Compression:

Stored size: 742 Bytes

Contents

module Asposeslidesjava
  module Hyperlinks
    def initialize()
        data_dir = File.dirname(File.dirname(File.dirname(File.dirname(__FILE__)))) + '/data/'
                
        # Instantiate Presentation class that represents the presentation file
        pres = Rjb::import('com.aspose.slides.Presentation').new(data_dir + 'demo.pptx')

        # Removing the hyperlinks from presentation
        pres.getHyperlinkQueries().removeAllHyperlinks()

        # Saving the presentation
        save_format = Rjb::import('com.aspose.slides.SaveFormat')
        pres.save(data_dir + "Hyperlinks.pptx", save_format.Pptx)

        puts "Removed hyperlinks successfully, please check the output file."
    end    
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
asposeslidesjava-0.0.2 lib/asposeslidesjava/Slides/hyperlinks.rb
asposeslidesjava-0.0.1 lib/asposeslidesjava/Slides/hyperlinks.rb