Skip to content

Commit 7b80dd7

Browse files
Updated With 19.4 Release
1 parent 5fa3c6c commit 7b80dd7

4 files changed

Lines changed: 83 additions & 13 deletions

File tree

src/Run_Examples.py

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
from Common_Utilities.Utils import Common_Utilities
44

55
# Get your app_sid and app_key at https://dashboard.groupdocs.cloud (free registration is required).
6-
Common_Utilities.host_url = "http://api.groupdocs.cloud" # Put your Host URL here
7-
Common_Utilities.app_sid = "XXXXX-XX"
8-
Common_Utilities.app_key = "XXXXXX"
9-
Common_Utilities.myStorage = "XXX"
6+
Common_Utilities.host_url = "https://api.groupdocs.cloud" # Put your Host URL here
7+
Common_Utilities.app_sid = "XXXXX-XXXXX-XXXXX"
8+
Common_Utilities.app_key = "XXXXXXXXXX"
9+
Common_Utilities.myStorage = "XXXXX"
1010

11-
# #########################################
12-
# print("Executing Upload Test Files...")
13-
# Common_Utilities.Upload_Test_Files()
14-
# #########################################
11+
#########################################
12+
print("Executing Upload Test Files...")
13+
Common_Utilities.Upload_Test_Files()
14+
#########################################
1515

1616
###########################################
1717
#******* Execute Examples *******
@@ -99,9 +99,9 @@
9999
print("*** Executing Working_With_Document_Information...")
100100
############################################################
101101

102-
print("* Executing Viewer_Python_Get_Info_With_Minimal_ViewOptions...")
103-
from Working_With_Document_Information.Viewer_Python_Get_Info_With_Minimal_ViewOptions import Viewer_Python_Get_Info_With_Minimal_ViewOptions
104-
Viewer_Python_Get_Info_With_Minimal_ViewOptions.Run()
102+
# print("* Executing Viewer_Python_Get_Info_With_Minimal_ViewOptions...")
103+
# from Working_With_Document_Information.Viewer_Python_Get_Info_With_Minimal_ViewOptions import Viewer_Python_Get_Info_With_Minimal_ViewOptions
104+
# Viewer_Python_Get_Info_With_Minimal_ViewOptions.Run()
105105

106106
# print("* Executing Viewer_Python_Get_Info_With_CAD_Options...")
107107
# from Working_With_Document_Information.Viewer_Python_Get_Info_With_CAD_Options import Viewer_Python_Get_Info_With_CAD_Options
@@ -186,3 +186,11 @@
186186
# print("* Executing Viewer_Python_Delete_View_With_Default_ViewFormat...")
187187
# from Working_With_View.Viewer_Python_Delete_View_With_Default_ViewFormat import Viewer_Python_Delete_View_With_Default_ViewFormat
188188
# Viewer_Python_Delete_View_With_Default_ViewFormat.Run()
189+
190+
print("* Executing Viewer_Python_Create_View_With_Responsive_HTML...")
191+
from Working_With_View.Viewer_Python_Create_View_With_Responsive_HTML import Viewer_Python_Create_View_With_Responsive_HTML
192+
Viewer_Python_Create_View_With_Responsive_HTML.Run()
193+
194+
print("* Executing Viewer_Python_Create_View_With_OutputPath...")
195+
from Working_With_View.Viewer_Python_Create_View_With_OutputPath import Viewer_Python_Create_View_With_OutputPath
196+
Viewer_Python_Create_View_With_OutputPath.Run()

src/Working_With_Folder/Viewer_Python_Create_Folder.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ def Run(self):
1010
api = Common_Utilities.Get_FolderApi_Instance()
1111

1212
try:
13-
request = groupdocs_viewer_cloud.CreateFolderRequest("viewerdocs", Common_Utilities.myStorage)
13+
request = groupdocs_viewer_cloud.CreateFolderRequest("Assembler", Common_Utilities.myStorage)
1414
api.create_folder(request)
1515

16-
print("Expected response type is Void: 'viewerdocs' folder created.")
16+
print("Expected response type is Void: 'Assembler' folder created.")
1717
except groupdocs_viewer_cloud.ApiException as e:
1818
print("Exception while calling API: {0}".format(e.message))
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Import modules
2+
import groupdocs_viewer_cloud
3+
from Common_Utilities.Utils import Common_Utilities
4+
5+
6+
class Viewer_Python_Create_View_With_OutputPath:
7+
8+
@classmethod
9+
def Run(self):
10+
# Create instance of the API
11+
api = Common_Utilities.Get_ViewerApi_Instance()
12+
13+
try:
14+
viewOptions = groupdocs_viewer_cloud.ViewOptions()
15+
16+
fileInfo = groupdocs_viewer_cloud.FileInfo()
17+
fileInfo.file_path = "viewerdocs\\sample.docx"
18+
fileInfo.password = ""
19+
fileInfo.storage_name = Common_Utilities.myStorage
20+
21+
viewOptions.file_info = fileInfo;
22+
viewOptions.output_path = "viewerdocs"
23+
24+
request = groupdocs_viewer_cloud.CreateViewRequest(viewOptions)
25+
response = api.create_view(request)
26+
27+
print("Expected response type is ViewResult: " + str(response))
28+
except groupdocs_viewer_cloud.ApiException as e:
29+
print("Exception while calling API: {0}".format(e.message))
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Import modules
2+
import groupdocs_viewer_cloud
3+
from Common_Utilities.Utils import Common_Utilities
4+
5+
6+
class Viewer_Python_Create_View_With_Responsive_HTML:
7+
8+
@classmethod
9+
def Run(self):
10+
# Create instance of the API
11+
api = Common_Utilities.Get_ViewerApi_Instance()
12+
13+
try:
14+
viewOptions = groupdocs_viewer_cloud.ViewOptions()
15+
16+
fileInfo = groupdocs_viewer_cloud.FileInfo()
17+
fileInfo.file_path = "viewerdocs\\three-layouts.dwf"
18+
fileInfo.password = ""
19+
fileInfo.storage_name = Common_Utilities.myStorage
20+
21+
viewOptions.file_info = fileInfo;
22+
23+
renderOptions = groupdocs_viewer_cloud.HtmlOptions()
24+
renderOptions.is_responsive = True
25+
26+
viewOptions.render_options = renderOptions
27+
28+
request = groupdocs_viewer_cloud.CreateViewRequest(viewOptions)
29+
response = api.create_view(request)
30+
31+
print("Expected response type is ViewResult: " + str(response))
32+
except groupdocs_viewer_cloud.ApiException as e:
33+
print("Exception while calling API: {0}".format(e.message))

0 commit comments

Comments
 (0)