Skip to content

Commit 5888cd8

Browse files
Merge pull request #3 from rizwanniazigroupdocs/master
Updated With 19.4 Release
2 parents 49077f1 + aba920f commit 5888cd8

5 files changed

Lines changed: 70 additions & 6 deletions

File tree

Examples/Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ gemspec
55
group :development, :test do
66
gem 'rake', '~> 12.0.0'
77
end
8-
gem "groupdocs_viewer_cloud", "~> 19.3.2"
8+
gem "groupdocs_viewer_cloud", "~> 19.4"

Examples/Gemfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
groupdocs_viewer_cloud (19.3.2)
4+
groupdocs_viewer_cloud (19.4)
55
addressable (~> 2.5.0, >= 2.5.0)
66
faraday (~> 0.14.0)
77
mimemagic (~> 0.3.2)
@@ -26,7 +26,7 @@ PLATFORMS
2626
x64-mingw32
2727

2828
DEPENDENCIES
29-
groupdocs_viewer_cloud (~> 19.3.2, >= 19.3.2)
29+
groupdocs_viewer_cloud (~> 19.4, >= 19.4)
3030
groupdocs_viewer_cloud!
3131
minitest (~> 5.11, >= 5.11.3)
3232
rake (~> 12.0.0)

Examples/src/Run_Examples.rb

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
require 'common_utilities/Utils.rb'
22

33
# Get your app_sid and app_key at https://dashboard.groupdocs.cloud (free registration is required).
4-
$app_sid = "d215ce72-1609-4282-8d55-5810942236fb"
5-
$app_key = "715d18b0afef2f303882c769921fe05a"
6-
$myStorage = "MyStorage" #Put your storage name here
4+
$app_sid = "XXXXX-XXXXX-XXXXX"
5+
$app_key = "XXXXXXXXXX"
6+
$myStorage = "XXXXX" #Put your storage name here
77
$host_url = "http://api.groupdocs.cloud" # Put your Host URL here
88

99
class Run_Examples
@@ -183,4 +183,12 @@ class Run_Examples
183183
# puts("* Executing Viewer_Ruby_Delete_View_With_Default_ViewFormat...")
184184
# Working_With_View.Viewer_Ruby_Delete_View_With_Default_ViewFormat()
185185

186+
# require 'Working_With_View/Viewer_Ruby_Create_View_With_Responsive_HTML.rb'
187+
# puts("* Executing Viewer_Ruby_Create_View_With_Responsive_HTML...")
188+
# Working_With_View.Viewer_Ruby_Create_View_With_Responsive_HTML()
189+
190+
# require 'Working_With_View/Viewer_Ruby_Create_View_With_OutputPath.rb'
191+
# puts("* Executing Viewer_Ruby_Create_View_With_OutputPath...")
192+
# Working_With_View.Viewer_Ruby_Create_View_With_OutputPath()
193+
186194
end
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Load the gem
2+
require 'groupdocs_viewer_cloud'
3+
require 'common_utilities/Utils.rb'
4+
5+
class Working_With_View
6+
def self.Viewer_Ruby_Create_View_With_OutputPath()
7+
8+
# Getting instance of the API
9+
$api = Common_Utilities.Get_ViewerApi_Instance()
10+
11+
$viewOptions = GroupDocsViewerCloud::ViewOptions.new()
12+
13+
$fileInfo = GroupDocsViewerCloud::FileInfo.new()
14+
$fileInfo.file_path = "viewerdocs/sample.docx"
15+
$fileInfo.password = ""
16+
$fileInfo.storage_name = $myStorage
17+
18+
$viewOptions.file_info = $fileInfo;
19+
$viewOptions.output_path = "viewerdocs"
20+
21+
$request = GroupDocsViewerCloud::CreateViewRequest.new($viewOptions)
22+
$response = $api.create_view($request)
23+
24+
puts("Expected response type is ViewResult: " + ($response).to_s)
25+
end
26+
end
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Load the gem
2+
require 'groupdocs_viewer_cloud'
3+
require 'common_utilities/Utils.rb'
4+
5+
class Working_With_View
6+
def self.Viewer_Ruby_Create_View_With_Responsive_HTML()
7+
8+
# Getting instance of the API
9+
$api = Common_Utilities.Get_ViewerApi_Instance()
10+
11+
$viewOptions = GroupDocsViewerCloud::ViewOptions.new()
12+
13+
$fileInfo = GroupDocsViewerCloud::FileInfo.new()
14+
$fileInfo.file_path = "viewerdocs/three-layouts.dwf"
15+
$fileInfo.password = ""
16+
$fileInfo.storage_name = $myStorage
17+
18+
$viewOptions.file_info = $fileInfo;
19+
20+
$renderOptions = GroupDocsViewerCloud::HtmlOptions.new()
21+
$renderOptions.is_responsive = true
22+
23+
$viewOptions.render_options = $renderOptions
24+
25+
$request = GroupDocsViewerCloud::CreateViewRequest.new($viewOptions)
26+
$response = $api.create_view($request)
27+
28+
puts("Expected response type is ViewResult: " + ($response).to_s)
29+
end
30+
end

0 commit comments

Comments
 (0)