groupdocs 1.5.8 → 1.5.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (101) hide show
  1. data/CHANGELOG.md +9 -0
  2. data/examples/api-samples/public/docs/sample01.html +34 -15
  3. data/examples/api-samples/public/docs/sample02.html +36 -15
  4. data/examples/api-samples/public/docs/sample03.html +55 -34
  5. data/examples/api-samples/public/docs/sample04.html +33 -14
  6. data/examples/api-samples/public/docs/sample05.html +51 -33
  7. data/examples/api-samples/public/docs/sample06.html +86 -40
  8. data/examples/api-samples/public/docs/sample07.html +32 -13
  9. data/examples/api-samples/public/docs/sample08.html +39 -20
  10. data/examples/api-samples/public/docs/sample09.html +93 -39
  11. data/examples/api-samples/public/docs/sample10.html +39 -21
  12. data/examples/api-samples/public/docs/sample11.html +133 -88
  13. data/examples/api-samples/public/docs/sample12.html +33 -14
  14. data/examples/api-samples/public/docs/sample13.html +14 -7
  15. data/examples/api-samples/public/docs/sample14.html +37 -18
  16. data/examples/api-samples/public/docs/sample15.html +29 -10
  17. data/examples/api-samples/public/docs/sample16.html +58 -25
  18. data/examples/api-samples/public/docs/sample17.html +71 -38
  19. data/examples/api-samples/public/docs/sample18.html +98 -71
  20. data/examples/api-samples/public/docs/sample19.html +74 -42
  21. data/examples/api-samples/public/docs/sample20.html +39 -21
  22. data/examples/api-samples/public/docs/sample21.html +113 -69
  23. data/examples/api-samples/public/docs/sample22.html +89 -43
  24. data/examples/api-samples/public/docs/sample23.html +50 -32
  25. data/examples/api-samples/public/docs/sample24.html +64 -31
  26. data/examples/api-samples/public/docs/sample25.html +107 -60
  27. data/examples/api-samples/public/docs/sample26.html +29 -10
  28. data/examples/api-samples/public/docs/sample27.html +107 -61
  29. data/examples/api-samples/public/docs/sample28.html +158 -9
  30. data/examples/api-samples/public/docs/sample29.html +13 -8
  31. data/examples/api-samples/public/docs/sample30.html +34 -15
  32. data/examples/api-samples/public/docs/sample31.html +107 -76
  33. data/examples/api-samples/public/docs/sample32.html +104 -40
  34. data/examples/api-samples/public/docs/sample33.html +85 -36
  35. data/examples/api-samples/public/docs/sample34.html +30 -11
  36. data/examples/api-samples/public/docs/sample35.html +90 -27
  37. data/examples/api-samples/public/docs/sample36.html +36 -16
  38. data/examples/api-samples/public/docs/sample37.html +144 -265
  39. data/examples/api-samples/public/docs/sample38.html +113 -64
  40. data/examples/api-samples/public/docs/sample39.html +118 -45
  41. data/examples/api-samples/public/docs/sample40.html +81 -46
  42. data/examples/api-samples/public/docs/sample41.html +562 -90
  43. data/examples/api-samples/public/docs/sample42.html +94 -39
  44. data/examples/api-samples/public/docs/sample43.html +669 -0
  45. data/examples/api-samples/samples/sample01.rb +17 -10
  46. data/examples/api-samples/samples/sample02.rb +21 -12
  47. data/examples/api-samples/samples/sample03.rb +35 -29
  48. data/examples/api-samples/samples/sample04.rb +19 -12
  49. data/examples/api-samples/samples/sample05.rb +24 -17
  50. data/examples/api-samples/samples/sample06.rb +38 -32
  51. data/examples/api-samples/samples/sample07.rb +19 -12
  52. data/examples/api-samples/samples/sample08.rb +22 -15
  53. data/examples/api-samples/samples/sample09.rb +31 -29
  54. data/examples/api-samples/samples/sample10.rb +22 -15
  55. data/examples/api-samples/samples/sample11.rb +78 -81
  56. data/examples/api-samples/samples/sample12.rb +19 -21
  57. data/examples/api-samples/samples/sample13.rb +19 -21
  58. data/examples/api-samples/samples/sample14.rb +18 -12
  59. data/examples/api-samples/samples/sample15.rb +17 -10
  60. data/examples/api-samples/samples/sample16.rb +25 -17
  61. data/examples/api-samples/samples/sample17.rb +31 -23
  62. data/examples/api-samples/samples/sample18.rb +60 -55
  63. data/examples/api-samples/samples/sample19.rb +48 -42
  64. data/examples/api-samples/samples/sample20.rb +20 -13
  65. data/examples/api-samples/samples/sample21.rb +62 -54
  66. data/examples/api-samples/samples/sample22.rb +37 -31
  67. data/examples/api-samples/samples/sample23.rb +24 -17
  68. data/examples/api-samples/samples/sample24.rb +29 -22
  69. data/examples/api-samples/samples/sample25.rb +47 -40
  70. data/examples/api-samples/samples/sample26.rb +16 -9
  71. data/examples/api-samples/samples/sample27.rb +46 -39
  72. data/examples/api-samples/samples/sample28.rb +42 -11
  73. data/examples/api-samples/samples/sample29.rb +13 -8
  74. data/examples/api-samples/samples/sample30.rb +19 -12
  75. data/examples/api-samples/samples/sample31.rb +63 -58
  76. data/examples/api-samples/samples/sample32.rb +45 -42
  77. data/examples/api-samples/samples/sample33.rb +36 -25
  78. data/examples/api-samples/samples/sample34.rb +16 -9
  79. data/examples/api-samples/samples/sample35.rb +66 -53
  80. data/examples/api-samples/samples/sample36.rb +19 -15
  81. data/examples/api-samples/samples/sample37.rb +61 -99
  82. data/examples/api-samples/samples/sample38.rb +51 -43
  83. data/examples/api-samples/samples/sample39.rb +78 -62
  84. data/examples/api-samples/samples/sample40.rb +48 -38
  85. data/examples/api-samples/samples/sample41.rb +189 -67
  86. data/examples/api-samples/samples/sample42.rb +37 -29
  87. data/examples/api-samples/samples/sample43.rb +127 -0
  88. data/examples/api-samples/views/_others_samples.haml +4 -2
  89. data/examples/api-samples/views/index.haml +4 -2
  90. data/examples/api-samples/views/sample11.haml +1 -1
  91. data/examples/api-samples/views/sample28.haml +8 -0
  92. data/examples/api-samples/views/sample31.haml +1 -6
  93. data/examples/api-samples/views/sample39.haml +7 -2
  94. data/examples/api-samples/views/sample41.haml +78 -33
  95. data/examples/api-samples/views/sample42.haml +0 -1
  96. data/examples/api-samples/views/sample43.haml +91 -0
  97. data/lib/groupdocs/api/helpers/access_rights_helper.rb +6 -5
  98. data/lib/groupdocs/api/helpers/url_helper.rb +2 -1
  99. data/lib/groupdocs/document.rb +3 -3
  100. data/lib/groupdocs/version.rb +1 -1
  101. 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!({}, {<span class="symbol">:client_id</span> =&gt; client_id, <span class="symbol">:private_key</span> =&gt; private_key})</pre></div></div>
