Method: Aspose::Cloud::Words::Extractor#get_drawing_objects

Defined in:
lib/Words/extractor.rb

#get_drawing_objects(output_path) ⇒ Object

Get the List of drawing object from document

@param string output_path


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
# File 'lib/Words/extractor.rb', line 277

def get_drawing_objects output_path
      
  begin

    if @filename == ''
      raise 'Base file not specified.'
    end

    if output_path == ''
      raise 'Output path not specified.'
    end

    str_uri = $product_uri + '/words/' + @filename + '/drawingObjects'
    signed_str_uri = Aspose::Cloud::Common::Utils.sign(str_uri)

    response_stream = RestClient.get(signed_str_uri,{:accept=>'application/json'})

    stream_hash = JSON.parse(response_stream)

    if(stream_hash['Code'] == 200)
  
      stream_hash['DrawingObjects']['List'].each { |object| 
  
        self.get_drawing_object(object['link']['Href'], output_path)
    
      }
  
    else
      return false
    end

  rescue Exception=>e
    print e
  end
      
end