groupdocs 1.6.0 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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">:sample32</span>
|
36
|
-
<span class="keyword">end</span></pre></div></div>
|
34
|
+
<div class="content"><div class='highlight'><pre>get <span class="hljs-string">'/sample-32-how-to-create-signature-form-publish-it-and-configure-notification-via-callback'</span> <span class="hljs-keyword">do</span>
|
35
|
+
haml <span class="hljs-symbol">:sample32</span>
|
36
|
+
<span class="hljs-keyword">end</span></pre></div></div>
|
37
37
|
|
38
38
|
</li>
|
39
39
|
|
@@ -48,12 +48,12 @@
|
|
48
48
|
|
49
49
|
</div>
|
50
50
|
|
51
|
-
<div class="content"><div class='highlight'><pre>post <span class="string">'/sample32/callback'</span> <span class="keyword">do</span>
|
51
|
+
<div class="content"><div class='highlight'><pre>post <span class="hljs-string">'/sample32/callback'</span> <span class="hljs-keyword">do</span>
|
52
52
|
|
53
|
-
source_id = <span class="string">''</span>
|
54
|
-
client_id = <span class="string">''</span>
|
55
|
-
private_key = <span class="string">''</span>
|
56
|
-
subscriber_email = <span class="string">''</span></pre></div></div>
|
53
|
+
source_id = <span class="hljs-string">''</span>
|
54
|
+
client_id = <span class="hljs-string">''</span>
|
55
|
+
private_key = <span class="hljs-string">''</span>
|
56
|
+
subscriber_email = <span class="hljs-string">''</span></pre></div></div>
|
57
57
|
|
58
58
|
</li>
|
59
59
|
|
@@ -68,9 +68,9 @@
|
|
68
68
|
|
69
69
|
</div>
|
70
70
|
|
71
|
-
<div class="content"><div class='highlight'><pre> data = <span class="constant">JSON</span>.parse(request.body.read)
|
72
|
-
<span class="keyword">begin</span>
|
73
|
-
raise <span class="string">'Empty params!'</span> <span class="keyword">if</span> data.empty?</pre></div></div>
|
71
|
+
<div class="content"><div class='highlight'><pre> data = <span class="hljs-constant">JSON</span>.parse(request.body.read)
|
72
|
+
<span class="hljs-keyword">begin</span>
|
73
|
+
raise <span class="hljs-string">'Empty params!'</span> <span class="hljs-keyword">if</span> data.empty?</pre></div></div>
|
74
74
|
|
75
75
|
</li>
|
76
76
|
|
@@ -85,11 +85,11 @@
|
|
85
85
|
|
86
86
|
</div>
|
87
87
|
|
88
|
-
<div class="content"><div class='highlight'><pre> data.each <span class="keyword">do</span> |key, value|
|
89
|
-
<span class="keyword">if</span> key == <span class="string">'SourceId'</span>
|
88
|
+
<div class="content"><div class='highlight'><pre> data.each <span class="hljs-keyword">do</span> |key, value|
|
89
|
+
<span class="hljs-keyword">if</span> key == <span class="hljs-string">'SourceId'</span>
|
90
90
|
source_id = value
|
91
|
-
<span class="keyword">end</span>
|
92
|
-
<span class="keyword">end</span></pre></div></div>
|
91
|
+
<span class="hljs-keyword">end</span>
|
92
|
+
<span class="hljs-keyword">end</span></pre></div></div>
|
93
93
|
|
94
94
|
</li>
|
95
95
|
|
@@ -104,13 +104,13 @@
|
|
104
104
|
|
105
105
|
</div>
|
106
106
|
|
107
|
-
<div class="content"><div class='highlight'><pre> <span class="keyword">if</span> <span class="constant">File</span>.exist?(<span class="string">"<span class="subst">#{<span class="constant">File</span>.dirname(__FILE_<span class="number">_</span>)}</span>/../public/user_info.txt"</span>)
|
108
|
-
contents = <span class="constant">File</span>.read(<span class="string">"<span class="subst">#{<span class="constant">File</span>.dirname(__FILE_<span class="number">_</span>)}</span>/../public/user_info.txt"</span>)
|
109
|
-
contents = contents.split(<span class="string">' '</span>)
|
110
|
-
client_id = contents[<span class="number">0</span>]
|
111
|
-
private_key = contents[<span class="number">1</span>]
|
112
|
-
subscriber_email = contents[<span class="number">2</span>]
|
113
|
-
<span class="keyword">end</span></pre></div></div>
|
107
|
+
<div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> <span class="hljs-constant">File</span>.exist?(<span class="hljs-string">"<span class="hljs-subst">#{<span class="hljs-constant">File</span>.dirname(__FILE_<span class="hljs-number">_</span>)}</span>/../public/user_info.txt"</span>)
|
108
|
+
contents = <span class="hljs-constant">File</span>.read(<span class="hljs-string">"<span class="hljs-subst">#{<span class="hljs-constant">File</span>.dirname(__FILE_<span class="hljs-number">_</span>)}</span>/../public/user_info.txt"</span>)
|
109
|
+
contents = contents.split(<span class="hljs-string">' '</span>)
|
110
|
+
client_id = contents[<span class="hljs-number">0</span>]
|
111
|
+
private_key = contents[<span class="hljs-number">1</span>]
|
112
|
+
subscriber_email = contents[<span class="hljs-number">2</span>]
|
113
|
+
<span class="hljs-keyword">end</span></pre></div></div>
|
114
114
|
|
115
115
|
</li>
|
116
116
|
|
@@ -125,7 +125,7 @@
|
|
125
125
|
|
126
126
|
</div>
|
127
127
|
|
128
|
-
<div class="content"><div class='highlight'><pre> form = <span class="constant">GroupDocs::Signature::Form</span>.new({<span class="symbol">:id</span> => source_id})</pre></div></div>
|
128
|
+
<div class="content"><div class='highlight'><pre> form = <span class="hljs-constant">GroupDocs::Signature::Form</span>.new({<span class="hljs-symbol">:id</span> => source_id})</pre></div></div>
|
129
129
|
|
130
130
|
</li>
|
131
131
|
|
@@ -140,7 +140,7 @@
|
|
140
140
|
|
141
141
|
</div>
|
142
142
|
|
143
|
-
<div class="content"><div class='highlight'><pre> document = form.documents!({<span class="symbol">:client_id</span> => client_id, <span class="symbol">:private_key</span> => private_key})</pre></div></div>
|
143
|
+
<div class="content"><div class='highlight'><pre> document = form.documents!({<span class="hljs-symbol">:client_id</span> => client_id, <span class="hljs-symbol">:private_key</span> => private_key})</pre></div></div>
|
144
144
|
|
145
145
|
</li>
|
146
146
|
|
@@ -170,13 +170,13 @@
|
|
170
170
|
|
171
171
|
</div>
|
172
172
|
|
173
|
-
<div class="content"><div class='highlight'><pre> body = <span class="string">"
|
173
|
+
<div class="content"><div class='highlight'><pre> body = <span class="hljs-string">"
|
174
174
|
<html>
|
175
175
|
<head>
|
176
176
|
<title>Sign form notification</title>
|
177
177
|
</head>
|
178
178
|
<body>
|
179
|
-
<p>Document <span class="subst">#{document.name}</span> is signed</p>
|
179
|
+
<p>Document <span class="hljs-subst">#{document.name}</span> is signed</p>
|
180
180
|
</body>
|
181
181
|
</html>"</span></pre></div></div>
|
182
182
|
|
@@ -193,7 +193,7 @@
|
|
193
193
|
|
194
194
|
</div>
|
195
195
|
|
196
|
-
<div class="content"><div class='highlight'><pre> <span class="function"><span class="keyword">def</span>
|
196
|
+
<div class="content"><div class='highlight'><pre> <span class="hljs-function"><span class="hljs-keyword">def</span> </span>send_mail(to, body)</pre></div></div>
|
197
197
|
|
198
198
|
</li>
|
199
199
|
|
@@ -208,15 +208,15 @@
|
|
208
208
|
|
209
209
|
</div>
|
210
210
|
|
211
|
-
<div class="content"><div class='highlight'><pre> <span class="keyword">return</span> <span class="keyword">true</span>
|
212
|
-
<span class="keyword">end</span>
|
211
|
+
<div class="content"><div class='highlight'><pre> <span class="hljs-keyword">return</span> <span class="hljs-keyword">true</span>
|
212
|
+
<span class="hljs-keyword">end</span>
|
213
213
|
|
214
|
-
send_mail(to, body) <span class="comment">#Send notification mail</span>
|
214
|
+
send_mail(to, body) <span class="hljs-comment">#Send notification mail</span>
|
215
215
|
|
216
|
-
<span class="keyword">rescue</span> <span class="constant">Exception</span> => e
|
216
|
+
<span class="hljs-keyword">rescue</span> <span class="hljs-constant">Exception</span> => e
|
217
217
|
err = e.message
|
218
|
-
<span class="keyword">end</span>
|
219
|
-
<span class="keyword">end</span></pre></div></div>
|
218
|
+
<span class="hljs-keyword">end</span>
|
219
|
+
<span class="hljs-keyword">end</span></pre></div></div>
|
220
220
|
|
221
221
|
</li>
|
222
222
|
|
@@ -231,7 +231,7 @@
|
|
231
231
|
|
232
232
|
</div>
|
233
233
|
|
234
|
-
<div class="content"><div class='highlight'><pre>post <span class="string">'/
|
234
|
+
<div class="content"><div class='highlight'><pre>post <span class="hljs-string">'/sample-32-how-to-create-signature-form-publish-it-and-configure-notification-via-callback'</span> <span class="hljs-keyword">do</span></pre></div></div>
|
235
235
|
|
236
236
|
</li>
|
237
237
|
|
@@ -246,16 +246,16 @@
|
|
246
246
|
|
247
247
|
</div>
|
248
248
|
|
249
|
-
<div class="content"><div class='highlight'><pre> set <span class="symbol">:client_id</span>, params[<span class="symbol">:clientId</span>]
|
250
|
-
set <span class="symbol">:private_key</span>, params[<span class="symbol">:privateKey</span>]
|
251
|
-
set <span class="symbol">:template_guid</span>, params[<span class="symbol">:templateGuid</span>]
|
252
|
-
set <span class="symbol">:form_guid</span>, params[<span class="symbol">:formGuid</span>]
|
253
|
-
set <span class="symbol">:email</span>, params[<span class="symbol">:email</span>]
|
254
|
-
set <span class="symbol">:callback</span>, params[<span class="symbol">:callbackUrl</span>]
|
255
|
-
set <span class="symbol">:source</span>, params[<span class="symbol">:source</span>]
|
256
|
-
set <span class="symbol">:base_path</span>, params[<span class="symbol">:basePath</span>]
|
249
|
+
<div class="content"><div class='highlight'><pre> set <span class="hljs-symbol">:client_id</span>, params[<span class="hljs-symbol">:clientId</span>]
|
250
|
+
set <span class="hljs-symbol">:private_key</span>, params[<span class="hljs-symbol">:privateKey</span>]
|
251
|
+
set <span class="hljs-symbol">:template_guid</span>, params[<span class="hljs-symbol">:templateGuid</span>]
|
252
|
+
set <span class="hljs-symbol">:form_guid</span>, params[<span class="hljs-symbol">:formGuid</span>]
|
253
|
+
set <span class="hljs-symbol">:email</span>, params[<span class="hljs-symbol">:email</span>]
|
254
|
+
set <span class="hljs-symbol">:callback</span>, params[<span class="hljs-symbol">:callbackUrl</span>]
|
255
|
+
set <span class="hljs-symbol">:source</span>, params[<span class="hljs-symbol">:source</span>]
|
256
|
+
set <span class="hljs-symbol">:base_path</span>, params[<span class="hljs-symbol">:basePath</span>]
|
257
257
|
|
258
|
-
<span class="keyword">begin</span></pre></div></div>
|
258
|
+
<span class="hljs-keyword">begin</span></pre></div></div>
|
259
259
|
|
260
260
|
</li>
|
261
261
|
|
@@ -270,7 +270,7 @@
|
|
270
270
|
|
271
271
|
</div>
|
272
272
|
|
273
|
-
<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>
|
273
|
+
<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>
|
274
274
|
|
275
275
|
</li>
|
276
276
|
|
@@ -285,13 +285,13 @@
|
|
285
285
|
|
286
286
|
</div>
|
287
287
|
|
288
|
-
<div class="content"><div class='highlight'><pre> <span class="keyword">if</span> settings.base_path.empty?
|
289
|
-
base_path = <span class="string">'https://api.groupdocs.com'</span>
|
290
|
-
<span class="keyword">elsif</span> settings.base_path.match(<span class="string">'/v2.0'</span>)
|
291
|
-
base_path = settings.base_path.split(<span class="string">'/v2.0'</span>)[<span class="number">0</span>]
|
292
|
-
<span class="keyword">else</span>
|
288
|
+
<div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> settings.base_path.empty?
|
289
|
+
base_path = <span class="hljs-string">'https://api.groupdocs.com'</span>
|
290
|
+
<span class="hljs-keyword">elsif</span> settings.base_path.match(<span class="hljs-string">'/v2.0'</span>)
|
291
|
+
base_path = settings.base_path.split(<span class="hljs-string">'/v2.0'</span>)[<span class="hljs-number">0</span>]
|
292
|
+
<span class="hljs-keyword">else</span>
|
293
293
|
base_path = settings.base_path
|
294
|
-
<span class="keyword">end</span></pre></div></div>
|
294
|
+
<span class="hljs-keyword">end</span></pre></div></div>
|
295
295
|
|
296
296
|
</li>
|
297
297
|
|
@@ -306,7 +306,7 @@
|
|
306
306
|
|
307
307
|
</div>
|
308
308
|
|
309
|
-
<div class="content"><div class='highlight'><pre> <span class="constant">GroupDocs</span>.configure <span class="keyword">do</span> |groupdocs|
|
309
|
+
<div class="content"><div class='highlight'><pre> <span class="hljs-constant">GroupDocs</span>.configure <span class="hljs-keyword">do</span> |groupdocs|
|
310
310
|
groupdocs.client_id = settings.client_id
|
311
311
|
groupdocs.private_key = settings.private_key</pre></div></div>
|
312
312
|
|
@@ -323,8 +323,8 @@
|
|
323
323
|
|
324
324
|
</div>
|
325
325
|
|
326
|
-
<div class="content"><div class='highlight'><pre> groupdocs.api_server = base_path <span class="comment"># default is 'https://api.groupdocs.com'</span>
|
327
|
-
<span class="keyword">end</span></pre></div></div>
|
326
|
+
<div class="content"><div class='highlight'><pre> groupdocs.api_server = base_path <span class="hljs-comment"># default is 'https://api.groupdocs.com'</span>
|
327
|
+
<span class="hljs-keyword">end</span></pre></div></div>
|
328
328
|
|
329
329
|
</li>
|
330
330
|
|
@@ -339,8 +339,8 @@
|
|
339
339
|
|
340
340
|
</div>
|
341
341
|
|
342
|
-
<div class="content"><div class='highlight'><pre> <span class="keyword">if</span> settings.callback
|
343
|
-
out_file = <span class="constant">File</span>.new(<span class="string">"<span class="subst">#{<span class="constant">File</span>.dirname(__FILE_<span class="number">_</span>)}</span>/../public/user_info.txt"</span>, <span class="string">'w'</span>)</pre></div></div>
|
342
|
+
<div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> settings.callback
|
343
|
+
out_file = <span class="hljs-constant">File</span>.new(<span class="hljs-string">"<span class="hljs-subst">#{<span class="hljs-constant">File</span>.dirname(__FILE_<span class="hljs-number">_</span>)}</span>/../public/user_info.txt"</span>, <span class="hljs-string">'w'</span>)</pre></div></div>
|
344
344
|
|
345
345
|
</li>
|
346
346
|
|
@@ -355,17 +355,17 @@
|
|
355
355
|
|
356
356
|
</div>
|
357
357
|
|
358
|
-
<div class="content"><div class='highlight'><pre> out_file.write(<span class="string">"<span class="subst">#{settings.client_id}</span> "</span>)
|
359
|
-
out_file.write(<span class="string">"<span class="subst">#{settings.private_key}</span> "</span>)
|
360
|
-
out_file.write(<span class="string">"<span class="subst">#{settings.email}</span>"</span>)
|
358
|
+
<div class="content"><div class='highlight'><pre> out_file.write(<span class="hljs-string">"<span class="hljs-subst">#{settings.client_id}</span> "</span>)
|
359
|
+
out_file.write(<span class="hljs-string">"<span class="hljs-subst">#{settings.private_key}</span> "</span>)
|
360
|
+
out_file.write(<span class="hljs-string">"<span class="hljs-subst">#{settings.email}</span>"</span>)
|
361
361
|
out_file.close
|
362
|
-
<span class="keyword">end</span>
|
362
|
+
<span class="hljs-keyword">end</span>
|
363
363
|
|
364
|
-
guid = <span class="keyword">nil</span>
|
365
|
-
url = <span class="keyword">nil</span>
|
364
|
+
guid = <span class="hljs-keyword">nil</span>
|
365
|
+
url = <span class="hljs-keyword">nil</span>
|
366
366
|
|
367
|
-
<span class="keyword">case</span> settings.source
|
368
|
-
<span class="keyword">when</span> <span class="string">'form'</span>
|
367
|
+
<span class="hljs-keyword">case</span> settings.source
|
368
|
+
<span class="hljs-keyword">when</span> <span class="hljs-string">'form'</span>
|
369
369
|
id = settings.form_guid</pre></div></div>
|
370
370
|
|
371
371
|
</li>
|
@@ -381,9 +381,9 @@
|
|
381
381
|
|
382
382
|
</div>
|
383
383
|
|
384
|
-
<div class="content"><div class='highlight'><pre> form = <span class="constant">GroupDocs::Signature::Form</span>.new
|
385
|
-
form.name = <span class="string">'test'</span>
|
386
|
-
form.notifyOwnerOnSign = <span class="keyword">true</span></pre></div></div>
|
384
|
+
<div class="content"><div class='highlight'><pre> form = <span class="hljs-constant">GroupDocs::Signature::Form</span>.new
|
385
|
+
form.name = <span class="hljs-string">'test'</span>
|
386
|
+
form.notifyOwnerOnSign = <span class="hljs-keyword">true</span></pre></div></div>
|
387
387
|
|
388
388
|
</li>
|
389
389
|
|
@@ -398,8 +398,8 @@
|
|
398
398
|
|
399
399
|
</div>
|
400
400
|
|
401
|
-
<div class="content"><div class='highlight'><pre> id = form.create!({<span class="symbol">:formId</span> => guid})
|
402
|
-
form = <span class="constant">GroupDocs::Signature::Form</span>.get!(id)</pre></div></div>
|
401
|
+
<div class="content"><div class='highlight'><pre> id = form.create!({<span class="hljs-symbol">:formId</span> => guid})
|
402
|
+
form = <span class="hljs-constant">GroupDocs::Signature::Form</span>.get!(id)</pre></div></div>
|
403
403
|
|
404
404
|
</li>
|
405
405
|
|
@@ -414,14 +414,14 @@
|
|
414
414
|
|
415
415
|
</div>
|
416
416
|
|
417
|
-
<div class="content"><div class='highlight'><pre> form.publish!({<span class="symbol">:callbackUrl</span> => settings.callback})
|
417
|
+
<div class="content"><div class='highlight'><pre> form.publish!({<span class="hljs-symbol">:callbackUrl</span> => settings.callback})
|
418
418
|
guid = settings.form_guid
|
419
419
|
|
420
|
-
<span class="keyword">when</span> <span class="string">'template'</span>
|
420
|
+
<span class="hljs-keyword">when</span> <span class="hljs-string">'template'</span>
|
421
421
|
|
422
|
-
form = <span class="constant">GroupDocs::Signature::Form</span>.new
|
423
|
-
form.name = <span class="string">'test'</span>
|
424
|
-
form.notifyOwnerOnSign = <span class="keyword">true</span></pre></div></div>
|
422
|
+
form = <span class="hljs-constant">GroupDocs::Signature::Form</span>.new
|
423
|
+
form.name = <span class="hljs-string">'test'</span>
|
424
|
+
form.notifyOwnerOnSign = <span class="hljs-keyword">true</span></pre></div></div>
|
425
425
|
|
426
426
|
</li>
|
427
427
|
|
@@ -436,7 +436,7 @@
|
|
436
436
|
|
437
437
|
</div>
|
438
438
|
|
439
|
-
<div class="content"><div class='highlight'><pre> guid = form.create!({ <span class="symbol">:templateId</span> => settings.template_guid})</pre></div></div>
|
439
|
+
<div class="content"><div class='highlight'><pre> guid = form.create!({ <span class="hljs-symbol">:templateId</span> => settings.template_guid})</pre></div></div>
|
440
440
|
|
441
441
|
</li>
|
442
442
|
|
@@ -451,9 +451,9 @@
|
|
451
451
|
|
452
452
|
</div>
|
453
453
|
|
454
|
-
<div class="content"><div class='highlight'><pre> form.publish!({<span class="symbol">:callbackUrl</span> => settings.callback})
|
454
|
+
<div class="content"><div class='highlight'><pre> form.publish!({<span class="hljs-symbol">:callbackUrl</span> => settings.callback})
|
455
455
|
|
456
|
-
<span class="keyword">end</span></pre></div></div>
|
456
|
+
<span class="hljs-keyword">end</span></pre></div></div>
|
457
457
|
|
458
458
|
</li>
|
459
459
|
|
@@ -468,7 +468,7 @@
|
|
468
468
|
|
469
469
|
</div>
|
470
470
|
|
471
|
-
<div class="content"><div class='highlight'><pre> iframe = <span class="string">"/signature2/forms/signembed/<span class="subst">#{guid}</span>"</span></pre></div></div>
|
471
|
+
<div class="content"><div class='highlight'><pre> iframe = <span class="hljs-string">"/signature2/forms/signembed/<span class="hljs-subst">#{guid}</span>"</span></pre></div></div>
|
472
472
|
|
473
473
|
</li>
|
474
474
|
|
@@ -483,7 +483,7 @@
|
|
483
483
|
|
484
484
|
</div>
|
485
485
|
|
486
|
-
<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>
|
486
|
+
<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>
|
487
487
|
|
488
488
|
</li>
|
489
489
|
|
@@ -498,14 +498,14 @@
|
|
498
498
|
|
499
499
|
</div>
|
500
500
|
|
501
|
-
<div class="content"><div class='highlight'><pre> <span class="keyword">case</span> base_path
|
502
|
-
<span class="keyword">when</span> <span class="string">'https://stage-api-groupdocs.dynabic.com'</span>
|
503
|
-
iframe = <span class="string">"https://stage-api-groupdocs.dynabic.com<span class="subst">#{url}</span>"</span>
|
504
|
-
<span class="keyword">when</span> <span class="string">'https://dev-api-groupdocs.dynabic.com'</span>
|
505
|
-
iframe = <span class="string">"https://dev-apps.groupdocs.com<span class="subst">#{url}</span>"</span>
|
506
|
-
<span class="keyword">else</span>
|
507
|
-
iframe = <span class="string">"https://apps.groupdocs.com<span class="subst">#{url}</span>"</span>
|
508
|
-
<span class="keyword">end</span></pre></div></div>
|
501
|
+
<div class="content"><div class='highlight'><pre> <span class="hljs-keyword">case</span> base_path
|
502
|
+
<span class="hljs-keyword">when</span> <span class="hljs-string">'https://stage-api-groupdocs.dynabic.com'</span>
|
503
|
+
iframe = <span class="hljs-string">"https://stage-api-groupdocs.dynabic.com<span class="hljs-subst">#{url}</span>"</span>
|
504
|
+
<span class="hljs-keyword">when</span> <span class="hljs-string">'https://dev-api-groupdocs.dynabic.com'</span>
|
505
|
+
iframe = <span class="hljs-string">"https://dev-apps.groupdocs.com<span class="hljs-subst">#{url}</span>"</span>
|
506
|
+
<span class="hljs-keyword">else</span>
|
507
|
+
iframe = <span class="hljs-string">"https://apps.groupdocs.com<span class="hljs-subst">#{url}</span>"</span>
|
508
|
+
<span class="hljs-keyword">end</span></pre></div></div>
|
509
509
|
|
510
510
|
</li>
|
511
511
|
|
@@ -520,11 +520,11 @@
|
|
520
520
|
|
521
521
|
</div>
|
522
522
|
|
523
|
-
<div class="content"><div class='highlight'><pre> iframe = <span class="string">"<iframe id='downloadframe' src='<span class="subst">#{iframe}</span>' width='800' height='1000'></iframe>"</span>
|
523
|
+
<div class="content"><div class='highlight'><pre> iframe = <span class="hljs-string">"<iframe id='downloadframe' src='<span class="hljs-subst">#{iframe}</span>' width='800' height='1000'></iframe>"</span>
|
524
524
|
|
525
|
-
<span class="keyword">rescue</span> <span class="constant">Exception</span> => e
|
525
|
+
<span class="hljs-keyword">rescue</span> <span class="hljs-constant">Exception</span> => e
|
526
526
|
err = e.message
|
527
|
-
<span class="keyword">end</span></pre></div></div>
|
527
|
+
<span class="hljs-keyword">end</span></pre></div></div>
|
528
528
|
|
529
529
|
</li>
|
530
530
|
|
@@ -539,13 +539,13 @@
|
|
539
539
|
|
540
540
|
</div>
|
541
541
|
|
542
|
-
<div class="content"><div class='highlight'><pre> haml <span class="symbol">:sample32</span>, <span class="symbol">:locals</span> => {<span class="symbol">:userId</span> => settings.client_id,
|
543
|
-
<span class="symbol">:privateKey</span> => settings.private_key,
|
544
|
-
<span class="symbol">:callback</span> => settings.callback,
|
545
|
-
<span class="symbol">:email</span> => settings.email,
|
546
|
-
<span class="symbol">:iframe</span> => iframe,
|
547
|
-
<span class="symbol">:err</span> => err}
|
548
|
-
<span class="keyword">end</span></pre></div></div>
|
542
|
+
<div class="content"><div class='highlight'><pre> haml <span class="hljs-symbol">:sample32</span>, <span class="hljs-symbol">:locals</span> => {<span class="hljs-symbol">:userId</span> => settings.client_id,
|
543
|
+
<span class="hljs-symbol">:privateKey</span> => settings.private_key,
|
544
|
+
<span class="hljs-symbol">:callback</span> => settings.callback,
|
545
|
+
<span class="hljs-symbol">:email</span> => settings.email,
|
546
|
+
<span class="hljs-symbol">:iframe</span> => iframe,
|
547
|
+
<span class="hljs-symbol">:err</span> => err}
|
548
|
+
<span class="hljs-keyword">end</span></pre></div></div>
|
549
549
|
|
550
550
|
</li>
|
551
551
|
|
@@ -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">:sample33</span>
|
36
|
-
<span class="keyword">end</span></pre></div></div>
|
34
|
+
<div class="content"><div class='highlight'><pre>get <span class="hljs-string">'/sample-33-how-to-convert-several-html-documents-into-one-pdf-document'</span> <span class="hljs-keyword">do</span>
|
35
|
+
haml <span class="hljs-symbol">:sample33</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-33-how-to-convert-several-html-documents-into-one-pdf-document'</span> <span class="hljs-keyword">do</span></pre></div></div>
|
52
52
|
|
53
53
|
</li>
|
54
54
|
|
@@ -63,14 +63,14 @@
|
|
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">:url_1</span>, params[<span class="symbol">:url1</span>]
|
69
|
-
set <span class="symbol">:url_2</span>, params[<span class="symbol">:url2</span>]
|
70
|
-
set <span class="symbol">:url_3</span>, params[<span class="symbol">:url3</span>]
|
71
|
-
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">:url_1</span>, params[<span class="hljs-symbol">:url1</span>]
|
69
|
+
set <span class="hljs-symbol">:url_2</span>, params[<span class="hljs-symbol">:url2</span>]
|
70
|
+
set <span class="hljs-symbol">:url_3</span>, params[<span class="hljs-symbol">:url3</span>]
|
71
|
+
set <span class="hljs-symbol">:base_path</span>, params[<span class="hljs-symbol">:basePath</span>]
|
72
72
|
|
73
|
-
<span class="keyword">begin</span></pre></div></div>
|
73
|
+
<span class="hljs-keyword">begin</span></pre></div></div>
|
74
74
|
|
75
75
|
</li>
|
76
76
|
|
@@ -85,7 +85,7 @@
|
|
85
85
|
|
86
86
|
</div>
|
87
87
|
|
88
|
-
<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.url_1.empty? <span class="keyword">or</span> settings.url_2.empty? <span class="keyword">or</span> settings.url_3.empty?</pre></div></div>
|
88
|
+
<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.url_1.empty? <span class="hljs-keyword">or</span> settings.url_2.empty? <span class="hljs-keyword">or</span> settings.url_3.empty?</pre></div></div>
|
89
89
|
|
90
90
|
</li>
|
91
91
|
|
@@ -100,13 +100,13 @@
|
|
100
100
|
|
101
101
|
</div>
|
102
102
|
|
103
|
-
<div class="content"><div class='highlight'><pre> <span class="keyword">if</span> settings.base_path.empty?
|
104
|
-
base_path = <span class="string">'https://api.groupdocs.com'</span>
|
105
|
-
<span class="keyword">elsif</span> settings.base_path.match(<span class="string">'/v2.0'</span>)
|
106
|
-
base_path = settings.base_path.split(<span class="string">'/v2.0'</span>)[<span class="number">0</span>]
|
107
|
-
<span class="keyword">else</span>
|
103
|
+
<div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> settings.base_path.empty?
|
104
|
+
base_path = <span class="hljs-string">'https://api.groupdocs.com'</span>
|
105
|
+
<span class="hljs-keyword">elsif</span> settings.base_path.match(<span class="hljs-string">'/v2.0'</span>)
|
106
|
+
base_path = settings.base_path.split(<span class="hljs-string">'/v2.0'</span>)[<span class="hljs-number">0</span>]
|
107
|
+
<span class="hljs-keyword">else</span>
|
108
108
|
base_path = settings.base_path
|
109
|
-
<span class="keyword">end</span></pre></div></div>
|
109
|
+
<span class="hljs-keyword">end</span></pre></div></div>
|
110
110
|
|
111
111
|
</li>
|
112
112
|
|
@@ -121,7 +121,7 @@
|
|
121
121
|
|
122
122
|
</div>
|
123
123
|
|
124
|
-
<div class="content"><div class='highlight'><pre> <span class="constant">GroupDocs</span>.configure <span class="keyword">do</span> |groupdocs|
|
124
|
+
<div class="content"><div class='highlight'><pre> <span class="hljs-constant">GroupDocs</span>.configure <span class="hljs-keyword">do</span> |groupdocs|
|
125
125
|
groupdocs.client_id = settings.client_id
|
126
126
|
groupdocs.private_key = settings.private_key</pre></div></div>
|
127
127
|
|
@@ -138,9 +138,9 @@
|
|
138
138
|
|
139
139
|
</div>
|
140
140
|
|
141
|
-
<div class="content"><div class='highlight'><pre> groupdocs.api_server = base_path <span class="comment"># default is 'https://api.groupdocs.com'</span>
|
141
|
+
<div class="content"><div class='highlight'><pre> groupdocs.api_server = base_path <span class="hljs-comment"># default is 'https://api.groupdocs.com'</span>
|
142
142
|
|
143
|
-
<span class="keyword">end</span></pre></div></div>
|
143
|
+
<span class="hljs-keyword">end</span></pre></div></div>
|
144
144
|
|
145
145
|
</li>
|
146
146
|
|
@@ -170,7 +170,7 @@
|
|
170
170
|
|
171
171
|
</div>
|
172
172
|
|
173
|
-
<div class="content"><div class='highlight'><pre> options = {<span class="symbol">:actions</span> => [<span class="symbol">:convert</span>, <span class="symbol">:combine</span>], <span class="symbol">:out_formats</span> => [<span class="string">'pdf'</span>], <span class="symbol">:status</span> => -<span class="number">1</span>, <span class="symbol">:name</span> => <span class="string">'sample'</span>}</pre></div></div>
|
173
|
+
<div class="content"><div class='highlight'><pre> options = {<span class="hljs-symbol">:actions</span> => [<span class="hljs-symbol">:convert</span>, <span class="hljs-symbol">:combine</span>], <span class="hljs-symbol">:out_formats</span> => [<span class="hljs-string">'pdf'</span>], <span class="hljs-symbol">:status</span> => -<span class="hljs-number">1</span>, <span class="hljs-symbol">:name</span> => <span class="hljs-string">'sample'</span>}</pre></div></div>
|
174
174
|
|
175
175
|
</li>
|
176
176
|
|
@@ -185,7 +185,7 @@
|
|
185
185
|
|
186
186
|
</div>
|
187
187
|
|
188
|
-
<div class="content"><div class='highlight'><pre> job = <span class="constant">GroupDocs::Job</span>.create!(options)</pre></div></div>
|
188
|
+
<div class="content"><div class='highlight'><pre> job = <span class="hljs-constant">GroupDocs::Job</span>.create!(options)</pre></div></div>
|
189
189
|
|
190
190
|
</li>
|
191
191
|
|
@@ -200,10 +200,10 @@
|
|
200
200
|
|
201
201
|
</div>
|
202
202
|
|
203
|
-
<div class="content"><div class='highlight'><pre> url.each <span class="keyword">do</span> |url|
|
204
|
-
document = <span class="constant">GroupDocs::Storage::File</span>.upload_web!(url).to_document
|
205
|
-
job.add_document!(document, {<span class="symbol">:check_ownership</span> => <span class="keyword">false</span>})
|
206
|
-
<span class="keyword">end</span></pre></div></div>
|
203
|
+
<div class="content"><div class='highlight'><pre> url.each <span class="hljs-keyword">do</span> |url|
|
204
|
+
document = <span class="hljs-constant">GroupDocs::Storage::File</span>.upload_web!(url).to_document
|
205
|
+
job.add_document!(document, {<span class="hljs-symbol">:check_ownership</span> => <span class="hljs-keyword">false</span>})
|
206
|
+
<span class="hljs-keyword">end</span></pre></div></div>
|
207
207
|
|
208
208
|
</li>
|
209
209
|
|
@@ -214,20 +214,20 @@
|
|
214
214
|
<div class="pilwrap ">
|
215
215
|
<a class="pilcrow" href="#section-12">¶</a>
|
216
216
|
</div>
|
217
|
-
<p>Update the Job with new status. :status =>
|
217
|
+
<p>Update the Job with new status. :status => ‘0’ mean Active status of the job (Start the job)</p>
|
218
218
|
|
219
219
|
</div>
|
220
220
|
|
221
|
-
<div class="content"><div class='highlight'><pre> id = job.update!({<span class="symbol">:status</span> => <span class="string">'0'</span>})
|
221
|
+
<div class="content"><div class='highlight'><pre> id = job.update!({<span class="hljs-symbol">:status</span> => <span class="hljs-string">'0'</span>})
|
222
222
|
|
223
|
-
i = <span class="number">1</span>
|
223
|
+
i = <span class="hljs-number">1</span>
|
224
224
|
|
225
|
-
<span class="keyword">while</span> i<<span class="number">5</span> <span class="keyword">do</span>
|
226
|
-
sleep(<span class="number">5</span>)
|
227
|
-
job = <span class="constant">GroupDocs::Job</span>.get!(id[<span class="symbol">:job_id</span>])
|
228
|
-
<span class="keyword">break</span> <span class="keyword">if</span> job.status == <span class="symbol">:archived</span>
|
229
|
-
i = i + <span class="number">1</span>
|
230
|
-
<span class="keyword">end</span></pre></div></div>
|
225
|
+
<span class="hljs-keyword">while</span> i<<span class="hljs-number">5</span> <span class="hljs-keyword">do</span>
|
226
|
+
sleep(<span class="hljs-number">5</span>)
|
227
|
+
job = <span class="hljs-constant">GroupDocs::Job</span>.get!(id[<span class="hljs-symbol">:job_id</span>])
|
228
|
+
<span class="hljs-keyword">break</span> <span class="hljs-keyword">if</span> job.status == <span class="hljs-symbol">:archived</span>
|
229
|
+
i = i + <span class="hljs-number">1</span>
|
230
|
+
<span class="hljs-keyword">end</span></pre></div></div>
|
231
231
|
|
232
232
|
</li>
|
233
233
|
|
@@ -244,7 +244,7 @@
|
|
244
244
|
|
245
245
|
<div class="content"><div class='highlight'><pre> file = job.documents!()
|
246
246
|
|
247
|
-
document = file[<span class="symbol">:outputs</span>]</pre></div></div>
|
247
|
+
document = file[<span class="hljs-symbol">:outputs</span>]</pre></div></div>
|
248
248
|
|
249
249
|
</li>
|
250
250
|
|
@@ -259,7 +259,7 @@
|
|
259
259
|
|
260
260
|
</div>
|
261
261
|
|
262
|
-
<div class="content"><div class='highlight'><pre> <span class="keyword">if</span> document</pre></div></div>
|
262
|
+
<div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> document</pre></div></div>
|
263
263
|
|
264
264
|
</li>
|
265
265
|
|
@@ -274,7 +274,7 @@
|
|
274
274
|
|
275
275
|
</div>
|
276
276
|
|
277
|
-
<div class="content"><div class='highlight'><pre> iframe = <span class="string">"/document-viewer/embed/<span class="subst">#{document[<span class="number">0</span>].guid}</span>"</span></pre></div></div>
|
277
|
+
<div class="content"><div class='highlight'><pre> iframe = <span class="hljs-string">"/document-viewer/embed/<span class="hljs-subst">#{document[<span class="hljs-number">0</span>].guid}</span>"</span></pre></div></div>
|
278
278
|
|
279
279
|
</li>
|
280
280
|
|
@@ -289,7 +289,7 @@
|
|
289
289
|
|
290
290
|
</div>
|
291
291
|
|
292
|
-
<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>
|
292
|
+
<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>
|
293
293
|
|
294
294
|
</li>
|
295
295
|
|
@@ -304,14 +304,14 @@
|
|
304
304
|
|
305
305
|
</div>
|
306
306
|
|
307
|
-
<div class="content"><div class='highlight'><pre> <span class="keyword">case</span> base_path
|
308
|
-
<span class="keyword">when</span> <span class="string">'https://stage-api-groupdocs.dynabic.com'</span>
|
309
|
-
iframe = <span class="string">"https://stage-api-groupdocs.dynabic.com<span class="subst">#{url}</span>"</span>
|
310
|
-
<span class="keyword">when</span> <span class="string">'https://dev-api-groupdocs.dynabic.com'</span>
|
311
|
-
iframe = <span class="string">"https://dev-apps.groupdocs.com<span class="subst">#{url}</span>"</span>
|
312
|
-
<span class="keyword">else</span>
|
313
|
-
iframe = <span class="string">"https://apps.groupdocs.com<span class="subst">#{url}</span>"</span>
|
314
|
-
<span class="keyword">end</span></pre></div></div>
|
307
|
+
<div class="content"><div class='highlight'><pre> <span class="hljs-keyword">case</span> base_path
|
308
|
+
<span class="hljs-keyword">when</span> <span class="hljs-string">'https://stage-api-groupdocs.dynabic.com'</span>
|
309
|
+
iframe = <span class="hljs-string">"https://stage-api-groupdocs.dynabic.com<span class="hljs-subst">#{url}</span>"</span>
|
310
|
+
<span class="hljs-keyword">when</span> <span class="hljs-string">'https://dev-api-groupdocs.dynabic.com'</span>
|
311
|
+
iframe = <span class="hljs-string">"https://dev-apps.groupdocs.com<span class="hljs-subst">#{url}</span>"</span>
|
312
|
+
<span class="hljs-keyword">else</span>
|
313
|
+
iframe = <span class="hljs-string">"https://apps.groupdocs.com<span class="hljs-subst">#{url}</span>"</span>
|
314
|
+
<span class="hljs-keyword">end</span></pre></div></div>
|
315
315
|
|
316
316
|
</li>
|
317
317
|
|
@@ -326,14 +326,14 @@
|
|
326
326
|
|
327
327
|
</div>
|
328
328
|
|
329
|
-
<div class="content"><div class='highlight'><pre> iframe = <span class="string">"<iframe id='downloadframe' src='<span class="subst">#{iframe}</span>' width='800' height='1000'></iframe>"</span>
|
329
|
+
<div class="content"><div class='highlight'><pre> iframe = <span class="hljs-string">"<iframe id='downloadframe' src='<span class="hljs-subst">#{iframe}</span>' width='800' height='1000'></iframe>"</span>
|
330
330
|
|
331
|
-
<span class="keyword">else</span>
|
332
|
-
raise <span class="string">'File was not converted'</span>
|
333
|
-
<span class="keyword">end</span>
|
334
|
-
<span class="keyword">rescue</span> <span class="constant">Exception</span> => e
|
331
|
+
<span class="hljs-keyword">else</span>
|
332
|
+
raise <span class="hljs-string">'File was not converted'</span>
|
333
|
+
<span class="hljs-keyword">end</span>
|
334
|
+
<span class="hljs-keyword">rescue</span> <span class="hljs-constant">Exception</span> => e
|
335
335
|
err = e.message
|
336
|
-
<span class="keyword">end</span></pre></div></div>
|
336
|
+
<span class="hljs-keyword">end</span></pre></div></div>
|
337
337
|
|
338
338
|
</li>
|
339
339
|
|
@@ -348,8 +348,8 @@
|
|
348
348
|
|
349
349
|
</div>
|
350
350
|
|
351
|
-
<div class="content"><div class='highlight'><pre> haml <span class="symbol">:sample33</span>, <span class="symbol">:locals</span> => {<span class="symbol">:userId</span> => settings.client_id, <span class="symbol">:privateKey</span> => settings.private_key, <span class="symbol">:err</span> => err, <span class="symbol">:iframe</span> => iframe}
|
352
|
-
<span class="keyword">end</span></pre></div></div>
|
351
|
+
<div class="content"><div class='highlight'><pre> haml <span class="hljs-symbol">:sample33</span>, <span class="hljs-symbol">:locals</span> => {<span class="hljs-symbol">:userId</span> => settings.client_id, <span class="hljs-symbol">:privateKey</span> => settings.private_key, <span class="hljs-symbol">:err</span> => err, <span class="hljs-symbol">:iframe</span> => iframe}
|
352
|
+
<span class="hljs-keyword">end</span></pre></div></div>
|
353
353
|
|
354
354
|
</li>
|
355
355
|
|