groupdocs 1.6.0 → 1.7.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +34 -0
- data/LICENSE.txt +21 -0
- data/README.md +3 -0
- data/examples/api-samples/public/docs/sample01.html +23 -23
- data/examples/api-samples/public/docs/sample02.html +27 -27
- data/examples/api-samples/public/docs/sample03.html +81 -69
- data/examples/api-samples/public/docs/sample04.html +29 -29
- data/examples/api-samples/public/docs/sample05.html +48 -48
- data/examples/api-samples/public/docs/sample06.html +47 -46
- data/examples/api-samples/public/docs/sample07.html +35 -35
- data/examples/api-samples/public/docs/sample08.html +45 -45
- data/examples/api-samples/public/docs/sample09.html +57 -57
- data/examples/api-samples/public/docs/sample10.html +41 -41
- data/examples/api-samples/public/docs/sample11.html +96 -118
- data/examples/api-samples/public/docs/sample12.html +29 -50
- data/examples/api-samples/public/docs/sample13.html +36 -44
- data/examples/api-samples/public/docs/sample14.html +29 -29
- data/examples/api-samples/public/docs/sample15.html +24 -24
- data/examples/api-samples/public/docs/sample16.html +32 -32
- data/examples/api-samples/public/docs/sample17.html +38 -38
- data/examples/api-samples/public/docs/sample18.html +105 -101
- data/examples/api-samples/public/docs/sample19.html +101 -101
- data/examples/api-samples/public/docs/sample20.html +42 -42
- data/examples/api-samples/public/docs/sample21.html +109 -109
- data/examples/api-samples/public/docs/sample22.html +56 -56
- data/examples/api-samples/public/docs/sample23.html +39 -39
- data/examples/api-samples/public/docs/sample24.html +36 -36
- data/examples/api-samples/public/docs/sample25.html +67 -67
- data/examples/api-samples/public/docs/sample26.html +23 -23
- data/examples/api-samples/public/docs/sample27.html +72 -72
- data/examples/api-samples/public/docs/sample28.html +46 -45
- data/examples/api-samples/public/docs/sample29.html +30 -30
- data/examples/api-samples/public/docs/sample30.html +30 -30
- data/examples/api-samples/public/docs/sample31.html +114 -114
- data/examples/api-samples/public/docs/sample32.html +96 -96
- data/examples/api-samples/public/docs/sample33.html +56 -56
- data/examples/api-samples/public/docs/sample34.html +27 -27
- data/examples/api-samples/public/docs/sample35.html +134 -135
- data/examples/api-samples/public/docs/sample36.html +32 -32
- data/examples/api-samples/public/docs/sample37.html +103 -103
- data/examples/api-samples/public/docs/sample38.html +76 -76
- data/examples/api-samples/public/docs/sample39.html +136 -136
- data/examples/api-samples/public/docs/sample40.html +104 -104
- data/examples/api-samples/public/docs/sample41.html +137 -137
- data/examples/api-samples/public/docs/sample42.html +61 -61
- data/examples/api-samples/public/docs/sample43.html +72 -72
- data/examples/api-samples/public/docs/sample44.html +751 -0
- data/examples/api-samples/public/docs/sample45.html +236 -0
- data/examples/api-samples/public/templates/merge_field3_doc.docx +0 -0
- data/examples/api-samples/samples/sample01.rb +2 -2
- data/examples/api-samples/samples/sample02.rb +2 -2
- data/examples/api-samples/samples/sample03.rb +2 -2
- data/examples/api-samples/samples/sample04.rb +2 -2
- data/examples/api-samples/samples/sample05.rb +2 -2
- data/examples/api-samples/samples/sample06.rb +2 -2
- data/examples/api-samples/samples/sample07.rb +2 -2
- data/examples/api-samples/samples/sample08.rb +2 -2
- data/examples/api-samples/samples/sample09.rb +2 -2
- data/examples/api-samples/samples/sample10.rb +2 -2
- data/examples/api-samples/samples/sample11.rb +2 -2
- data/examples/api-samples/samples/sample12.rb +2 -2
- data/examples/api-samples/samples/sample13.rb +2 -2
- data/examples/api-samples/samples/sample14.rb +2 -2
- data/examples/api-samples/samples/sample15.rb +2 -2
- data/examples/api-samples/samples/sample16.rb +2 -2
- data/examples/api-samples/samples/sample17.rb +2 -2
- data/examples/api-samples/samples/sample18.rb +2 -2
- data/examples/api-samples/samples/sample19.rb +2 -2
- data/examples/api-samples/samples/sample20.rb +2 -2
- data/examples/api-samples/samples/sample21.rb +2 -2
- data/examples/api-samples/samples/sample22.rb +2 -2
- data/examples/api-samples/samples/sample23.rb +2 -2
- data/examples/api-samples/samples/sample24.rb +2 -2
- data/examples/api-samples/samples/sample25.rb +2 -2
- data/examples/api-samples/samples/sample26.rb +2 -2
- data/examples/api-samples/samples/sample27.rb +2 -2
- data/examples/api-samples/samples/sample28.rb +2 -2
- data/examples/api-samples/samples/sample29.rb +2 -2
- data/examples/api-samples/samples/sample30.rb +2 -2
- data/examples/api-samples/samples/sample31.rb +2 -2
- data/examples/api-samples/samples/sample32.rb +2 -2
- data/examples/api-samples/samples/sample33.rb +2 -2
- data/examples/api-samples/samples/sample34.rb +2 -2
- data/examples/api-samples/samples/sample35.rb +4 -4
- data/examples/api-samples/samples/sample36.rb +2 -2
- data/examples/api-samples/samples/sample37.rb +2 -2
- data/examples/api-samples/samples/sample38.rb +2 -2
- data/examples/api-samples/samples/sample39.rb +2 -2
- data/examples/api-samples/samples/sample40.rb +2 -2
- data/examples/api-samples/samples/sample41.rb +2 -2
- data/examples/api-samples/samples/sample42.rb +2 -2
- data/examples/api-samples/samples/sample43.rb +2 -2
- data/examples/api-samples/samples/sample44.rb +188 -0
- data/examples/api-samples/samples/sample45.rb +74 -0
- data/examples/api-samples/views/_others_samples.haml +47 -43
- data/examples/api-samples/views/index.haml +55 -44
- data/examples/api-samples/views/layout.haml +1 -6
- data/examples/api-samples/views/sample01.haml +62 -57
- data/examples/api-samples/views/sample02.haml +52 -46
- data/examples/api-samples/views/sample03.haml +78 -73
- data/examples/api-samples/views/sample04.haml +51 -45
- data/examples/api-samples/views/sample05.haml +77 -71
- data/examples/api-samples/views/sample06.haml +58 -52
- data/examples/api-samples/views/sample07.haml +51 -45
- data/examples/api-samples/views/sample08.haml +90 -84
- data/examples/api-samples/views/sample09.haml +86 -80
- data/examples/api-samples/views/sample10.haml +83 -77
- data/examples/api-samples/views/sample11.haml +124 -120
- data/examples/api-samples/views/sample12.haml +65 -59
- data/examples/api-samples/views/sample13.haml +62 -56
- data/examples/api-samples/views/sample14.haml +57 -51
- data/examples/api-samples/views/sample15.haml +49 -43
- data/examples/api-samples/views/sample16.haml +49 -43
- data/examples/api-samples/views/sample17.haml +53 -47
- data/examples/api-samples/views/sample18.haml +140 -134
- data/examples/api-samples/views/sample19.haml +87 -81
- data/examples/api-samples/views/sample20.haml +53 -47
- data/examples/api-samples/views/sample21.haml +115 -111
- data/examples/api-samples/views/sample22.haml +94 -88
- data/examples/api-samples/views/sample23.haml +83 -78
- data/examples/api-samples/views/sample24.haml +54 -48
- data/examples/api-samples/views/sample25.haml +89 -83
- data/examples/api-samples/views/sample26.haml +62 -57
- data/examples/api-samples/views/sample27.haml +114 -109
- data/examples/api-samples/views/sample28.haml +55 -49
- data/examples/api-samples/views/sample29.haml +67 -69
- data/examples/api-samples/views/sample30.haml +54 -48
- data/examples/api-samples/views/sample31.haml +106 -100
- data/examples/api-samples/views/sample32.haml +90 -84
- data/examples/api-samples/views/sample33.haml +60 -54
- data/examples/api-samples/views/sample34.haml +51 -46
- data/examples/api-samples/views/sample35.haml +84 -78
- data/examples/api-samples/views/sample36.haml +63 -58
- data/examples/api-samples/views/sample37.haml +122 -116
- data/examples/api-samples/views/sample38.haml +104 -98
- data/examples/api-samples/views/sample39.haml +6 -2
- data/examples/api-samples/views/sample40.haml +94 -89
- data/examples/api-samples/views/sample41.haml +127 -123
- data/examples/api-samples/views/sample42.haml +60 -54
- data/examples/api-samples/views/sample43.haml +81 -77
- data/examples/api-samples/views/sample44.haml +85 -0
- data/examples/api-samples/views/sample45.haml +85 -0
- data/groupdocs.gemspec +2 -0
- data/lib/groupdocs/datasource/field.rb +9 -0
- data/lib/groupdocs/document.rb +66 -4
- data/lib/groupdocs/document/annotation.rb +11 -6
- data/lib/groupdocs/document/editor.rb +53 -0
- data/lib/groupdocs/document/field.rb +16 -0
- data/lib/groupdocs/document/style.rb +30 -0
- data/lib/groupdocs/job.rb +24 -0
- data/lib/groupdocs/questionnaire.rb +2 -0
- data/lib/groupdocs/questionnaire/collector.rb +52 -0
- data/lib/groupdocs/questionnaire/collector_style.rb +54 -0
- data/lib/groupdocs/questionnaire/question.rb +9 -0
- data/lib/groupdocs/questionnaire/style/base_font.rb +17 -0
- data/lib/groupdocs/questionnaire/style/question_title.rb +17 -0
- data/lib/groupdocs/questionnaire/style/title.rb +17 -0
- data/lib/groupdocs/signature/envelope.rb +43 -8
- data/lib/groupdocs/signature/form.rb +113 -12
- data/lib/groupdocs/signature/recipient.rb +38 -3
- data/lib/groupdocs/signature/shared/field_methods.rb +4 -2
- data/lib/groupdocs/signature/template.rb +20 -1
- data/lib/groupdocs/storage/file.rb +3 -2
- data/lib/groupdocs/user.rb +148 -0
- data/lib/groupdocs/version.rb +1 -1
- data/spec/groupdocs/api/helpers/access_rights_helper_spec.rb +5 -5
- data/spec/groupdocs/document/annotation_spec.rb +1 -1
- data/spec/groupdocs/signature/envelope_spec.rb +1 -1
- data/spec/groupdocs/user_spec.rb +4 -4
- data/spec/support/shared_examples/signature/shared/field_methods.rb +5 -4
- metadata +18 -3
@@ -31,9 +31,9 @@
|
|
31
31
|
|
32
32
|
</div>
|
33
33
|
|
34
|
-
<div class="content"><div class='highlight'><pre>get <span class="string">'/
|
35
|
-
haml <span class="symbol">:sample07</span>
|
36
|
-
<span class="keyword">end</span></pre></div></div>
|
34
|
+
<div class="content"><div class='highlight'><pre>get <span class="hljs-string">'/sample-7-how-to-create-a-list-of-thumbnails-for-a-document'</span> <span class="hljs-keyword">do</span>
|
35
|
+
haml <span class="hljs-symbol">:sample07</span>
|
36
|
+
<span class="hljs-keyword">end</span></pre></div></div>
|
37
37
|
|
38
38
|
</li>
|
39
39
|
|
@@ -48,7 +48,7 @@
|
|
48
48
|
|
49
49
|
</div>
|
50
50
|
|
51
|
-
<div class="content"><div class='highlight'><pre>post <span class="string">'/
|
51
|
+
<div class="content"><div class='highlight'><pre>post <span class="hljs-string">'/sample-7-how-to-create-a-list-of-thumbnails-for-a-document'</span> <span class="hljs-keyword">do</span></pre></div></div>
|
52
52
|
|
53
53
|
</li>
|
54
54
|
|
@@ -63,11 +63,11 @@
|
|
63
63
|
|
64
64
|
</div>
|
65
65
|
|
66
|
-
<div class="content"><div class='highlight'><pre> set <span class="symbol">:client_id</span>, params[<span class="symbol">:clientId</span>]
|
67
|
-
set <span class="symbol">:private_key</span>, params[<span class="symbol">:privateKey</span>]
|
68
|
-
set <span class="symbol">:base_path</span>, params[<span class="symbol">:basePath</span>]
|
66
|
+
<div class="content"><div class='highlight'><pre> set <span class="hljs-symbol">:client_id</span>, params[<span class="hljs-symbol">:clientId</span>]
|
67
|
+
set <span class="hljs-symbol">:private_key</span>, params[<span class="hljs-symbol">:privateKey</span>]
|
68
|
+
set <span class="hljs-symbol">:base_path</span>, params[<span class="hljs-symbol">:basePath</span>]
|
69
69
|
|
70
|
-
<span class="keyword">begin</span></pre></div></div>
|
70
|
+
<span class="hljs-keyword">begin</span></pre></div></div>
|
71
71
|
|
72
72
|
</li>
|
73
73
|
|
@@ -82,7 +82,7 @@
|
|
82
82
|
|
83
83
|
</div>
|
84
84
|
|
85
|
-
<div class="content"><div class='highlight'><pre> raise <span class="string">'Please enter all required parameters'</span> <span class="keyword">if</span> settings.client_id.empty? <span class="keyword">or</span> settings.private_key.empty?</pre></div></div>
|
85
|
+
<div class="content"><div class='highlight'><pre> raise <span class="hljs-string">'Please enter all required parameters'</span> <span class="hljs-keyword">if</span> settings.client_id.empty? <span class="hljs-keyword">or</span> settings.private_key.empty?</pre></div></div>
|
86
86
|
|
87
87
|
</li>
|
88
88
|
|
@@ -97,13 +97,13 @@
|
|
97
97
|
|
98
98
|
</div>
|
99
99
|
|
100
|
-
<div class="content"><div class='highlight'><pre> <span class="keyword">if</span> settings.base_path.empty?
|
101
|
-
base_path = <span class="string">'https://api.groupdocs.com'</span>
|
102
|
-
<span class="keyword">elsif</span> settings.base_path.match(<span class="string">'/v2.0'</span>)
|
103
|
-
base_path = settings.base_path.split(<span class="string">'/v2.0'</span>)[<span class="number">0</span>]
|
104
|
-
<span class="keyword">else</span>
|
100
|
+
<div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> settings.base_path.empty?
|
101
|
+
base_path = <span class="hljs-string">'https://api.groupdocs.com'</span>
|
102
|
+
<span class="hljs-keyword">elsif</span> settings.base_path.match(<span class="hljs-string">'/v2.0'</span>)
|
103
|
+
base_path = settings.base_path.split(<span class="hljs-string">'/v2.0'</span>)[<span class="hljs-number">0</span>]
|
104
|
+
<span class="hljs-keyword">else</span>
|
105
105
|
base_path = settings.base_path
|
106
|
-
<span class="keyword">end</span></pre></div></div>
|
106
|
+
<span class="hljs-keyword">end</span></pre></div></div>
|
107
107
|
|
108
108
|
</li>
|
109
109
|
|
@@ -118,7 +118,7 @@
|
|
118
118
|
|
119
119
|
</div>
|
120
120
|
|
121
|
-
<div class="content"><div class='highlight'><pre> <span class="constant">GroupDocs</span>.configure <span class="keyword">do</span> |groupdocs|
|
121
|
+
<div class="content"><div class='highlight'><pre> <span class="hljs-constant">GroupDocs</span>.configure <span class="hljs-keyword">do</span> |groupdocs|
|
122
122
|
groupdocs.client_id = settings.client_id
|
123
123
|
groupdocs.private_key = settings.private_key</pre></div></div>
|
124
124
|
|
@@ -135,8 +135,8 @@
|
|
135
135
|
|
136
136
|
</div>
|
137
137
|
|
138
|
-
<div class="content"><div class='highlight'><pre> groupdocs.api_server = base_path <span class="comment"># default is 'https://api.groupdocs.com'</span>
|
139
|
-
<span class="keyword">end</span></pre></div></div>
|
138
|
+
<div class="content"><div class='highlight'><pre> groupdocs.api_server = base_path <span class="hljs-comment"># default is 'https://api.groupdocs.com'</span>
|
139
|
+
<span class="hljs-keyword">end</span></pre></div></div>
|
140
140
|
|
141
141
|
</li>
|
142
142
|
|
@@ -151,7 +151,7 @@
|
|
151
151
|
|
152
152
|
</div>
|
153
153
|
|
154
|
-
<div class="content"><div class='highlight'><pre> files_list = <span class="constant">GroupDocs::Storage::Folder</span>.list!(<span class="string">'/'</span>, {<span class="symbol">:extended</span> => <span class="keyword">true</span>}, {<span class="symbol">:client_id</span> => settings.client_id, <span class="symbol">:private_key</span> => settings.private_key})</pre></div></div>
|
154
|
+
<div class="content"><div class='highlight'><pre> files_list = <span class="hljs-constant">GroupDocs::Storage::Folder</span>.list!(<span class="hljs-string">'/'</span>, {<span class="hljs-symbol">:extended</span> => <span class="hljs-keyword">true</span>}, {<span class="hljs-symbol">:client_id</span> => settings.client_id, <span class="hljs-symbol">:private_key</span> => settings.private_key})</pre></div></div>
|
155
155
|
|
156
156
|
</li>
|
157
157
|
|
@@ -166,24 +166,24 @@
|
|
166
166
|
|
167
167
|
</div>
|
168
168
|
|
169
|
-
<div class="content"><div class='highlight'><pre> thumbnails = <span class="string">''</span>
|
170
|
-
files_list.each <span class="keyword">do</span> |element|
|
171
|
-
<span class="keyword">if</span> element.<span class="keyword">class</span>.name.split(<span class="string">'::'</span>).last == <span class="string">'Folder'</span>
|
172
|
-
<span class="keyword">next</span>
|
173
|
-
<span class="keyword">end</span>
|
174
|
-
<span class="keyword">if</span> element.thumbnail
|
169
|
+
<div class="content"><div class='highlight'><pre> thumbnails = <span class="hljs-string">''</span>
|
170
|
+
files_list.each <span class="hljs-keyword">do</span> |element|
|
171
|
+
<span class="hljs-keyword">if</span> element.<span class="hljs-keyword">class</span>.name.split(<span class="hljs-string">'::'</span>).last == <span class="hljs-string">'Folder'</span>
|
172
|
+
<span class="hljs-keyword">next</span>
|
173
|
+
<span class="hljs-keyword">end</span>
|
174
|
+
<span class="hljs-keyword">if</span> element.thumbnail
|
175
175
|
name = element.name
|
176
|
-
thumbnails += <span class="string">"<img src='data:image/png;base64,<span class="subst">#{element.thumbnail}</span>', width='40px', height='40px'> <span class="subst">#{name}</span>"</span>
|
177
|
-
<span class="keyword">end</span>
|
178
|
-
<span class="keyword">end</span>
|
176
|
+
thumbnails += <span class="hljs-string">"<img src='data:image/png;base64,<span class="hljs-subst">#{element.thumbnail}</span>', width='40px', height='40px'> <span class="hljs-subst">#{name}</span>"</span>
|
177
|
+
<span class="hljs-keyword">end</span>
|
178
|
+
<span class="hljs-keyword">end</span>
|
179
179
|
|
180
|
-
<span class="keyword">unless</span> thumbnails.empty?
|
181
|
-
set <span class="symbol">:thumbnails</span>, thumbnails
|
182
|
-
<span class="keyword">end</span>
|
180
|
+
<span class="hljs-keyword">unless</span> thumbnails.empty?
|
181
|
+
set <span class="hljs-symbol">:thumbnails</span>, thumbnails
|
182
|
+
<span class="hljs-keyword">end</span>
|
183
183
|
|
184
|
-
<span class="keyword">rescue</span> <span class="constant">Exception</span> => e
|
184
|
+
<span class="hljs-keyword">rescue</span> <span class="hljs-constant">Exception</span> => e
|
185
185
|
err = e.message
|
186
|
-
<span class="keyword">end</span></pre></div></div>
|
186
|
+
<span class="hljs-keyword">end</span></pre></div></div>
|
187
187
|
|
188
188
|
</li>
|
189
189
|
|
@@ -198,8 +198,8 @@
|
|
198
198
|
|
199
199
|
</div>
|
200
200
|
|
201
|
-
<div class="content"><div class='highlight'><pre> haml <span class="symbol">:sample07</span>, <span class="symbol">:locals</span> => {<span class="symbol">:clientId</span> => settings.client_id, <span class="symbol">:privateKey</span> => settings.private_key, <span class="symbol">:thumbnailList</span> => thumbnails, <span class="symbol">:err</span> => err}
|
202
|
-
<span class="keyword">end</span></pre></div></div>
|
201
|
+
<div class="content"><div class='highlight'><pre> haml <span class="hljs-symbol">:sample07</span>, <span class="hljs-symbol">:locals</span> => {<span class="hljs-symbol">:clientId</span> => settings.client_id, <span class="hljs-symbol">:privateKey</span> => settings.private_key, <span class="hljs-symbol">:thumbnailList</span> => thumbnails, <span class="hljs-symbol">:err</span> => err}
|
202
|
+
<span class="hljs-keyword">end</span></pre></div></div>
|
203
203
|
|
204
204
|
</li>
|
205
205
|
|
@@ -31,9 +31,9 @@
|
|
31
31
|
|
32
32
|
</div>
|
33
33
|
|
34
|
-
<div class="content"><div class='highlight'><pre>get <span class="string">'/
|
35
|
-
haml <span class="symbol">:sample08</span>
|
36
|
-
<span class="keyword">end</span></pre></div></div>
|
34
|
+
<div class="content"><div class='highlight'><pre>get <span class="hljs-string">'/sample-8-how-to-return-a-url-representing-a-single-page-of-a-document'</span> <span class="hljs-keyword">do</span>
|
35
|
+
haml <span class="hljs-symbol">:sample08</span>
|
36
|
+
<span class="hljs-keyword">end</span></pre></div></div>
|
37
37
|
|
38
38
|
</li>
|
39
39
|
|
@@ -48,7 +48,7 @@
|
|
48
48
|
|
49
49
|
</div>
|
50
50
|
|
51
|
-
<div class="content"><div class='highlight'><pre>post <span class="string">'/
|
51
|
+
<div class="content"><div class='highlight'><pre>post <span class="hljs-string">'/sample-8-how-to-return-a-url-representing-a-single-page-of-a-document'</span> <span class="hljs-keyword">do</span></pre></div></div>
|
52
52
|
|
53
53
|
</li>
|
54
54
|
|
@@ -63,15 +63,15 @@
|
|
63
63
|
|
64
64
|
</div>
|
65
65
|
|
66
|
-
<div class="content"><div class='highlight'><pre> set <span class="symbol">:client_id</span>, params[<span class="symbol">:clientId</span>]
|
67
|
-
set <span class="symbol">:private_key</span>, params[<span class="symbol">:privateKey</span>]
|
68
|
-
set <span class="symbol">:guid</span>, params[<span class="symbol">:guid</span>]
|
69
|
-
set <span class="symbol">:page_number</span>, params[<span class="symbol">:pageNumber</span>]
|
70
|
-
set <span class="symbol">:source</span>, params[<span class="symbol">:source</span>]
|
71
|
-
set <span class="symbol">:file_id</span>, params[<span class="symbol">:fileId</span>]
|
72
|
-
set <span class="symbol">:base_path</span>, params[<span class="symbol">:basePath</span>]
|
66
|
+
<div class="content"><div class='highlight'><pre> set <span class="hljs-symbol">:client_id</span>, params[<span class="hljs-symbol">:clientId</span>]
|
67
|
+
set <span class="hljs-symbol">:private_key</span>, params[<span class="hljs-symbol">:privateKey</span>]
|
68
|
+
set <span class="hljs-symbol">:guid</span>, params[<span class="hljs-symbol">:guid</span>]
|
69
|
+
set <span class="hljs-symbol">:page_number</span>, params[<span class="hljs-symbol">:pageNumber</span>]
|
70
|
+
set <span class="hljs-symbol">:source</span>, params[<span class="hljs-symbol">:source</span>]
|
71
|
+
set <span class="hljs-symbol">:file_id</span>, params[<span class="hljs-symbol">:fileId</span>]
|
72
|
+
set <span class="hljs-symbol">:base_path</span>, params[<span class="hljs-symbol">:basePath</span>]
|
73
73
|
|
74
|
-
<span class="keyword">begin</span></pre></div></div>
|
74
|
+
<span class="hljs-keyword">begin</span></pre></div></div>
|
75
75
|
|
76
76
|
</li>
|
77
77
|
|
@@ -86,7 +86,7 @@
|
|
86
86
|
|
87
87
|
</div>
|
88
88
|
|
89
|
-
<div class="content"><div class='highlight'><pre> raise <span class="string">'Please enter all required parameters'</span> <span class="keyword">if</span> settings.client_id.empty? <span class="keyword">or</span> settings.private_key.empty?</pre></div></div>
|
89
|
+
<div class="content"><div class='highlight'><pre> raise <span class="hljs-string">'Please enter all required parameters'</span> <span class="hljs-keyword">if</span> settings.client_id.empty? <span class="hljs-keyword">or</span> settings.private_key.empty?</pre></div></div>
|
90
90
|
|
91
91
|
</li>
|
92
92
|
|
@@ -101,13 +101,13 @@
|
|
101
101
|
|
102
102
|
</div>
|
103
103
|
|
104
|
-
<div class="content"><div class='highlight'><pre> <span class="keyword">if</span> settings.base_path.empty?
|
105
|
-
base_path = <span class="string">'https://api.groupdocs.com'</span>
|
106
|
-
<span class="keyword">elsif</span> settings.base_path.match(<span class="string">'/v2.0'</span>)
|
107
|
-
base_path = settings.base_path.split(<span class="string">'/v2.0'</span>)[<span class="number">0</span>]
|
108
|
-
<span class="keyword">else</span>
|
104
|
+
<div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> settings.base_path.empty?
|
105
|
+
base_path = <span class="hljs-string">'https://api.groupdocs.com'</span>
|
106
|
+
<span class="hljs-keyword">elsif</span> settings.base_path.match(<span class="hljs-string">'/v2.0'</span>)
|
107
|
+
base_path = settings.base_path.split(<span class="hljs-string">'/v2.0'</span>)[<span class="hljs-number">0</span>]
|
108
|
+
<span class="hljs-keyword">else</span>
|
109
109
|
base_path = settings.base_path
|
110
|
-
<span class="keyword">end</span></pre></div></div>
|
110
|
+
<span class="hljs-keyword">end</span></pre></div></div>
|
111
111
|
|
112
112
|
</li>
|
113
113
|
|
@@ -122,7 +122,7 @@
|
|
122
122
|
|
123
123
|
</div>
|
124
124
|
|
125
|
-
<div class="content"><div class='highlight'><pre> <span class="constant">GroupDocs</span>.configure <span class="keyword">do</span> |groupdocs|
|
125
|
+
<div class="content"><div class='highlight'><pre> <span class="hljs-constant">GroupDocs</span>.configure <span class="hljs-keyword">do</span> |groupdocs|
|
126
126
|
groupdocs.client_id = settings.client_id
|
127
127
|
groupdocs.private_key = settings.private_key</pre></div></div>
|
128
128
|
|
@@ -139,12 +139,12 @@
|
|
139
139
|
|
140
140
|
</div>
|
141
141
|
|
142
|
-
<div class="content"><div class='highlight'><pre> groupdocs.api_server = base_path <span class="comment"># default is 'https://api.groupdocs.com'</span>
|
143
|
-
<span class="keyword">end</span>
|
142
|
+
<div class="content"><div class='highlight'><pre> groupdocs.api_server = base_path <span class="hljs-comment"># default is 'https://api.groupdocs.com'</span>
|
143
|
+
<span class="hljs-keyword">end</span>
|
144
144
|
|
145
|
-
file = <span class="keyword">nil</span>
|
146
|
-
doc = <span class="keyword">nil</span>
|
147
|
-
metadata = <span class="keyword">nil</span></pre></div></div>
|
145
|
+
file = <span class="hljs-keyword">nil</span>
|
146
|
+
doc = <span class="hljs-keyword">nil</span>
|
147
|
+
metadata = <span class="hljs-keyword">nil</span></pre></div></div>
|
148
148
|
|
149
149
|
</li>
|
150
150
|
|
@@ -159,10 +159,10 @@
|
|
159
159
|
|
160
160
|
</div>
|
161
161
|
|
162
|
-
<div class="content"><div class='highlight'><pre> <span class="keyword">case</span> settings.source
|
163
|
-
<span class="keyword">when</span> <span class="string">'guid'</span>
|
164
|
-
file = <span class="constant">GroupDocs::Storage::File</span>.new({<span class="symbol">:guid</span> => settings.file_id})
|
165
|
-
<span class="keyword">when</span> <span class="string">'local'</span></pre></div></div>
|
162
|
+
<div class="content"><div class='highlight'><pre> <span class="hljs-keyword">case</span> settings.source
|
163
|
+
<span class="hljs-keyword">when</span> <span class="hljs-string">'guid'</span>
|
164
|
+
file = <span class="hljs-constant">GroupDocs::Storage::File</span>.new({<span class="hljs-symbol">:guid</span> => settings.file_id})
|
165
|
+
<span class="hljs-keyword">when</span> <span class="hljs-string">'local'</span></pre></div></div>
|
166
166
|
|
167
167
|
</li>
|
168
168
|
|
@@ -177,7 +177,7 @@
|
|
177
177
|
|
178
178
|
</div>
|
179
179
|
|
180
|
-
<div class="content"><div class='highlight'><pre> filepath = <span class="string">"<span class="subst">#{<span class="constant">Dir</span>.tmpdir}</span>/<span class="subst">#{params[<span class="symbol">:file</span>][<span class="symbol">:filename</span>]}</span>"</span></pre></div></div>
|
180
|
+
<div class="content"><div class='highlight'><pre> filepath = <span class="hljs-string">"<span class="hljs-subst">#{<span class="hljs-constant">Dir</span>.tmpdir}</span>/<span class="hljs-subst">#{params[<span class="hljs-symbol">:file</span>][<span class="hljs-symbol">:filename</span>]}</span>"</span></pre></div></div>
|
181
181
|
|
182
182
|
</li>
|
183
183
|
|
@@ -192,7 +192,7 @@
|
|
192
192
|
|
193
193
|
</div>
|
194
194
|
|
195
|
-
<div class="content"><div class='highlight'><pre> <span class="constant">File</span>.open(filepath, <span class="string">'wb'</span>) { |f| f.write(params[<span class="symbol">:file</span>][<span class="symbol">:tempfile</span>].read) }</pre></div></div>
|
195
|
+
<div class="content"><div class='highlight'><pre> <span class="hljs-constant">File</span>.open(filepath, <span class="hljs-string">'wb'</span>) { |f| f.write(params[<span class="hljs-symbol">:file</span>][<span class="hljs-symbol">:tempfile</span>].read) }</pre></div></div>
|
196
196
|
|
197
197
|
</li>
|
198
198
|
|
@@ -207,12 +207,12 @@
|
|
207
207
|
|
208
208
|
</div>
|
209
209
|
|
210
|
-
<div class="content"><div class='highlight'><pre> file = <span class="constant">GroupDocs::Storage::File</span>.upload!(filepath, {})
|
211
|
-
<span class="keyword">when</span> <span class="string">'url'</span>
|
212
|
-
file = <span class="constant">GroupDocs::Storage::File</span>.upload_web!(settings.url)
|
213
|
-
<span class="keyword">else</span>
|
214
|
-
raise <span class="string">'Wrong GUID source.'</span>
|
215
|
-
<span class="keyword">end</span>
|
210
|
+
<div class="content"><div class='highlight'><pre> file = <span class="hljs-constant">GroupDocs::Storage::File</span>.upload!(filepath, {})
|
211
|
+
<span class="hljs-keyword">when</span> <span class="hljs-string">'url'</span>
|
212
|
+
file = <span class="hljs-constant">GroupDocs::Storage::File</span>.upload_web!(settings.url)
|
213
|
+
<span class="hljs-keyword">else</span>
|
214
|
+
raise <span class="hljs-string">'Wrong GUID source.'</span>
|
215
|
+
<span class="hljs-keyword">end</span>
|
216
216
|
|
217
217
|
doc = file.to_document
|
218
218
|
metadata = doc.metadata!()</pre></div></div>
|
@@ -230,7 +230,7 @@
|
|
230
230
|
|
231
231
|
</div>
|
232
232
|
|
233
|
-
<div class="content"><div class='highlight'><pre> images = doc.page_images!(<span class="number">800</span>, <span class="number">400</span>, {<span class="symbol">:first_page</span> => <span class="number">0</span>, <span class="symbol">:page_count</span> => metadata.views_count})</pre></div></div>
|
233
|
+
<div class="content"><div class='highlight'><pre> images = doc.page_images!(<span class="hljs-number">800</span>, <span class="hljs-number">400</span>, {<span class="hljs-symbol">:first_page</span> => <span class="hljs-number">0</span>, <span class="hljs-symbol">:page_count</span> => metadata.views_count})</pre></div></div>
|
234
234
|
|
235
235
|
</li>
|
236
236
|
|
@@ -245,13 +245,13 @@
|
|
245
245
|
|
246
246
|
</div>
|
247
247
|
|
248
|
-
<div class="content"><div class='highlight'><pre> <span class="keyword">unless</span> images.empty?
|
249
|
-
image = images[<span class="constant">Integer</span>(settings.page_number)]
|
250
|
-
<span class="keyword">end</span>
|
248
|
+
<div class="content"><div class='highlight'><pre> <span class="hljs-keyword">unless</span> images.empty?
|
249
|
+
image = images[<span class="hljs-constant">Integer</span>(settings.page_number)]
|
250
|
+
<span class="hljs-keyword">end</span>
|
251
251
|
|
252
|
-
<span class="keyword">rescue</span> <span class="constant">Exception</span> => e
|
252
|
+
<span class="hljs-keyword">rescue</span> <span class="hljs-constant">Exception</span> => e
|
253
253
|
err = e.message
|
254
|
-
<span class="keyword">end</span></pre></div></div>
|
254
|
+
<span class="hljs-keyword">end</span></pre></div></div>
|
255
255
|
|
256
256
|
</li>
|
257
257
|
|
@@ -266,8 +266,8 @@
|
|
266
266
|
|
267
267
|
</div>
|
268
268
|
|
269
|
-
<div class="content"><div class='highlight'><pre> haml <span class="symbol">:sample08</span>, <span class="symbol">:locals</span> => {<span class="symbol">:clientId</span> => settings.client_id, <span class="symbol">:privateKey</span> => settings.private_key, <span class="symbol">:guid</span> => settings.guid, <span class="symbol">:pageNumber</span> => settings.page_number, <span class="symbol">:image</span> => image, <span class="symbol">:err</span> => err}
|
270
|
-
<span class="keyword">end</span></pre></div></div>
|
269
|
+
<div class="content"><div class='highlight'><pre> haml <span class="hljs-symbol">:sample08</span>, <span class="hljs-symbol">:locals</span> => {<span class="hljs-symbol">:clientId</span> => settings.client_id, <span class="hljs-symbol">:privateKey</span> => settings.private_key, <span class="hljs-symbol">:guid</span> => settings.guid, <span class="hljs-symbol">:pageNumber</span> => settings.page_number, <span class="hljs-symbol">:image</span> => image, <span class="hljs-symbol">:err</span> => err}
|
270
|
+
<span class="hljs-keyword">end</span></pre></div></div>
|
271
271
|
|
272
272
|
</li>
|
273
273
|
|
@@ -31,9 +31,9 @@
|
|
31
31
|
|
32
32
|
</div>
|
33
33
|
|
34
|
-
<div class="content"><div class='highlight'><pre>get <span class="string">'/
|
35
|
-
haml <span class="symbol">:sample09</span>
|
36
|
-
<span class="keyword">end</span></pre></div></div>
|
34
|
+
<div class="content"><div class='highlight'><pre>get <span class="hljs-string">'/sample-9-how-to-generate-an-embedded-viewer-url-for-a-document'</span> <span class="hljs-keyword">do</span>
|
35
|
+
haml <span class="hljs-symbol">:sample09</span>
|
36
|
+
<span class="hljs-keyword">end</span></pre></div></div>
|
37
37
|
|
38
38
|
</li>
|
39
39
|
|
@@ -48,7 +48,7 @@
|
|
48
48
|
|
49
49
|
</div>
|
50
50
|
|
51
|
-
<div class="content"><div class='highlight'><pre>post <span class="string">'/
|
51
|
+
<div class="content"><div class='highlight'><pre>post <span class="hljs-string">'/sample-9-how-to-generate-an-embedded-viewer-url-for-a-document'</span> <span class="hljs-keyword">do</span></pre></div></div>
|
52
52
|
|
53
53
|
</li>
|
54
54
|
|
@@ -63,17 +63,17 @@
|
|
63
63
|
|
64
64
|
</div>
|
65
65
|
|
66
|
-
<div class="content"><div class='highlight'><pre> set <span class="symbol">:file_id</span>, params[<span class="symbol">:fileId</span>]
|
67
|
-
set <span class="symbol">:width</span>, params[<span class="symbol">:width</span>]
|
68
|
-
set <span class="symbol">:height</span>, params[<span class="symbol">:height</span>]
|
69
|
-
set <span class="symbol">:source</span>, params[<span class="symbol">:source</span>]
|
70
|
-
set <span class="symbol">:client_id</span>, params[<span class="symbol">:clientId</span>]
|
71
|
-
set <span class="symbol">:private_key</span>, params[<span class="symbol">:privateKey</span>]
|
72
|
-
set <span class="symbol">:check</span>, params[<span class="symbol">:check</span>]
|
73
|
-
set <span class="symbol">:url</span>, params[<span class="symbol">:url</span>]
|
74
|
-
set <span class="symbol">:base_path</span>, params[<span class="symbol">:basePath</span>]
|
66
|
+
<div class="content"><div class='highlight'><pre> set <span class="hljs-symbol">:file_id</span>, params[<span class="hljs-symbol">:fileId</span>]
|
67
|
+
set <span class="hljs-symbol">:width</span>, params[<span class="hljs-symbol">:width</span>]
|
68
|
+
set <span class="hljs-symbol">:height</span>, params[<span class="hljs-symbol">:height</span>]
|
69
|
+
set <span class="hljs-symbol">:source</span>, params[<span class="hljs-symbol">:source</span>]
|
70
|
+
set <span class="hljs-symbol">:client_id</span>, params[<span class="hljs-symbol">:clientId</span>]
|
71
|
+
set <span class="hljs-symbol">:private_key</span>, params[<span class="hljs-symbol">:privateKey</span>]
|
72
|
+
set <span class="hljs-symbol">:check</span>, params[<span class="hljs-symbol">:check</span>]
|
73
|
+
set <span class="hljs-symbol">:url</span>, params[<span class="hljs-symbol">:url</span>]
|
74
|
+
set <span class="hljs-symbol">:base_path</span>, params[<span class="hljs-symbol">:basePath</span>]
|
75
75
|
|
76
|
-
<span class="keyword">begin</span></pre></div></div>
|
76
|
+
<span class="hljs-keyword">begin</span></pre></div></div>
|
77
77
|
|
78
78
|
</li>
|
79
79
|
|
@@ -88,7 +88,7 @@
|
|
88
88
|
|
89
89
|
</div>
|
90
90
|
|
91
|
-
<div class="content"><div class='highlight'><pre> raise <span class="string">'Please enter all required parameters'</span> <span class="keyword">if</span> settings.client_id.empty? <span class="keyword">or</span> settings.private_key.empty? <span class="keyword">or</span> settings.width.empty? <span class="keyword">or</span> settings.height.empty?</pre></div></div>
|
91
|
+
<div class="content"><div class='highlight'><pre> raise <span class="hljs-string">'Please enter all required parameters'</span> <span class="hljs-keyword">if</span> settings.client_id.empty? <span class="hljs-keyword">or</span> settings.private_key.empty? <span class="hljs-keyword">or</span> settings.width.empty? <span class="hljs-keyword">or</span> settings.height.empty?</pre></div></div>
|
92
92
|
|
93
93
|
</li>
|
94
94
|
|
@@ -103,13 +103,13 @@
|
|
103
103
|
|
104
104
|
</div>
|
105
105
|
|
106
|
-
<div class="content"><div class='highlight'><pre> <span class="keyword">if</span> settings.base_path.empty?
|
107
|
-
base_path = <span class="string">'https://api.groupdocs.com'</span>
|
108
|
-
<span class="keyword">elsif</span> settings.base_path.match(<span class="string">'/v2.0'</span>)
|
109
|
-
base_path = settings.base_path.split(<span class="string">'/v2.0'</span>)[<span class="number">0</span>]
|
110
|
-
<span class="keyword">else</span>
|
106
|
+
<div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> settings.base_path.empty?
|
107
|
+
base_path = <span class="hljs-string">'https://api.groupdocs.com'</span>
|
108
|
+
<span class="hljs-keyword">elsif</span> settings.base_path.match(<span class="hljs-string">'/v2.0'</span>)
|
109
|
+
base_path = settings.base_path.split(<span class="hljs-string">'/v2.0'</span>)[<span class="hljs-number">0</span>]
|
110
|
+
<span class="hljs-keyword">else</span>
|
111
111
|
base_path = settings.base_path
|
112
|
-
<span class="keyword">end</span></pre></div></div>
|
112
|
+
<span class="hljs-keyword">end</span></pre></div></div>
|
113
113
|
|
114
114
|
</li>
|
115
115
|
|
@@ -124,7 +124,7 @@
|
|
124
124
|
|
125
125
|
</div>
|
126
126
|
|
127
|
-
<div class="content"><div class='highlight'><pre> <span class="constant">GroupDocs</span>.configure <span class="keyword">do</span> |groupdocs|
|
127
|
+
<div class="content"><div class='highlight'><pre> <span class="hljs-constant">GroupDocs</span>.configure <span class="hljs-keyword">do</span> |groupdocs|
|
128
128
|
groupdocs.client_id = settings.client_id
|
129
129
|
groupdocs.private_key = settings.private_key</pre></div></div>
|
130
130
|
|
@@ -141,8 +141,8 @@
|
|
141
141
|
|
142
142
|
</div>
|
143
143
|
|
144
|
-
<div class="content"><div class='highlight'><pre> groupdocs.api_server = base_path <span class="comment"># default is 'https://api.groupdocs.com'</span>
|
145
|
-
<span class="keyword">end</span></pre></div></div>
|
144
|
+
<div class="content"><div class='highlight'><pre> groupdocs.api_server = base_path <span class="hljs-comment"># default is 'https://api.groupdocs.com'</span>
|
145
|
+
<span class="hljs-keyword">end</span></pre></div></div>
|
146
146
|
|
147
147
|
</li>
|
148
148
|
|
@@ -157,11 +157,11 @@
|
|
157
157
|
|
158
158
|
</div>
|
159
159
|
|
160
|
-
<div class="content"><div class='highlight'><pre> file = <span class="keyword">nil</span>
|
161
|
-
<span class="keyword">case</span> settings.source
|
162
|
-
<span class="keyword">when</span> <span class="string">'guid'</span>
|
163
|
-
file = <span class="constant">GroupDocs::Storage::File</span>.new({<span class="symbol">:guid</span> => settings.file_id})
|
164
|
-
<span class="keyword">when</span> <span class="string">'local'</span></pre></div></div>
|
160
|
+
<div class="content"><div class='highlight'><pre> file = <span class="hljs-keyword">nil</span>
|
161
|
+
<span class="hljs-keyword">case</span> settings.source
|
162
|
+
<span class="hljs-keyword">when</span> <span class="hljs-string">'guid'</span>
|
163
|
+
file = <span class="hljs-constant">GroupDocs::Storage::File</span>.new({<span class="hljs-symbol">:guid</span> => settings.file_id})
|
164
|
+
<span class="hljs-keyword">when</span> <span class="hljs-string">'local'</span></pre></div></div>
|
165
165
|
|
166
166
|
</li>
|
167
167
|
|
@@ -176,7 +176,7 @@
|
|
176
176
|
|
177
177
|
</div>
|
178
178
|
|
179
|
-
<div class="content"><div class='highlight'><pre> filepath = <span class="string">"<span class="subst">#{<span class="constant">Dir</span>.tmpdir}</span>/<span class="subst">#{params[<span class="symbol">:file</span>][<span class="symbol">:filename</span>]}</span>"</span></pre></div></div>
|
179
|
+
<div class="content"><div class='highlight'><pre> filepath = <span class="hljs-string">"<span class="hljs-subst">#{<span class="hljs-constant">Dir</span>.tmpdir}</span>/<span class="hljs-subst">#{params[<span class="hljs-symbol">:file</span>][<span class="hljs-symbol">:filename</span>]}</span>"</span></pre></div></div>
|
180
180
|
|
181
181
|
</li>
|
182
182
|
|
@@ -191,7 +191,7 @@
|
|
191
191
|
|
192
192
|
</div>
|
193
193
|
|
194
|
-
<div class="content"><div class='highlight'><pre> <span class="constant">File</span>.open(filepath, <span class="string">'wb'</span>) { |f| f.write(params[<span class="symbol">:file</span>][<span class="symbol">:tempfile</span>].read) }</pre></div></div>
|
194
|
+
<div class="content"><div class='highlight'><pre> <span class="hljs-constant">File</span>.open(filepath, <span class="hljs-string">'wb'</span>) { |f| f.write(params[<span class="hljs-symbol">:file</span>][<span class="hljs-symbol">:tempfile</span>].read) }</pre></div></div>
|
195
195
|
|
196
196
|
</li>
|
197
197
|
|
@@ -206,16 +206,16 @@
|
|
206
206
|
|
207
207
|
</div>
|
208
208
|
|
209
|
-
<div class="content"><div class='highlight'><pre> file = <span class="constant">GroupDocs::Storage::File</span>.upload!(filepath, {})
|
210
|
-
<span class="keyword">when</span> <span class="string">'url'</span>
|
211
|
-
file = <span class="constant">GroupDocs::Storage::File</span>.upload_web!(settings.url)
|
212
|
-
<span class="keyword">else</span>
|
213
|
-
raise <span class="string">'Wrong GUID source.'</span>
|
214
|
-
<span class="keyword">end</span>
|
215
|
-
url = <span class="keyword">nil</span>
|
209
|
+
<div class="content"><div class='highlight'><pre> file = <span class="hljs-constant">GroupDocs::Storage::File</span>.upload!(filepath, {})
|
210
|
+
<span class="hljs-keyword">when</span> <span class="hljs-string">'url'</span>
|
211
|
+
file = <span class="hljs-constant">GroupDocs::Storage::File</span>.upload_web!(settings.url)
|
212
|
+
<span class="hljs-keyword">else</span>
|
213
|
+
raise <span class="hljs-string">'Wrong GUID source.'</span>
|
214
|
+
<span class="hljs-keyword">end</span>
|
215
|
+
url = <span class="hljs-keyword">nil</span>
|
216
216
|
|
217
|
-
<span class="keyword">case</span> settings.check
|
218
|
-
<span class="keyword">when</span> <span class="string">'viewer'</span></pre></div></div>
|
217
|
+
<span class="hljs-keyword">case</span> settings.check
|
218
|
+
<span class="hljs-keyword">when</span> <span class="hljs-string">'viewer'</span></pre></div></div>
|
219
219
|
|
220
220
|
</li>
|
221
221
|
|
@@ -230,8 +230,8 @@
|
|
230
230
|
|
231
231
|
</div>
|
232
232
|
|
233
|
-
<div class="content"><div class='highlight'><pre> iframe = <span class="string">"/document-viewer/embed/<span class="subst">#{file.guid}</span>?frameborder='0' width='<span class="subst">#{settings.width}</span>' height='<span class="subst">#{settings.height}</span>'"</span>
|
234
|
-
<span class="keyword">when</span> <span class="string">'annotation'</span></pre></div></div>
|
233
|
+
<div class="content"><div class='highlight'><pre> iframe = <span class="hljs-string">"/document-viewer/embed/<span class="hljs-subst">#{file.guid}</span>?frameborder='0' width='<span class="hljs-subst">#{settings.width}</span>' height='<span class="hljs-subst">#{settings.height}</span>'"</span>
|
234
|
+
<span class="hljs-keyword">when</span> <span class="hljs-string">'annotation'</span></pre></div></div>
|
235
235
|
|
236
236
|
</li>
|
237
237
|
|
@@ -246,8 +246,8 @@
|
|
246
246
|
|
247
247
|
</div>
|
248
248
|
|
249
|
-
<div class="content"><div class='highlight'><pre> iframe = <span class="string">"/document-annotation2/embed/<span class="subst">#{file.guid}</span>?frameborder='0' width='<span class="subst">#{settings.width}</span>' height='<span class="subst">#{settings.height}</span>'"</span>
|
250
|
-
<span class="keyword">end</span></pre></div></div>
|
249
|
+
<div class="content"><div class='highlight'><pre> iframe = <span class="hljs-string">"/document-annotation2/embed/<span class="hljs-subst">#{file.guid}</span>?frameborder='0' width='<span class="hljs-subst">#{settings.width}</span>' height='<span class="hljs-subst">#{settings.height}</span>'"</span>
|
250
|
+
<span class="hljs-keyword">end</span></pre></div></div>
|
251
251
|
|
252
252
|
</li>
|
253
253
|
|
@@ -262,7 +262,7 @@
|
|
262
262
|
|
263
263
|
</div>
|
264
264
|
|
265
|
-
<div class="content"><div class='highlight'><pre> url = <span class="constant">GroupDocs::Api::Request</span>.new(<span class="symbol">:path</span> => iframe).prepare_and_sign_url</pre></div></div>
|
265
|
+
<div class="content"><div class='highlight'><pre> url = <span class="hljs-constant">GroupDocs::Api::Request</span>.new(<span class="hljs-symbol">:path</span> => iframe).prepare_and_sign_url</pre></div></div>
|
266
266
|
|
267
267
|
</li>
|
268
268
|
|
@@ -277,18 +277,18 @@
|
|
277
277
|
|
278
278
|
</div>
|
279
279
|
|
280
|
-
<div class="content"><div class='highlight'><pre> <span class="keyword">case</span> settings.base_path
|
281
|
-
<span class="keyword">when</span> <span class="string">'https://stage-api-groupdocs.dynabic.com'</span>
|
282
|
-
iframe = <span class="string">"https://stage-api-groupdocs.dynabic.com<span class="subst">#{url}</span>"</span>
|
283
|
-
<span class="keyword">when</span> <span class="string">'https://dev-api-groupdocs.dynabic.com'</span>
|
284
|
-
iframe = <span class="string">"https://dev-apps.groupdocs.com<span class="subst">#{url}</span>"</span>
|
285
|
-
<span class="keyword">else</span>
|
286
|
-
iframe = <span class="string">"https://apps.groupdocs.com<span class="subst">#{url}</span>"</span>
|
287
|
-
<span class="keyword">end</span>
|
280
|
+
<div class="content"><div class='highlight'><pre> <span class="hljs-keyword">case</span> settings.base_path
|
281
|
+
<span class="hljs-keyword">when</span> <span class="hljs-string">'https://stage-api-groupdocs.dynabic.com'</span>
|
282
|
+
iframe = <span class="hljs-string">"https://stage-api-groupdocs.dynabic.com<span class="hljs-subst">#{url}</span>"</span>
|
283
|
+
<span class="hljs-keyword">when</span> <span class="hljs-string">'https://dev-api-groupdocs.dynabic.com'</span>
|
284
|
+
iframe = <span class="hljs-string">"https://dev-apps.groupdocs.com<span class="hljs-subst">#{url}</span>"</span>
|
285
|
+
<span class="hljs-keyword">else</span>
|
286
|
+
iframe = <span class="hljs-string">"https://apps.groupdocs.com<span class="hljs-subst">#{url}</span>"</span>
|
287
|
+
<span class="hljs-keyword">end</span>
|
288
288
|
|
289
|
-
<span class="keyword">rescue</span> <span class="constant">Exception</span> => e
|
289
|
+
<span class="hljs-keyword">rescue</span> <span class="hljs-constant">Exception</span> => e
|
290
290
|
err = e.message
|
291
|
-
<span class="keyword">end</span></pre></div></div>
|
291
|
+
<span class="hljs-keyword">end</span></pre></div></div>
|
292
292
|
|
293
293
|
</li>
|
294
294
|
|
@@ -303,8 +303,8 @@
|
|
303
303
|
|
304
304
|
</div>
|
305
305
|
|
306
|
-
<div class="content"><div class='highlight'><pre> haml <span class="symbol">:sample09</span>, <span class="symbol">:locals</span> => {<span class="symbol">:guid</span> => file.guid, <span class="symbol">:width</span> => settings.width, <span class="symbol">:height</span> => settings.height, <span class="symbol">:v_url</span> => iframe, <span class="symbol">:err</span> => err}
|
307
|
-
<span class="keyword">end</span></pre></div></div>
|
306
|
+
<div class="content"><div class='highlight'><pre> haml <span class="hljs-symbol">:sample09</span>, <span class="hljs-symbol">:locals</span> => {<span class="hljs-symbol">:guid</span> => file.guid, <span class="hljs-symbol">:width</span> => settings.width, <span class="hljs-symbol">:height</span> => settings.height, <span class="hljs-symbol">:v_url</span> => iframe, <span class="hljs-symbol">:err</span> => err}
|
307
|
+
<span class="hljs-keyword">end</span></pre></div></div>
|
308
308
|
|
309
309
|
</li>
|
310
310
|
|