groupdocs 1.5.8 → 1.5.9
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +9 -0
- data/examples/api-samples/public/docs/sample01.html +34 -15
- data/examples/api-samples/public/docs/sample02.html +36 -15
- data/examples/api-samples/public/docs/sample03.html +55 -34
- data/examples/api-samples/public/docs/sample04.html +33 -14
- data/examples/api-samples/public/docs/sample05.html +51 -33
- data/examples/api-samples/public/docs/sample06.html +86 -40
- data/examples/api-samples/public/docs/sample07.html +32 -13
- data/examples/api-samples/public/docs/sample08.html +39 -20
- data/examples/api-samples/public/docs/sample09.html +93 -39
- data/examples/api-samples/public/docs/sample10.html +39 -21
- data/examples/api-samples/public/docs/sample11.html +133 -88
- data/examples/api-samples/public/docs/sample12.html +33 -14
- data/examples/api-samples/public/docs/sample13.html +14 -7
- data/examples/api-samples/public/docs/sample14.html +37 -18
- data/examples/api-samples/public/docs/sample15.html +29 -10
- data/examples/api-samples/public/docs/sample16.html +58 -25
- data/examples/api-samples/public/docs/sample17.html +71 -38
- data/examples/api-samples/public/docs/sample18.html +98 -71
- data/examples/api-samples/public/docs/sample19.html +74 -42
- data/examples/api-samples/public/docs/sample20.html +39 -21
- data/examples/api-samples/public/docs/sample21.html +113 -69
- data/examples/api-samples/public/docs/sample22.html +89 -43
- data/examples/api-samples/public/docs/sample23.html +50 -32
- data/examples/api-samples/public/docs/sample24.html +64 -31
- data/examples/api-samples/public/docs/sample25.html +107 -60
- data/examples/api-samples/public/docs/sample26.html +29 -10
- data/examples/api-samples/public/docs/sample27.html +107 -61
- data/examples/api-samples/public/docs/sample28.html +158 -9
- data/examples/api-samples/public/docs/sample29.html +13 -8
- data/examples/api-samples/public/docs/sample30.html +34 -15
- data/examples/api-samples/public/docs/sample31.html +107 -76
- data/examples/api-samples/public/docs/sample32.html +104 -40
- data/examples/api-samples/public/docs/sample33.html +85 -36
- data/examples/api-samples/public/docs/sample34.html +30 -11
- data/examples/api-samples/public/docs/sample35.html +90 -27
- data/examples/api-samples/public/docs/sample36.html +36 -16
- data/examples/api-samples/public/docs/sample37.html +144 -265
- data/examples/api-samples/public/docs/sample38.html +113 -64
- data/examples/api-samples/public/docs/sample39.html +118 -45
- data/examples/api-samples/public/docs/sample40.html +81 -46
- data/examples/api-samples/public/docs/sample41.html +562 -90
- data/examples/api-samples/public/docs/sample42.html +94 -39
- data/examples/api-samples/public/docs/sample43.html +669 -0
- data/examples/api-samples/samples/sample01.rb +17 -10
- data/examples/api-samples/samples/sample02.rb +21 -12
- data/examples/api-samples/samples/sample03.rb +35 -29
- data/examples/api-samples/samples/sample04.rb +19 -12
- data/examples/api-samples/samples/sample05.rb +24 -17
- data/examples/api-samples/samples/sample06.rb +38 -32
- data/examples/api-samples/samples/sample07.rb +19 -12
- data/examples/api-samples/samples/sample08.rb +22 -15
- data/examples/api-samples/samples/sample09.rb +31 -29
- data/examples/api-samples/samples/sample10.rb +22 -15
- data/examples/api-samples/samples/sample11.rb +78 -81
- data/examples/api-samples/samples/sample12.rb +19 -21
- data/examples/api-samples/samples/sample13.rb +19 -21
- data/examples/api-samples/samples/sample14.rb +18 -12
- data/examples/api-samples/samples/sample15.rb +17 -10
- data/examples/api-samples/samples/sample16.rb +25 -17
- data/examples/api-samples/samples/sample17.rb +31 -23
- data/examples/api-samples/samples/sample18.rb +60 -55
- data/examples/api-samples/samples/sample19.rb +48 -42
- data/examples/api-samples/samples/sample20.rb +20 -13
- data/examples/api-samples/samples/sample21.rb +62 -54
- data/examples/api-samples/samples/sample22.rb +37 -31
- data/examples/api-samples/samples/sample23.rb +24 -17
- data/examples/api-samples/samples/sample24.rb +29 -22
- data/examples/api-samples/samples/sample25.rb +47 -40
- data/examples/api-samples/samples/sample26.rb +16 -9
- data/examples/api-samples/samples/sample27.rb +46 -39
- data/examples/api-samples/samples/sample28.rb +42 -11
- data/examples/api-samples/samples/sample29.rb +13 -8
- data/examples/api-samples/samples/sample30.rb +19 -12
- data/examples/api-samples/samples/sample31.rb +63 -58
- data/examples/api-samples/samples/sample32.rb +45 -42
- data/examples/api-samples/samples/sample33.rb +36 -25
- data/examples/api-samples/samples/sample34.rb +16 -9
- data/examples/api-samples/samples/sample35.rb +66 -53
- data/examples/api-samples/samples/sample36.rb +19 -15
- data/examples/api-samples/samples/sample37.rb +61 -99
- data/examples/api-samples/samples/sample38.rb +51 -43
- data/examples/api-samples/samples/sample39.rb +78 -62
- data/examples/api-samples/samples/sample40.rb +48 -38
- data/examples/api-samples/samples/sample41.rb +189 -67
- data/examples/api-samples/samples/sample42.rb +37 -29
- data/examples/api-samples/samples/sample43.rb +127 -0
- data/examples/api-samples/views/_others_samples.haml +4 -2
- data/examples/api-samples/views/index.haml +4 -2
- data/examples/api-samples/views/sample11.haml +1 -1
- data/examples/api-samples/views/sample28.haml +8 -0
- data/examples/api-samples/views/sample31.haml +1 -6
- data/examples/api-samples/views/sample39.haml +7 -2
- data/examples/api-samples/views/sample41.haml +78 -33
- data/examples/api-samples/views/sample42.haml +0 -1
- data/examples/api-samples/views/sample43.haml +91 -0
- data/lib/groupdocs/api/helpers/access_rights_helper.rb +6 -5
- data/lib/groupdocs/api/helpers/url_helper.rb +2 -1
- data/lib/groupdocs/document.rb +3 -3
- data/lib/groupdocs/version.rb +1 -1
- metadata +5 -2
@@ -140,7 +140,7 @@
|
|
140
140
|
|
141
141
|
</div>
|
142
142
|
|
143
|
-
<div class="content"><div class='highlight'><pre> document = form.documents!({
|
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>
|
144
144
|
|
145
145
|
</li>
|
146
146
|
|
@@ -204,14 +204,14 @@
|
|
204
204
|
<div class="pilwrap ">
|
205
205
|
<a class="pilcrow" href="#section-11">¶</a>
|
206
206
|
</div>
|
207
|
-
<p>
|
207
|
+
<p>Implement your send mail function with your SMTP server</p>
|
208
208
|
|
209
209
|
</div>
|
210
210
|
|
211
211
|
<div class="content"><div class='highlight'><pre> <span class="keyword">return</span> <span class="keyword">true</span>
|
212
212
|
<span class="keyword">end</span>
|
213
213
|
|
214
|
-
send_mail(to, body) <span class="comment">#
|
214
|
+
send_mail(to, body) <span class="comment">#Send notification mail</span>
|
215
215
|
|
216
216
|
<span class="keyword">rescue</span> <span class="constant">Exception</span> => e
|
217
217
|
err = e.message
|
@@ -242,7 +242,7 @@
|
|
242
242
|
<div class="pilwrap ">
|
243
243
|
<a class="pilcrow" href="#section-13">¶</a>
|
244
244
|
</div>
|
245
|
-
<p>
|
245
|
+
<p>Set variables</p>
|
246
246
|
|
247
247
|
</div>
|
248
248
|
|
@@ -270,9 +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
|
274
|
-
|
275
|
-
<span class="keyword">if</span> settings.base_path.empty? <span class="keyword">then</span> settings.base_path = <span class="string">'https://api.groupdocs.com'</span> <span class="keyword">end</span></pre></div></div>
|
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>
|
276
274
|
|
277
275
|
</li>
|
278
276
|
|
@@ -283,6 +281,27 @@
|
|
283
281
|
<div class="pilwrap ">
|
284
282
|
<a class="pilcrow" href="#section-15">¶</a>
|
285
283
|
</div>
|
284
|
+
<p>Prepare base path</p>
|
285
|
+
|
286
|
+
</div>
|
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>
|
293
|
+
base_path = settings.base_path
|
294
|
+
<span class="keyword">end</span></pre></div></div>
|
295
|
+
|
296
|
+
</li>
|
297
|
+
|
298
|
+
|
299
|
+
<li id="section-16">
|
300
|
+
<div class="annotation">
|
301
|
+
|
302
|
+
<div class="pilwrap ">
|
303
|
+
<a class="pilcrow" href="#section-16">¶</a>
|
304
|
+
</div>
|
286
305
|
<p>Configure your access to API server</p>
|
287
306
|
|
288
307
|
</div>
|
@@ -294,27 +313,27 @@
|
|
294
313
|
</li>
|
295
314
|
|
296
315
|
|
297
|
-
<li id="section-
|
316
|
+
<li id="section-17">
|
298
317
|
<div class="annotation">
|
299
318
|
|
300
319
|
<div class="pilwrap ">
|
301
|
-
<a class="pilcrow" href="#section-
|
320
|
+
<a class="pilcrow" href="#section-17">¶</a>
|
302
321
|
</div>
|
303
322
|
<p>Optionally specify API server and version</p>
|
304
323
|
|
305
324
|
</div>
|
306
325
|
|
307
|
-
<div class="content"><div class='highlight'><pre> groupdocs.api_server =
|
326
|
+
<div class="content"><div class='highlight'><pre> groupdocs.api_server = base_path <span class="comment"># default is 'https://api.groupdocs.com'</span>
|
308
327
|
<span class="keyword">end</span></pre></div></div>
|
309
328
|
|
310
329
|
</li>
|
311
330
|
|
312
331
|
|
313
|
-
<li id="section-
|
332
|
+
<li id="section-18">
|
314
333
|
<div class="annotation">
|
315
334
|
|
316
335
|
<div class="pilwrap ">
|
317
|
-
<a class="pilcrow" href="#section-
|
336
|
+
<a class="pilcrow" href="#section-18">¶</a>
|
318
337
|
</div>
|
319
338
|
<p>Write client and private key to the file for callback job</p>
|
320
339
|
|
@@ -326,13 +345,13 @@
|
|
326
345
|
</li>
|
327
346
|
|
328
347
|
|
329
|
-
<li id="section-
|
348
|
+
<li id="section-19">
|
330
349
|
<div class="annotation">
|
331
350
|
|
332
351
|
<div class="pilwrap ">
|
333
|
-
<a class="pilcrow" href="#section-
|
352
|
+
<a class="pilcrow" href="#section-19">¶</a>
|
334
353
|
</div>
|
335
|
-
<p>
|
354
|
+
<p>White space is required</p>
|
336
355
|
|
337
356
|
</div>
|
338
357
|
|
@@ -352,33 +371,50 @@
|
|
352
371
|
</li>
|
353
372
|
|
354
373
|
|
355
|
-
<li id="section-
|
374
|
+
<li id="section-20">
|
356
375
|
<div class="annotation">
|
357
376
|
|
358
377
|
<div class="pilwrap ">
|
359
|
-
<a class="pilcrow" href="#section-
|
378
|
+
<a class="pilcrow" href="#section-20">¶</a>
|
360
379
|
</div>
|
361
380
|
<p>Create new Form with guid</p>
|
362
381
|
|
363
382
|
</div>
|
364
383
|
|
365
|
-
<div class="content"><div class='highlight'><pre> form = <span class="constant">GroupDocs::Signature::Form</span>.
|
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>
|
366
387
|
|
367
388
|
</li>
|
368
389
|
|
369
390
|
|
370
|
-
<li id="section-
|
391
|
+
<li id="section-21">
|
371
392
|
<div class="annotation">
|
372
393
|
|
373
394
|
<div class="pilwrap ">
|
374
|
-
<a class="pilcrow" href="#section-
|
395
|
+
<a class="pilcrow" href="#section-21">¶</a>
|
396
|
+
</div>
|
397
|
+
<p>Create new Form with template</p>
|
398
|
+
|
399
|
+
</div>
|
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>
|
403
|
+
|
404
|
+
</li>
|
405
|
+
|
406
|
+
|
407
|
+
<li id="section-22">
|
408
|
+
<div class="annotation">
|
409
|
+
|
410
|
+
<div class="pilwrap ">
|
411
|
+
<a class="pilcrow" href="#section-22">¶</a>
|
375
412
|
</div>
|
376
413
|
<p>Publish the Form</p>
|
377
414
|
|
378
415
|
</div>
|
379
416
|
|
380
417
|
<div class="content"><div class='highlight'><pre> form.publish!({<span class="symbol">:callbackUrl</span> => settings.callback})
|
381
|
-
raise form.to_yaml
|
382
418
|
guid = settings.form_guid
|
383
419
|
|
384
420
|
<span class="keyword">when</span> <span class="string">'template'</span>
|
@@ -390,11 +426,11 @@
|
|
390
426
|
</li>
|
391
427
|
|
392
428
|
|
393
|
-
<li id="section-
|
429
|
+
<li id="section-23">
|
394
430
|
<div class="annotation">
|
395
431
|
|
396
432
|
<div class="pilwrap ">
|
397
|
-
<a class="pilcrow" href="#section-
|
433
|
+
<a class="pilcrow" href="#section-23">¶</a>
|
398
434
|
</div>
|
399
435
|
<p>Create new Form with template</p>
|
400
436
|
|
@@ -405,11 +441,11 @@
|
|
405
441
|
</li>
|
406
442
|
|
407
443
|
|
408
|
-
<li id="section-
|
444
|
+
<li id="section-24">
|
409
445
|
<div class="annotation">
|
410
446
|
|
411
447
|
<div class="pilwrap ">
|
412
|
-
<a class="pilcrow" href="#section-
|
448
|
+
<a class="pilcrow" href="#section-24">¶</a>
|
413
449
|
</div>
|
414
450
|
<p>Publish the Form</p>
|
415
451
|
|
@@ -422,41 +458,69 @@
|
|
422
458
|
</li>
|
423
459
|
|
424
460
|
|
425
|
-
<li id="section-
|
461
|
+
<li id="section-25">
|
426
462
|
<div class="annotation">
|
427
463
|
|
428
464
|
<div class="pilwrap ">
|
429
|
-
<a class="pilcrow" href="#section-
|
465
|
+
<a class="pilcrow" href="#section-25">¶</a>
|
430
466
|
</div>
|
431
|
-
<p>
|
467
|
+
<p>Prepare to sign url</p>
|
432
468
|
|
433
469
|
</div>
|
434
470
|
|
435
|
-
<div class="content"><div class='highlight'><pre> <span class="
|
436
|
-
|
471
|
+
<div class="content"><div class='highlight'><pre> iframe = <span class="string">"/signature2/forms/signembed/<span class="subst">#{guid}</span>"</span></pre></div></div>
|
472
|
+
|
473
|
+
</li>
|
474
|
+
|
475
|
+
|
476
|
+
<li id="section-26">
|
477
|
+
<div class="annotation">
|
478
|
+
|
479
|
+
<div class="pilwrap ">
|
480
|
+
<a class="pilcrow" href="#section-26">¶</a>
|
481
|
+
</div>
|
482
|
+
<p>Construct result string</p>
|
483
|
+
|
484
|
+
</div>
|
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>
|
487
|
+
|
488
|
+
</li>
|
489
|
+
|
490
|
+
|
491
|
+
<li id="section-27">
|
492
|
+
<div class="annotation">
|
493
|
+
|
494
|
+
<div class="pilwrap ">
|
495
|
+
<a class="pilcrow" href="#section-27">¶</a>
|
496
|
+
</div>
|
497
|
+
<p>Generate iframe URL</p>
|
498
|
+
|
499
|
+
</div>
|
500
|
+
|
501
|
+
<div class="content"><div class='highlight'><pre> <span class="keyword">case</span> base_path
|
437
502
|
<span class="keyword">when</span> <span class="string">'https://stage-api-groupdocs.dynabic.com'</span>
|
438
|
-
|
503
|
+
iframe = <span class="string">"https://stage-api-groupdocs.dynabic.com<span class="subst">#{url}</span>"</span>
|
439
504
|
<span class="keyword">when</span> <span class="string">'https://dev-api-groupdocs.dynabic.com'</span>
|
440
|
-
|
505
|
+
iframe = <span class="string">"https://dev-apps.groupdocs.com<span class="subst">#{url}</span>"</span>
|
441
506
|
<span class="keyword">else</span>
|
442
|
-
|
507
|
+
iframe = <span class="string">"https://apps.groupdocs.com<span class="subst">#{url}</span>"</span>
|
443
508
|
<span class="keyword">end</span></pre></div></div>
|
444
509
|
|
445
510
|
</li>
|
446
511
|
|
447
512
|
|
448
|
-
<li id="section-
|
513
|
+
<li id="section-28">
|
449
514
|
<div class="annotation">
|
450
515
|
|
451
516
|
<div class="pilwrap ">
|
452
|
-
<a class="pilcrow" href="#section-
|
517
|
+
<a class="pilcrow" href="#section-28">¶</a>
|
453
518
|
</div>
|
454
|
-
<p>
|
519
|
+
<p>Make iframe</p>
|
455
520
|
|
456
521
|
</div>
|
457
522
|
|
458
|
-
<div class="content"><div class='highlight'><pre> iframe = <span class="
|
459
|
-
iframe = <span class="string">"<iframe width='100%' height='600' frameborder='0' src='<span class="subst">#{iframe}</span>'></iframe>"</span>
|
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>
|
460
524
|
|
461
525
|
<span class="keyword">rescue</span> <span class="constant">Exception</span> => e
|
462
526
|
err = e.message
|
@@ -465,11 +529,11 @@
|
|
465
529
|
</li>
|
466
530
|
|
467
531
|
|
468
|
-
<li id="section-
|
532
|
+
<li id="section-29">
|
469
533
|
<div class="annotation">
|
470
534
|
|
471
535
|
<div class="pilwrap ">
|
472
|
-
<a class="pilcrow" href="#section-
|
536
|
+
<a class="pilcrow" href="#section-29">¶</a>
|
473
537
|
</div>
|
474
538
|
<p>Set variables for template</p>
|
475
539
|
|
@@ -59,7 +59,7 @@
|
|
59
59
|
<div class="pilwrap ">
|
60
60
|
<a class="pilcrow" href="#section-3">¶</a>
|
61
61
|
</div>
|
62
|
-
<p>
|
62
|
+
<p>Set variables</p>
|
63
63
|
|
64
64
|
</div>
|
65
65
|
|
@@ -85,9 +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
|
89
|
-
|
90
|
-
<span class="keyword">if</span> settings.base_path.empty? <span class="keyword">then</span> settings.base_path = <span class="string">'https://api.groupdocs.com'</span> <span class="keyword">end</span></pre></div></div>
|
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>
|
91
89
|
|
92
90
|
</li>
|
93
91
|
|
@@ -98,6 +96,27 @@
|
|
98
96
|
<div class="pilwrap ">
|
99
97
|
<a class="pilcrow" href="#section-5">¶</a>
|
100
98
|
</div>
|
99
|
+
<p>Prepare base path</p>
|
100
|
+
|
101
|
+
</div>
|
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>
|
108
|
+
base_path = settings.base_path
|
109
|
+
<span class="keyword">end</span></pre></div></div>
|
110
|
+
|
111
|
+
</li>
|
112
|
+
|
113
|
+
|
114
|
+
<li id="section-6">
|
115
|
+
<div class="annotation">
|
116
|
+
|
117
|
+
<div class="pilwrap ">
|
118
|
+
<a class="pilcrow" href="#section-6">¶</a>
|
119
|
+
</div>
|
101
120
|
<p>Configure your access to API server</p>
|
102
121
|
|
103
122
|
</div>
|
@@ -109,27 +128,28 @@
|
|
109
128
|
</li>
|
110
129
|
|
111
130
|
|
112
|
-
<li id="section-
|
131
|
+
<li id="section-7">
|
113
132
|
<div class="annotation">
|
114
133
|
|
115
134
|
<div class="pilwrap ">
|
116
|
-
<a class="pilcrow" href="#section-
|
135
|
+
<a class="pilcrow" href="#section-7">¶</a>
|
117
136
|
</div>
|
118
137
|
<p>Optionally specify API server and version</p>
|
119
138
|
|
120
139
|
</div>
|
121
140
|
|
122
|
-
<div class="content"><div class='highlight'><pre> groupdocs.api_server =
|
141
|
+
<div class="content"><div class='highlight'><pre> groupdocs.api_server = base_path <span class="comment"># default is 'https://api.groupdocs.com'</span>
|
142
|
+
|
123
143
|
<span class="keyword">end</span></pre></div></div>
|
124
144
|
|
125
145
|
</li>
|
126
146
|
|
127
147
|
|
128
|
-
<li id="section-
|
148
|
+
<li id="section-8">
|
129
149
|
<div class="annotation">
|
130
150
|
|
131
151
|
<div class="pilwrap ">
|
132
|
-
<a class="pilcrow" href="#section-
|
152
|
+
<a class="pilcrow" href="#section-8">¶</a>
|
133
153
|
</div>
|
134
154
|
<p>Create Array from variables</p>
|
135
155
|
|
@@ -140,11 +160,11 @@
|
|
140
160
|
</li>
|
141
161
|
|
142
162
|
|
143
|
-
<li id="section-
|
163
|
+
<li id="section-9">
|
144
164
|
<div class="annotation">
|
145
165
|
|
146
166
|
<div class="pilwrap ">
|
147
|
-
<a class="pilcrow" href="#section-
|
167
|
+
<a class="pilcrow" href="#section-9">¶</a>
|
148
168
|
</div>
|
149
169
|
<p>Create Hash with the options for job. :status=> -1 means the Draft status of the job</p>
|
150
170
|
|
@@ -155,11 +175,11 @@
|
|
155
175
|
</li>
|
156
176
|
|
157
177
|
|
158
|
-
<li id="section-
|
178
|
+
<li id="section-10">
|
159
179
|
<div class="annotation">
|
160
180
|
|
161
181
|
<div class="pilwrap ">
|
162
|
-
<a class="pilcrow" href="#section-
|
182
|
+
<a class="pilcrow" href="#section-10">¶</a>
|
163
183
|
</div>
|
164
184
|
<p>Create Job with provided options with Draft status (Sheduled job)</p>
|
165
185
|
|
@@ -170,11 +190,11 @@
|
|
170
190
|
</li>
|
171
191
|
|
172
192
|
|
173
|
-
<li id="section-
|
193
|
+
<li id="section-11">
|
174
194
|
<div class="annotation">
|
175
195
|
|
176
196
|
<div class="pilwrap ">
|
177
|
-
<a class="pilcrow" href="#section-
|
197
|
+
<a class="pilcrow" href="#section-11">¶</a>
|
178
198
|
</div>
|
179
199
|
<p>Upload documents to GroupDocs Storage by url and add the documents to previously created Job</p>
|
180
200
|
|
@@ -188,11 +208,11 @@
|
|
188
208
|
</li>
|
189
209
|
|
190
210
|
|
191
|
-
<li id="section-
|
211
|
+
<li id="section-12">
|
192
212
|
<div class="annotation">
|
193
213
|
|
194
214
|
<div class="pilwrap ">
|
195
|
-
<a class="pilcrow" href="#section-
|
215
|
+
<a class="pilcrow" href="#section-12">¶</a>
|
196
216
|
</div>
|
197
217
|
<p>Update the Job with new status. :status => '0' mean Active status of the job (Start the job)</p>
|
198
218
|
|
@@ -212,11 +232,11 @@
|
|
212
232
|
</li>
|
213
233
|
|
214
234
|
|
215
|
-
<li id="section-
|
235
|
+
<li id="section-13">
|
216
236
|
<div class="annotation">
|
217
237
|
|
218
238
|
<div class="pilwrap ">
|
219
|
-
<a class="pilcrow" href="#section-
|
239
|
+
<a class="pilcrow" href="#section-13">¶</a>
|
220
240
|
</div>
|
221
241
|
<p>Get the document into Pdf format</p>
|
222
242
|
|
@@ -229,11 +249,11 @@
|
|
229
249
|
</li>
|
230
250
|
|
231
251
|
|
232
|
-
<li id="section-
|
252
|
+
<li id="section-14">
|
233
253
|
<div class="annotation">
|
234
254
|
|
235
255
|
<div class="pilwrap ">
|
236
|
-
<a class="pilcrow" href="#section-
|
256
|
+
<a class="pilcrow" href="#section-14">¶</a>
|
237
257
|
</div>
|
238
258
|
<p>Set iframe with document GUID or raise an error</p>
|
239
259
|
|
@@ -244,41 +264,70 @@
|
|
244
264
|
</li>
|
245
265
|
|
246
266
|
|
247
|
-
<li id="section-
|
267
|
+
<li id="section-15">
|
248
268
|
<div class="annotation">
|
249
269
|
|
250
270
|
<div class="pilwrap ">
|
251
|
-
<a class="pilcrow" href="#section-
|
271
|
+
<a class="pilcrow" href="#section-15">¶</a>
|
252
272
|
</div>
|
253
|
-
<p>
|
273
|
+
<p>Prepare to sign url</p>
|
254
274
|
|
255
275
|
</div>
|
256
276
|
|
257
|
-
<div class="content"><div class='highlight'><pre> <span class="
|
258
|
-
|
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>
|
278
|
+
|
279
|
+
</li>
|
280
|
+
|
281
|
+
|
282
|
+
<li id="section-16">
|
283
|
+
<div class="annotation">
|
284
|
+
|
285
|
+
<div class="pilwrap ">
|
286
|
+
<a class="pilcrow" href="#section-16">¶</a>
|
287
|
+
</div>
|
288
|
+
<p>Construct result string</p>
|
289
|
+
|
290
|
+
</div>
|
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>
|
293
|
+
|
294
|
+
</li>
|
295
|
+
|
296
|
+
|
297
|
+
<li id="section-17">
|
298
|
+
<div class="annotation">
|
299
|
+
|
300
|
+
<div class="pilwrap ">
|
301
|
+
<a class="pilcrow" href="#section-17">¶</a>
|
302
|
+
</div>
|
303
|
+
<p>Generate iframe URL</p>
|
304
|
+
|
305
|
+
</div>
|
306
|
+
|
307
|
+
<div class="content"><div class='highlight'><pre> <span class="keyword">case</span> base_path
|
259
308
|
<span class="keyword">when</span> <span class="string">'https://stage-api-groupdocs.dynabic.com'</span>
|
260
|
-
|
309
|
+
iframe = <span class="string">"https://stage-api-groupdocs.dynabic.com<span class="subst">#{url}</span>"</span>
|
261
310
|
<span class="keyword">when</span> <span class="string">'https://dev-api-groupdocs.dynabic.com'</span>
|
262
|
-
|
311
|
+
iframe = <span class="string">"https://dev-apps.groupdocs.com<span class="subst">#{url}</span>"</span>
|
263
312
|
<span class="keyword">else</span>
|
264
|
-
|
313
|
+
iframe = <span class="string">"https://apps.groupdocs.com<span class="subst">#{url}</span>"</span>
|
265
314
|
<span class="keyword">end</span></pre></div></div>
|
266
315
|
|
267
316
|
</li>
|
268
317
|
|
269
318
|
|
270
|
-
<li id="section-
|
319
|
+
<li id="section-18">
|
271
320
|
<div class="annotation">
|
272
321
|
|
273
322
|
<div class="pilwrap ">
|
274
|
-
<a class="pilcrow" href="#section-
|
323
|
+
<a class="pilcrow" href="#section-18">¶</a>
|
275
324
|
</div>
|
276
|
-
<p>
|
325
|
+
<p>Make iframe</p>
|
277
326
|
|
278
327
|
</div>
|
279
328
|
|
280
|
-
<div class="content"><div class='highlight'><pre> iframe = <span class="
|
281
|
-
|
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>
|
330
|
+
|
282
331
|
<span class="keyword">else</span>
|
283
332
|
raise <span class="string">'File was not converted'</span>
|
284
333
|
<span class="keyword">end</span>
|
@@ -289,11 +338,11 @@
|
|
289
338
|
</li>
|
290
339
|
|
291
340
|
|
292
|
-
<li id="section-
|
341
|
+
<li id="section-19">
|
293
342
|
<div class="annotation">
|
294
343
|
|
295
344
|
<div class="pilwrap ">
|
296
|
-
<a class="pilcrow" href="#section-
|
345
|
+
<a class="pilcrow" href="#section-19">¶</a>
|
297
346
|
</div>
|
298
347
|
<p>Set variables for template</p>
|
299
348
|
|