143
+ <div class="content"><div class='highlight'><pre> document = form.documents!({<span class="symbol">:client_id</span> =&gt; client_id, <span class="symbol">:private_key</span> =&gt; 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">&#182;</a>
206
206
  </div>
207
- <p>implement your send mail function with your SMTP server</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">#send notification mail</span>
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> =&gt; e
217
217
  err = e.message
@@ -242,7 +242,7 @@
242
242
  <div class="pilwrap ">
243
243
  <a class="pilcrow" href="#section-13">&#182;</a>
244
244
  </div>
245
- <p>set variables</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">&#182;</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">&#182;</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-16">
316
+ <li id="section-17">
298
317
  <div class="annotation">
299
318
 
300
319
  <div class="pilwrap ">
301
- <a class="pilcrow" href="#section-16">&#182;</a>
320
+ <a class="pilcrow" href="#section-17">&#182;</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 = settings.base_path <span class="comment"># default is 'https://api.groupdocs.com'</span>
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-17">
332
+ <li id="section-18">
314
333
  <div class="annotation">
315
334
 
316
335
  <div class="pilwrap ">
317
- <a class="pilcrow" href="#section-17">&#182;</a>
336
+ <a class="pilcrow" href="#section-18">&#182;</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-18">
348
+ <li id="section-19">
330
349
  <div class="annotation">
331
350
 
332
351
  <div class="pilwrap ">
333
- <a class="pilcrow" href="#section-18">&#182;</a>
352
+ <a class="pilcrow" href="#section-19">&#182;</a>
334
353
  </div>
335
- <p>white space is required</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-19">
374
+ <li id="section-20">
356
375
  <div class="annotation">
357
376
 
358
377
  <div class="pilwrap ">
359
- <a class="pilcrow" href="#section-19">&#182;</a>
378
+ <a class="pilcrow" href="#section-20">&#182;</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>.get!(id)</pre></div></div>
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-20">
391
+ <li id="section-21">
371
392
  <div class="annotation">
372
393
 
373
394
  <div class="pilwrap ">
374
- <a class="pilcrow" href="#section-20">&#182;</a>
395
+ <a class="pilcrow" href="#section-21">&#182;</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> =&gt; 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">&#182;</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> =&gt; 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-21">
429
+ <li id="section-23">
394
430
  <div class="annotation">
395
431
 
396
432
  <div class="pilwrap ">
397
- <a class="pilcrow" href="#section-21">&#182;</a>
433
+ <a class="pilcrow" href="#section-23">&#182;</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-22">
444
+ <li id="section-24">
409
445
  <div class="annotation">
410
446
 
411
447
  <div class="pilwrap ">
412
- <a class="pilcrow" href="#section-22">&#182;</a>
448
+ <a class="pilcrow" href="#section-24">&#182;</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-23">
461
+ <li id="section-25">
426
462
  <div class="annotation">
427
463
 
428
464
  <div class="pilwrap ">
429
- <a class="pilcrow" href="#section-23">&#182;</a>
465
+ <a class="pilcrow" href="#section-25">&#182;</a>
430
466
  </div>
431
- <p>Get url from request</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="keyword">case</span> settings.base_path
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">&#182;</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> =&gt; 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">&#182;</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
- url = <span class="string">"http://stage-apps-groupdocs.dynabic.com/signature2/forms/signembed/ <span class="subst">#{guid}</span>"</span>
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
- url = <span class="string">"http://dev-apps-groupdocs.dynabic.com/signature2/forms/signembed/ <span class="subst">#{guid}</span>"</span>
505
+ iframe = <span class="string">"https://dev-apps.groupdocs.com<span class="subst">#{url}</span>"</span>
441
506
  <span class="keyword">else</span>
442
- url = <span class="string">"https://apps.groupdocs.com/signature2/forms/signembed/ <span class="subst">#{guid}</span>"</span>
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-24">
513
+ <li id="section-28">
449
514
  <div class="annotation">
450
515
 
451
516
  <div class="pilwrap ">
452
- <a class="pilcrow" href="#section-24">&#182;</a>
517
+ <a class="pilcrow" href="#section-28">&#182;</a>
453
518
  </div>
454
- <p>Add the signature to url the request</p>
519
+ <p>Make iframe</p>
455
520
 
456
521
  </div>
457
522
 
458
- <div class="content"><div class='highlight'><pre> iframe = <span class="constant">GroupDocs::Api::Request</span>.new(<span class="symbol">:path</span> =&gt; url).prepare_and_sign_url
459
- iframe = <span class="string">"&lt;iframe width='100%' height='600' frameborder='0' src='<span class="subst">#{iframe}</span>'&gt;&lt;/iframe&gt;"</span>
523
+ <div class="content"><div class='highlight'><pre> iframe = <span class="string">"&lt;iframe id='downloadframe' src='<span class="subst">#{iframe}</span>' width='800' height='1000'&gt;&lt;/iframe&gt;"</span>
460
524
 
461
525
  <span class="keyword">rescue</span> <span class="constant">Exception</span> =&gt; e
462
526
  err = e.message
@@ -465,11 +529,11 @@
465
529
  </li>
466
530
 
467
531
 
468
- <li id="section-25">
532
+ <li id="section-29">
469
533
  <div class="annotation">
470
534
 
471
535
  <div class="pilwrap ">
472
- <a class="pilcrow" href="#section-25">&#182;</a>
536
+ <a class="pilcrow" href="#section-29">&#182;</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">&#182;</a>
61
61
  </div>
62
- <p>set variables</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">&#182;</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">&#182;</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-6">
131
+ <li id="section-7">
113
132
  <div class="annotation">
114
133
 
115
134
  <div class="pilwrap ">
116
- <a class="pilcrow" href="#section-6">&#182;</a>
135
+ <a class="pilcrow" href="#section-7">&#182;</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 = settings.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="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-7">
148
+ <li id="section-8">
129
149
  <div class="annotation">
130
150
 
131
151
  <div class="pilwrap ">
132
- <a class="pilcrow" href="#section-7">&#182;</a>
152
+ <a class="pilcrow" href="#section-8">&#182;</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-8">
163
+ <li id="section-9">
144
164
  <div class="annotation">
145
165
 
146
166
  <div class="pilwrap ">
147
- <a class="pilcrow" href="#section-8">&#182;</a>
167
+ <a class="pilcrow" href="#section-9">&#182;</a>
148
168
  </div>
149
169
  <p>Create Hash with the options for job. :status=&gt; -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-9">
178
+ <li id="section-10">
159
179
  <div class="annotation">
160
180
 
161
181
  <div class="pilwrap ">
162
- <a class="pilcrow" href="#section-9">&#182;</a>
182
+ <a class="pilcrow" href="#section-10">&#182;</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-10">
193
+ <li id="section-11">
174
194
  <div class="annotation">
175
195
 
176
196
  <div class="pilwrap ">
177
- <a class="pilcrow" href="#section-10">&#182;</a>
197
+ <a class="pilcrow" href="#section-11">&#182;</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-11">
211
+ <li id="section-12">
192
212
  <div class="annotation">
193
213
 
194
214
  <div class="pilwrap ">
195
- <a class="pilcrow" href="#section-11">&#182;</a>
215
+ <a class="pilcrow" href="#section-12">&#182;</a>
196
216
  </div>
197
217
  <p>Update the Job with new status. :status =&gt; &#39;0&#39; 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-12">
235
+ <li id="section-13">
216
236
  <div class="annotation">
217
237
 
218
238
  <div class="pilwrap ">
219
- <a class="pilcrow" href="#section-12">&#182;</a>
239
+ <a class="pilcrow" href="#section-13">&#182;</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-13">
252
+ <li id="section-14">
233
253
  <div class="annotation">
234
254
 
235
255
  <div class="pilwrap ">
236
- <a class="pilcrow" href="#section-13">&#182;</a>
256
+ <a class="pilcrow" href="#section-14">&#182;</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-14">
267
+ <li id="section-15">
248
268
  <div class="annotation">
249
269
 
250
270
  <div class="pilwrap ">
251
- <a class="pilcrow" href="#section-14">&#182;</a>
271
+ <a class="pilcrow" href="#section-15">&#182;</a>
252
272
  </div>
253
- <p>Get url from request</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="keyword">case</span> settings.base_path
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">&#182;</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> =&gt; 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">&#182;</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
- url = <span class="string">"http://stage-apps-groupdocs.dynabic.com/document-viewer/embed/<span class="subst">#{document[<span class="number">0</span>].guid}</span>"</span>
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
- url = <span class="string">"http://dev-apps-groupdocs.dynabic.com/document-viewer/embed/<span class="subst">#{document[<span class="number">0</span>].guid}</span>"</span>
311
+ iframe = <span class="string">"https://dev-apps.groupdocs.com<span class="subst">#{url}</span>"</span>
263
312
  <span class="keyword">else</span>
264
- url = <span class="string">"https://apps.groupdocs.com/document-viewer/embed/<span class="subst">#{document[<span class="number">0</span>].guid}</span>"</span>
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-15">
319
+ <li id="section-18">
271
320
  <div class="annotation">
272
321
 
273
322
  <div class="pilwrap ">
274
- <a class="pilcrow" href="#section-15">&#182;</a>
323
+ <a class="pilcrow" href="#section-18">&#182;</a>
275
324
  </div>
276
- <p>Add the signature in url</p>
325
+ <p>Make iframe</p>
277
326
 
278
327
  </div>
279
328
 
280
- <div class="content"><div class='highlight'><pre> iframe = <span class="constant">GroupDocs::Api::Request</span>.new(<span class="symbol">:path</span> =&gt; url).prepare_and_sign_url
281
- iframe = <span class="string">"&lt;iframe width='100%' height='600' frameborder='0' src='<span class="subst">#{iframe}</span>'&gt;&lt;/iframe&gt;"</span>
329
+ <div class="content"><div class='highlight'><pre> iframe = <span class="string">"&lt;iframe id='downloadframe' src='<span class="subst">#{iframe}</span>' width='800' height='1000'&gt;&lt;/iframe&gt;"</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-16">
341
+ <li id="section-19">
293
342
  <div class="annotation">
294
343
 
295
344
  <div class="pilwrap ">
296
- <a class="pilcrow" href="#section-16">&#182;</a>
345
+ <a class="pilcrow" href="#section-19">&#182;</a>
297
346
  </div>
298
347
  <p>Set variables for template</p>
299
348