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.
Files changed (171) hide show
  1. data/CHANGELOG.md +34 -0
  2. data/LICENSE.txt +21 -0
  3. data/README.md +3 -0
  4. data/examples/api-samples/public/docs/sample01.html +23 -23
  5. data/examples/api-samples/public/docs/sample02.html +27 -27
  6. data/examples/api-samples/public/docs/sample03.html +81 -69
  7. data/examples/api-samples/public/docs/sample04.html +29 -29
  8. data/examples/api-samples/public/docs/sample05.html +48 -48
  9. data/examples/api-samples/public/docs/sample06.html +47 -46
  10. data/examples/api-samples/public/docs/sample07.html +35 -35
  11. data/examples/api-samples/public/docs/sample08.html +45 -45
  12. data/examples/api-samples/public/docs/sample09.html +57 -57
  13. data/examples/api-samples/public/docs/sample10.html +41 -41
  14. data/examples/api-samples/public/docs/sample11.html +96 -118
  15. data/examples/api-samples/public/docs/sample12.html +29 -50
  16. data/examples/api-samples/public/docs/sample13.html +36 -44
  17. data/examples/api-samples/public/docs/sample14.html +29 -29
  18. data/examples/api-samples/public/docs/sample15.html +24 -24
  19. data/examples/api-samples/public/docs/sample16.html +32 -32
  20. data/examples/api-samples/public/docs/sample17.html +38 -38
  21. data/examples/api-samples/public/docs/sample18.html +105 -101
  22. data/examples/api-samples/public/docs/sample19.html +101 -101
  23. data/examples/api-samples/public/docs/sample20.html +42 -42
  24. data/examples/api-samples/public/docs/sample21.html +109 -109
  25. data/examples/api-samples/public/docs/sample22.html +56 -56
  26. data/examples/api-samples/public/docs/sample23.html +39 -39
  27. data/examples/api-samples/public/docs/sample24.html +36 -36
  28. data/examples/api-samples/public/docs/sample25.html +67 -67
  29. data/examples/api-samples/public/docs/sample26.html +23 -23
  30. data/examples/api-samples/public/docs/sample27.html +72 -72
  31. data/examples/api-samples/public/docs/sample28.html +46 -45
  32. data/examples/api-samples/public/docs/sample29.html +30 -30
  33. data/examples/api-samples/public/docs/sample30.html +30 -30
  34. data/examples/api-samples/public/docs/sample31.html +114 -114
  35. data/examples/api-samples/public/docs/sample32.html +96 -96
  36. data/examples/api-samples/public/docs/sample33.html +56 -56
  37. data/examples/api-samples/public/docs/sample34.html +27 -27
  38. data/examples/api-samples/public/docs/sample35.html +134 -135
  39. data/examples/api-samples/public/docs/sample36.html +32 -32
  40. data/examples/api-samples/public/docs/sample37.html +103 -103
  41. data/examples/api-samples/public/docs/sample38.html +76 -76
  42. data/examples/api-samples/public/docs/sample39.html +136 -136
  43. data/examples/api-samples/public/docs/sample40.html +104 -104
  44. data/examples/api-samples/public/docs/sample41.html +137 -137
  45. data/examples/api-samples/public/docs/sample42.html +61 -61
  46. data/examples/api-samples/public/docs/sample43.html +72 -72
  47. data/examples/api-samples/public/docs/sample44.html +751 -0
  48. data/examples/api-samples/public/docs/sample45.html +236 -0
  49. data/examples/api-samples/public/templates/merge_field3_doc.docx +0 -0
  50. data/examples/api-samples/samples/sample01.rb +2 -2
  51. data/examples/api-samples/samples/sample02.rb +2 -2
  52. data/examples/api-samples/samples/sample03.rb +2 -2
  53. data/examples/api-samples/samples/sample04.rb +2 -2
  54. data/examples/api-samples/samples/sample05.rb +2 -2
  55. data/examples/api-samples/samples/sample06.rb +2 -2
  56. data/examples/api-samples/samples/sample07.rb +2 -2
  57. data/examples/api-samples/samples/sample08.rb +2 -2
  58. data/examples/api-samples/samples/sample09.rb +2 -2
  59. data/examples/api-samples/samples/sample10.rb +2 -2
  60. data/examples/api-samples/samples/sample11.rb +2 -2
  61. data/examples/api-samples/samples/sample12.rb +2 -2
  62. data/examples/api-samples/samples/sample13.rb +2 -2
  63. data/examples/api-samples/samples/sample14.rb +2 -2
  64. data/examples/api-samples/samples/sample15.rb +2 -2
  65. data/examples/api-samples/samples/sample16.rb +2 -2
  66. data/examples/api-samples/samples/sample17.rb +2 -2
  67. data/examples/api-samples/samples/sample18.rb +2 -2
  68. data/examples/api-samples/samples/sample19.rb +2 -2
  69. data/examples/api-samples/samples/sample20.rb +2 -2
  70. data/examples/api-samples/samples/sample21.rb +2 -2
  71. data/examples/api-samples/samples/sample22.rb +2 -2
  72. data/examples/api-samples/samples/sample23.rb +2 -2
  73. data/examples/api-samples/samples/sample24.rb +2 -2
  74. data/examples/api-samples/samples/sample25.rb +2 -2
  75. data/examples/api-samples/samples/sample26.rb +2 -2
  76. data/examples/api-samples/samples/sample27.rb +2 -2
  77. data/examples/api-samples/samples/sample28.rb +2 -2
  78. data/examples/api-samples/samples/sample29.rb +2 -2
  79. data/examples/api-samples/samples/sample30.rb +2 -2
  80. data/examples/api-samples/samples/sample31.rb +2 -2
  81. data/examples/api-samples/samples/sample32.rb +2 -2
  82. data/examples/api-samples/samples/sample33.rb +2 -2
  83. data/examples/api-samples/samples/sample34.rb +2 -2
  84. data/examples/api-samples/samples/sample35.rb +4 -4
  85. data/examples/api-samples/samples/sample36.rb +2 -2
  86. data/examples/api-samples/samples/sample37.rb +2 -2
  87. data/examples/api-samples/samples/sample38.rb +2 -2
  88. data/examples/api-samples/samples/sample39.rb +2 -2
  89. data/examples/api-samples/samples/sample40.rb +2 -2
  90. data/examples/api-samples/samples/sample41.rb +2 -2
  91. data/examples/api-samples/samples/sample42.rb +2 -2
  92. data/examples/api-samples/samples/sample43.rb +2 -2
  93. data/examples/api-samples/samples/sample44.rb +188 -0
  94. data/examples/api-samples/samples/sample45.rb +74 -0
  95. data/examples/api-samples/views/_others_samples.haml +47 -43
  96. data/examples/api-samples/views/index.haml +55 -44
  97. data/examples/api-samples/views/layout.haml +1 -6
  98. data/examples/api-samples/views/sample01.haml +62 -57
  99. data/examples/api-samples/views/sample02.haml +52 -46
  100. data/examples/api-samples/views/sample03.haml +78 -73
  101. data/examples/api-samples/views/sample04.haml +51 -45
  102. data/examples/api-samples/views/sample05.haml +77 -71
  103. data/examples/api-samples/views/sample06.haml +58 -52
  104. data/examples/api-samples/views/sample07.haml +51 -45
  105. data/examples/api-samples/views/sample08.haml +90 -84
  106. data/examples/api-samples/views/sample09.haml +86 -80
  107. data/examples/api-samples/views/sample10.haml +83 -77
  108. data/examples/api-samples/views/sample11.haml +124 -120
  109. data/examples/api-samples/views/sample12.haml +65 -59
  110. data/examples/api-samples/views/sample13.haml +62 -56
  111. data/examples/api-samples/views/sample14.haml +57 -51
  112. data/examples/api-samples/views/sample15.haml +49 -43
  113. data/examples/api-samples/views/sample16.haml +49 -43
  114. data/examples/api-samples/views/sample17.haml +53 -47
  115. data/examples/api-samples/views/sample18.haml +140 -134
  116. data/examples/api-samples/views/sample19.haml +87 -81
  117. data/examples/api-samples/views/sample20.haml +53 -47
  118. data/examples/api-samples/views/sample21.haml +115 -111
  119. data/examples/api-samples/views/sample22.haml +94 -88
  120. data/examples/api-samples/views/sample23.haml +83 -78
  121. data/examples/api-samples/views/sample24.haml +54 -48
  122. data/examples/api-samples/views/sample25.haml +89 -83
  123. data/examples/api-samples/views/sample26.haml +62 -57
  124. data/examples/api-samples/views/sample27.haml +114 -109
  125. data/examples/api-samples/views/sample28.haml +55 -49
  126. data/examples/api-samples/views/sample29.haml +67 -69
  127. data/examples/api-samples/views/sample30.haml +54 -48
  128. data/examples/api-samples/views/sample31.haml +106 -100
  129. data/examples/api-samples/views/sample32.haml +90 -84
  130. data/examples/api-samples/views/sample33.haml +60 -54
  131. data/examples/api-samples/views/sample34.haml +51 -46
  132. data/examples/api-samples/views/sample35.haml +84 -78
  133. data/examples/api-samples/views/sample36.haml +63 -58
  134. data/examples/api-samples/views/sample37.haml +122 -116
  135. data/examples/api-samples/views/sample38.haml +104 -98
  136. data/examples/api-samples/views/sample39.haml +6 -2
  137. data/examples/api-samples/views/sample40.haml +94 -89
  138. data/examples/api-samples/views/sample41.haml +127 -123
  139. data/examples/api-samples/views/sample42.haml +60 -54
  140. data/examples/api-samples/views/sample43.haml +81 -77
  141. data/examples/api-samples/views/sample44.haml +85 -0
  142. data/examples/api-samples/views/sample45.haml +85 -0
  143. data/groupdocs.gemspec +2 -0
  144. data/lib/groupdocs/datasource/field.rb +9 -0
  145. data/lib/groupdocs/document.rb +66 -4
  146. data/lib/groupdocs/document/annotation.rb +11 -6
  147. data/lib/groupdocs/document/editor.rb +53 -0
  148. data/lib/groupdocs/document/field.rb +16 -0
  149. data/lib/groupdocs/document/style.rb +30 -0
  150. data/lib/groupdocs/job.rb +24 -0
  151. data/lib/groupdocs/questionnaire.rb +2 -0
  152. data/lib/groupdocs/questionnaire/collector.rb +52 -0
  153. data/lib/groupdocs/questionnaire/collector_style.rb +54 -0
  154. data/lib/groupdocs/questionnaire/question.rb +9 -0
  155. data/lib/groupdocs/questionnaire/style/base_font.rb +17 -0
  156. data/lib/groupdocs/questionnaire/style/question_title.rb +17 -0
  157. data/lib/groupdocs/questionnaire/style/title.rb +17 -0
  158. data/lib/groupdocs/signature/envelope.rb +43 -8
  159. data/lib/groupdocs/signature/form.rb +113 -12
  160. data/lib/groupdocs/signature/recipient.rb +38 -3
  161. data/lib/groupdocs/signature/shared/field_methods.rb +4 -2
  162. data/lib/groupdocs/signature/template.rb +20 -1
  163. data/lib/groupdocs/storage/file.rb +3 -2
  164. data/lib/groupdocs/user.rb +148 -0
  165. data/lib/groupdocs/version.rb +1 -1
  166. data/spec/groupdocs/api/helpers/access_rights_helper_spec.rb +5 -5
  167. data/spec/groupdocs/document/annotation_spec.rb +1 -1
  168. data/spec/groupdocs/signature/envelope_spec.rb +1 -1
  169. data/spec/groupdocs/user_spec.rb +4 -4
  170. data/spec/support/shared_examples/signature/shared/field_methods.rb +5 -4
  171. 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">'/sample15'</span> <span class="keyword">do</span>
35
- haml <span class="symbol">:sample15</span>
36
- <span class="keyword">end</span></pre></div></div>
34
+ <div class="content"><div class='highlight'><pre>get <span class="hljs-string">'/sample-15-how-to-check-the-number-of-document\'s-views'</span> <span class="hljs-keyword">do</span>
35
+ haml <span class="hljs-symbol">:sample15</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">'/sample15'</span> <span class="keyword">do</span></pre></div></div>
51
+ <div class="content"><div class='highlight'><pre>post <span class="hljs-string">'/sample-15-how-to-check-the-number-of-document\'s-views'</span> <span class="hljs-keyword">do</span></pre></div></div>
52
52
 
53
53
  </li>
54
54
 
@@ -63,11 +63,11 @@
63
63
 
64
64
  </div>
65
65
 
66
- <div class="content"><div class='highlight'><pre> set <span class="symbol">:client_id</span>, params[<span class="symbol">:clientId</span>]
67
- set <span class="symbol">:private_key</span>, params[<span class="symbol">:privateKey</span>]
68
- set <span class="symbol">:base_path</span>, params[<span class="symbol">:basePath</span>]
66
+ <div class="content"><div class='highlight'><pre> set <span class="hljs-symbol">:client_id</span>, params[<span class="hljs-symbol">:clientId</span>]
67
+ set <span class="hljs-symbol">:private_key</span>, params[<span class="hljs-symbol">:privateKey</span>]
68
+ set <span class="hljs-symbol">:base_path</span>, params[<span class="hljs-symbol">:basePath</span>]
69
69
 
70
- <span class="keyword">begin</span></pre></div></div>
70
+ <span class="hljs-keyword">begin</span></pre></div></div>
71
71
 
72
72
  </li>
73
73
 
@@ -82,7 +82,7 @@
82
82
 
83
83
  </div>
84
84
 
85
- <div class="content"><div class='highlight'><pre> raise <span class="string">'Please enter all required parameters'</span> <span class="keyword">if</span> settings.client_id.empty? <span class="keyword">or</span> settings.private_key.empty?</pre></div></div>
85
+ <div class="content"><div class='highlight'><pre> raise <span class="hljs-string">'Please enter all required parameters'</span> <span class="hljs-keyword">if</span> settings.client_id.empty? <span class="hljs-keyword">or</span> settings.private_key.empty?</pre></div></div>
86
86
 
87
87
  </li>
88
88
 
@@ -97,13 +97,13 @@
97
97
 
98
98
  </div>
99
99
 
100
- <div class="content"><div class='highlight'><pre> <span class="keyword">if</span> settings.base_path.empty?
101
- base_path = <span class="string">'https://api.groupdocs.com'</span>
102
- <span class="keyword">elsif</span> settings.base_path.match(<span class="string">'/v2.0'</span>)
103
- base_path = settings.base_path.split(<span class="string">'/v2.0'</span>)[<span class="number">0</span>]
104
- <span class="keyword">else</span>
100
+ <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> settings.base_path.empty?
101
+ base_path = <span class="hljs-string">'https://api.groupdocs.com'</span>
102
+ <span class="hljs-keyword">elsif</span> settings.base_path.match(<span class="hljs-string">'/v2.0'</span>)
103
+ base_path = settings.base_path.split(<span class="hljs-string">'/v2.0'</span>)[<span class="hljs-number">0</span>]
104
+ <span class="hljs-keyword">else</span>
105
105
  base_path = settings.base_path
106
- <span class="keyword">end</span></pre></div></div>
106
+ <span class="hljs-keyword">end</span></pre></div></div>
107
107
 
108
108
  </li>
109
109
 
@@ -118,7 +118,7 @@
118
118
 
119
119
  </div>
120
120
 
121
- <div class="content"><div class='highlight'><pre> <span class="constant">GroupDocs</span>.configure <span class="keyword">do</span> |groupdocs|
121
+ <div class="content"><div class='highlight'><pre> <span class="hljs-constant">GroupDocs</span>.configure <span class="hljs-keyword">do</span> |groupdocs|
122
122
  groupdocs.client_id = settings.client_id
123
123
  groupdocs.private_key = settings.private_key</pre></div></div>
124
124
 
@@ -135,8 +135,8 @@
135
135
 
136
136
  </div>
137
137
 
138
- <div class="content"><div class='highlight'><pre> groupdocs.api_server = base_path <span class="comment"># default is 'https://api.groupdocs.com'</span>
139
- <span class="keyword">end</span></pre></div></div>
138
+ <div class="content"><div class='highlight'><pre> groupdocs.api_server = base_path <span class="hljs-comment"># default is 'https://api.groupdocs.com'</span>
139
+ <span class="hljs-keyword">end</span></pre></div></div>
140
140
 
141
141
  </li>
142
142
 
@@ -147,16 +147,16 @@
147
147
  <div class="pilwrap ">
148
148
  <a class="pilcrow" href="#section-8">&#182;</a>
149
149
  </div>
150
- <p>Check the number of document&#39;s views. Make a request to API using client_id and private_key</p>
150
+ <p>Check the number of documents views. Make a request to API using client_id and private_key</p>
151
151
 
152
152
  </div>
153
153
 
154
- <div class="content"><div class='highlight'><pre> views = <span class="constant">GroupDocs::Document</span>.views!({})
154
+ <div class="content"><div class='highlight'><pre> views = <span class="hljs-constant">GroupDocs::Document</span>.views!({})
155
155
  total = views.count()
156
156
 
157
- <span class="keyword">rescue</span> <span class="constant">Exception</span> =&gt; e
157
+ <span class="hljs-keyword">rescue</span> <span class="hljs-constant">Exception</span> =&gt; e
158
158
  err = e.message
159
- <span class="keyword">end</span></pre></div></div>
159
+ <span class="hljs-keyword">end</span></pre></div></div>
160
160
 
161
161
  </li>
162
162
 
@@ -171,8 +171,8 @@
171
171
 
172
172
  </div>
173
173
 
174
- <div class="content"><div class='highlight'><pre> haml <span class="symbol">:sample15</span>, <span class="symbol">:locals</span> =&gt; {<span class="symbol">:userId</span> =&gt; settings.client_id, <span class="symbol">:privateKey</span> =&gt; settings.private_key, <span class="symbol">:total</span> =&gt; total, <span class="symbol">:err</span> =&gt; err}
175
- <span class="keyword">end</span></pre></div></div>
174
+ <div class="content"><div class='highlight'><pre> haml <span class="hljs-symbol">:sample15</span>, <span class="hljs-symbol">:locals</span> =&gt; {<span class="hljs-symbol">:userId</span> =&gt; settings.client_id, <span class="hljs-symbol">:privateKey</span> =&gt; settings.private_key, <span class="hljs-symbol">:total</span> =&gt; total, <span class="hljs-symbol">:err</span> =&gt; err}
175
+ <span class="hljs-keyword">end</span></pre></div></div>
176
176
 
177
177
  </li>
178
178
 
@@ -31,9 +31,9 @@
31
31
 
32
32
  </div>
33
33
 
34
- <div class="content"><div class='highlight'><pre>get <span class="string">'/sample16'</span> <span class="keyword">do</span>
35
- haml <span class="symbol">:sample16</span>
36
- <span class="keyword">end</span></pre></div></div>
34
+ <div class="content"><div class='highlight'><pre>get <span class="hljs-string">'/sample-16-how-to-insert-assembly-questionnaire-into-webpage'</span> <span class="hljs-keyword">do</span>
35
+ haml <span class="hljs-symbol">:sample16</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">'/sample16'</span> <span class="keyword">do</span></pre></div></div>
51
+ <div class="content"><div class='highlight'><pre>post <span class="hljs-string">'/sample-16-how-to-insert-assembly-questionnaire-into-webpage'</span> <span class="hljs-keyword">do</span></pre></div></div>
52
52
 
53
53
  </li>
54
54
 
@@ -63,10 +63,10 @@
63
63
 
64
64
  </div>
65
65
 
66
- <div class="content"><div class='highlight'><pre> set <span class="symbol">:fileId</span>, params[<span class="symbol">:fileId</span>]
67
- 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">:fileId</span>, params[<span class="hljs-symbol">:fileId</span>]
67
+ set <span class="hljs-symbol">:base_path</span>, params[<span class="hljs-symbol">:basePath</span>]
68
68
 
69
- <span class="keyword">begin</span></pre></div></div>
69
+ <span class="hljs-keyword">begin</span></pre></div></div>
70
70
 
71
71
  </li>
72
72
 
@@ -81,7 +81,7 @@
81
81
 
82
82
  </div>
83
83
 
84
- <div class="content"><div class='highlight'><pre> raise <span class="string">'Please enter all required parameters'</span> <span class="keyword">if</span> settings.fileId.empty?</pre></div></div>
84
+ <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.fileId.empty?</pre></div></div>
85
85
 
86
86
  </li>
87
87
 
@@ -96,13 +96,13 @@
96
96
 
97
97
  </div>
98
98
 
99
- <div class="content"><div class='highlight'><pre> <span class="keyword">if</span> settings.base_path.empty?
100
- base_path = <span class="string">'https://api.groupdocs.com'</span>
101
- <span class="keyword">elsif</span> settings.base_path.match(<span class="string">'/v2.0'</span>)
102
- base_path = settings.base_path.split(<span class="string">'/v2.0'</span>)[<span class="number">0</span>]
103
- <span class="keyword">else</span>
99
+ <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> settings.base_path.empty?
100
+ base_path = <span class="hljs-string">'https://api.groupdocs.com'</span>
101
+ <span class="hljs-keyword">elsif</span> settings.base_path.match(<span class="hljs-string">'/v2.0'</span>)
102
+ base_path = settings.base_path.split(<span class="hljs-string">'/v2.0'</span>)[<span class="hljs-number">0</span>]
103
+ <span class="hljs-keyword">else</span>
104
104
  base_path = settings.base_path
105
- <span class="keyword">end</span></pre></div></div>
105
+ <span class="hljs-keyword">end</span></pre></div></div>
106
106
 
107
107
  </li>
108
108
 
@@ -117,7 +117,7 @@
117
117
 
118
118
  </div>
119
119
 
120
- <div class="content"><div class='highlight'><pre> <span class="constant">GroupDocs</span>.configure <span class="keyword">do</span> |groupdocs|
120
+ <div class="content"><div class='highlight'><pre> <span class="hljs-constant">GroupDocs</span>.configure <span class="hljs-keyword">do</span> |groupdocs|
121
121
  groupdocs.client_id = settings.client_id
122
122
  groupdocs.private_key = settings.private_key</pre></div></div>
123
123
 
@@ -134,8 +134,8 @@
134
134
 
135
135
  </div>
136
136
 
137
- <div class="content"><div class='highlight'><pre> groupdocs.api_server = base_path <span class="comment"># default is 'https://api.groupdocs.com'</span>
138
- <span class="keyword">end</span></pre></div></div>
137
+ <div class="content"><div class='highlight'><pre> groupdocs.api_server = base_path <span class="hljs-comment"># default is 'https://api.groupdocs.com'</span>
138
+ <span class="hljs-keyword">end</span></pre></div></div>
139
139
 
140
140
  </li>
141
141
 
@@ -150,7 +150,7 @@
150
150
 
151
151
  </div>
152
152
 
153
- <div class="content"><div class='highlight'><pre> iframe = <span class="string">"/assembly2/questionnaire-assembly/<span class="subst">#{settings.fileId}</span>"</span></pre></div></div>
153
+ <div class="content"><div class='highlight'><pre> iframe = <span class="hljs-string">"/assembly2/questionnaire-assembly/<span class="hljs-subst">#{settings.fileId}</span>"</span></pre></div></div>
154
154
 
155
155
  </li>
156
156
 
@@ -165,7 +165,7 @@
165
165
 
166
166
  </div>
167
167
 
168
- <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>
168
+ <div class="content"><div class='highlight'><pre> url = <span class="hljs-constant">GroupDocs::Api::Request</span>.new(<span class="hljs-symbol">:path</span> =&gt; iframe).prepare_and_sign_url</pre></div></div>
169
169
 
170
170
  </li>
171
171
 
@@ -180,14 +180,14 @@
180
180
 
181
181
  </div>
182
182
 
183
- <div class="content"><div class='highlight'><pre> <span class="keyword">case</span> settings.base_path
184
- <span class="keyword">when</span> <span class="string">'https://stage-api-groupdocs.dynabic.com'</span>
185
- iframe = <span class="string">"https://stage-api-groupdocs.dynabic.com<span class="subst">#{url}</span>"</span>
186
- <span class="keyword">when</span> <span class="string">'https://dev-api-groupdocs.dynabic.com'</span>
187
- iframe = <span class="string">"https://dev-apps.groupdocs.com<span class="subst">#{url}</span>"</span>
188
- <span class="keyword">else</span>
189
- iframe = <span class="string">"https://apps.groupdocs.com<span class="subst">#{url}</span>"</span>
190
- <span class="keyword">end</span></pre></div></div>
183
+ <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">case</span> settings.base_path
184
+ <span class="hljs-keyword">when</span> <span class="hljs-string">'https://stage-api-groupdocs.dynabic.com'</span>
185
+ iframe = <span class="hljs-string">"https://stage-api-groupdocs.dynabic.com<span class="hljs-subst">#{url}</span>"</span>
186
+ <span class="hljs-keyword">when</span> <span class="hljs-string">'https://dev-api-groupdocs.dynabic.com'</span>
187
+ iframe = <span class="hljs-string">"https://dev-apps.groupdocs.com<span class="hljs-subst">#{url}</span>"</span>
188
+ <span class="hljs-keyword">else</span>
189
+ iframe = <span class="hljs-string">"https://apps.groupdocs.com<span class="hljs-subst">#{url}</span>"</span>
190
+ <span class="hljs-keyword">end</span></pre></div></div>
191
191
 
192
192
  </li>
193
193
 
@@ -202,11 +202,11 @@
202
202
 
203
203
  </div>
204
204
 
205
- <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>
205
+ <div class="content"><div class='highlight'><pre> iframe = <span class="hljs-string">"&lt;iframe id='downloadframe' src='<span class="hljs-subst">#{iframe}</span>' width='800' height='1000'&gt;&lt;/iframe&gt;"</span>
206
206
 
207
- <span class="keyword">rescue</span> <span class="constant">Exception</span> =&gt; e
207
+ <span class="hljs-keyword">rescue</span> <span class="hljs-constant">Exception</span> =&gt; e
208
208
  err = e.message
209
- <span class="keyword">end</span></pre></div></div>
209
+ <span class="hljs-keyword">end</span></pre></div></div>
210
210
 
211
211
  </li>
212
212
 
@@ -221,8 +221,8 @@
221
221
 
222
222
  </div>
223
223
 
224
- <div class="content"><div class='highlight'><pre> haml <span class="symbol">:sample16</span>, <span class="symbol">:locals</span> =&gt; {<span class="symbol">:fileId</span> =&gt; settings.fileId, <span class="symbol">:iframe</span> =&gt; iframe, <span class="symbol">:err</span> =&gt; err}
225
- <span class="keyword">end</span></pre></div></div>
224
+ <div class="content"><div class='highlight'><pre> haml <span class="hljs-symbol">:sample16</span>, <span class="hljs-symbol">:locals</span> =&gt; {<span class="hljs-symbol">:fileId</span> =&gt; settings.fileId, <span class="hljs-symbol">:iframe</span> =&gt; iframe, <span class="hljs-symbol">:err</span> =&gt; err}
225
+ <span class="hljs-keyword">end</span></pre></div></div>
226
226
 
227
227
  </li>
228
228
 
@@ -31,9 +31,9 @@
31
31
 
32
32
  </div>
33
33
 
34
- <div class="content"><div class='highlight'><pre>get <span class="string">'/sample17'</span> <span class="keyword">do</span>
35
- haml <span class="symbol">:sample17</span>
36
- <span class="keyword">end</span></pre></div></div>
34
+ <div class="content"><div class='highlight'><pre>get <span class="hljs-string">'/sample-17-how-to-upload-a-file-into-the-storage-and-compress-it-into-zip-archive'</span> <span class="hljs-keyword">do</span>
35
+ haml <span class="hljs-symbol">:sample17</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">'/sample17'</span> <span class="keyword">do</span></pre></div></div>
51
+ <div class="content"><div class='highlight'><pre>post <span class="hljs-string">'/sample-17-how-to-upload-a-file-into-the-storage-and-compress-it-into-zip-archive'</span> <span class="hljs-keyword">do</span></pre></div></div>
52
52
 
53
53
  </li>
54
54
 
@@ -63,12 +63,12 @@
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">:file</span>, params[<span class="symbol">:file</span>]
69
- 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">:file</span>, params[<span class="hljs-symbol">:file</span>]
69
+ set <span class="hljs-symbol">:base_path</span>, params[<span class="hljs-symbol">:basePath</span>]
70
70
 
71
- <span class="keyword">begin</span></pre></div></div>
71
+ <span class="hljs-keyword">begin</span></pre></div></div>
72
72
 
73
73
  </li>
74
74
 
@@ -83,7 +83,7 @@
83
83
 
84
84
  </div>
85
85
 
86
- <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.file.<span class="keyword">nil</span>?</pre></div></div>
86
+ <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.file.<span class="hljs-keyword">nil</span>?</pre></div></div>
87
87
 
88
88
  </li>
89
89
 
@@ -98,13 +98,13 @@
98
98
 
99
99
  </div>
100
100
 
101
- <div class="content"><div class='highlight'><pre> <span class="keyword">if</span> settings.base_path.empty?
102
- base_path = <span class="string">'https://api.groupdocs.com'</span>
103
- <span class="keyword">elsif</span> settings.base_path.match(<span class="string">'/v2.0'</span>)
104
- base_path = settings.base_path.split(<span class="string">'/v2.0'</span>)[<span class="number">0</span>]
105
- <span class="keyword">else</span>
101
+ <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> settings.base_path.empty?
102
+ base_path = <span class="hljs-string">'https://api.groupdocs.com'</span>
103
+ <span class="hljs-keyword">elsif</span> settings.base_path.match(<span class="hljs-string">'/v2.0'</span>)
104
+ base_path = settings.base_path.split(<span class="hljs-string">'/v2.0'</span>)[<span class="hljs-number">0</span>]
105
+ <span class="hljs-keyword">else</span>
106
106
  base_path = settings.base_path
107
- <span class="keyword">end</span></pre></div></div>
107
+ <span class="hljs-keyword">end</span></pre></div></div>
108
108
 
109
109
  </li>
110
110
 
@@ -119,7 +119,7 @@
119
119
 
120
120
  </div>
121
121
 
122
- <div class="content"><div class='highlight'><pre> <span class="constant">GroupDocs</span>.configure <span class="keyword">do</span> |groupdocs|
122
+ <div class="content"><div class='highlight'><pre> <span class="hljs-constant">GroupDocs</span>.configure <span class="hljs-keyword">do</span> |groupdocs|
123
123
  groupdocs.client_id = settings.client_id
124
124
  groupdocs.private_key = settings.private_key</pre></div></div>
125
125
 
@@ -136,8 +136,8 @@
136
136
 
137
137
  </div>
138
138
 
139
- <div class="content"><div class='highlight'><pre> groupdocs.api_server = base_path <span class="comment"># default is 'https://api.groupdocs.com'</span>
140
- <span class="keyword">end</span></pre></div></div>
139
+ <div class="content"><div class='highlight'><pre> groupdocs.api_server = base_path <span class="hljs-comment"># default is 'https://api.groupdocs.com'</span>
140
+ <span class="hljs-keyword">end</span></pre></div></div>
141
141
 
142
142
  </li>
143
143
 
@@ -152,7 +152,7 @@
152
152
 
153
153
  </div>
154
154
 
155
- <div class="content"><div class='highlight'><pre> filepath = <span class="string">"<span class="subst">#{<span class="constant">Dir</span>.tmpdir}</span>/<span class="subst">#{params[<span class="symbol">:file</span>][<span class="symbol">:filename</span>]}</span>"</span></pre></div></div>
155
+ <div class="content"><div class='highlight'><pre> filepath = <span class="hljs-string">"<span class="hljs-subst">#{<span class="hljs-constant">Dir</span>.tmpdir}</span>/<span class="hljs-subst">#{params[<span class="hljs-symbol">:file</span>][<span class="hljs-symbol">:filename</span>]}</span>"</span></pre></div></div>
156
156
 
157
157
  </li>
158
158
 
@@ -167,7 +167,7 @@
167
167
 
168
168
  </div>
169
169
 
170
- <div class="content"><div class='highlight'><pre> <span class="constant">File</span>.open(filepath, <span class="string">'wb'</span>) { |f| f.write(params[<span class="symbol">:file</span>][<span class="symbol">:tempfile</span>].read) }</pre></div></div>
170
+ <div class="content"><div class='highlight'><pre> <span class="hljs-constant">File</span>.open(filepath, <span class="hljs-string">'wb'</span>) { |f| f.write(params[<span class="hljs-symbol">:file</span>][<span class="hljs-symbol">:tempfile</span>].read) }</pre></div></div>
171
171
 
172
172
  </li>
173
173
 
@@ -182,7 +182,7 @@
182
182
 
183
183
  </div>
184
184
 
185
- <div class="content"><div class='highlight'><pre> file = <span class="constant">GroupDocs::Storage::File</span>.upload!(filepath, {})</pre></div></div>
185
+ <div class="content"><div class='highlight'><pre> file = <span class="hljs-constant">GroupDocs::Storage::File</span>.upload!(filepath, {})</pre></div></div>
186
186
 
187
187
  </li>
188
188
 
@@ -212,7 +212,7 @@
212
212
 
213
213
  </div>
214
214
 
215
- <div class="content"><div class='highlight'><pre> massage = <span class="string">"&lt;p&gt;Archive created and saved successfully. Here you can see your &lt;strong&gt;<span class="subst">#{params[<span class="symbol">:file</span>][<span class="symbol">:filename</span>]}</span>&lt;/strong&gt; file in the GroupDocs Embedded Viewer.&lt;/p&gt;"</span></pre></div></div>
215
+ <div class="content"><div class='highlight'><pre> massage = <span class="hljs-string">"&lt;p&gt;Archive created and saved successfully. Here you can see your &lt;strong&gt;<span class="hljs-subst">#{params[<span class="hljs-symbol">:file</span>][<span class="hljs-symbol">:filename</span>]}</span>&lt;/strong&gt; file in the GroupDocs Embedded Viewer.&lt;/p&gt;"</span></pre></div></div>
216
216
 
217
217
  </li>
218
218
 
@@ -227,7 +227,7 @@
227
227
 
228
228
  </div>
229
229
 
230
- <div class="content"><div class='highlight'><pre> iframe = <span class="string">"/document-viewer/embed/<span class="subst">#{file.guid}</span>"</span></pre></div></div>
230
+ <div class="content"><div class='highlight'><pre> iframe = <span class="hljs-string">"/document-viewer/embed/<span class="hljs-subst">#{file.guid}</span>"</span></pre></div></div>
231
231
 
232
232
  </li>
233
233
 
@@ -242,7 +242,7 @@
242
242
 
243
243
  </div>
244
244
 
245
- <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>
245
+ <div class="content"><div class='highlight'><pre> url = <span class="hljs-constant">GroupDocs::Api::Request</span>.new(<span class="hljs-symbol">:path</span> =&gt; iframe).prepare_and_sign_url</pre></div></div>
246
246
 
247
247
  </li>
248
248
 
@@ -257,14 +257,14 @@
257
257
 
258
258
  </div>
259
259
 
260
- <div class="content"><div class='highlight'><pre> <span class="keyword">case</span> base_path
261
- <span class="keyword">when</span> <span class="string">'https://stage-api-groupdocs.dynabic.com'</span>
262
- iframe = <span class="string">"https://stage-api-groupdocs.dynabic.com<span class="subst">#{url}</span>"</span>
263
- <span class="keyword">when</span> <span class="string">'https://dev-api-groupdocs.dynabic.com'</span>
264
- iframe = <span class="string">"https://dev-apps.groupdocs.com<span class="subst">#{url}</span>"</span>
265
- <span class="keyword">else</span>
266
- iframe = <span class="string">"https://apps.groupdocs.com<span class="subst">#{url}</span>"</span>
267
- <span class="keyword">end</span></pre></div></div>
260
+ <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">case</span> base_path
261
+ <span class="hljs-keyword">when</span> <span class="hljs-string">'https://stage-api-groupdocs.dynabic.com'</span>
262
+ iframe = <span class="hljs-string">"https://stage-api-groupdocs.dynabic.com<span class="hljs-subst">#{url}</span>"</span>
263
+ <span class="hljs-keyword">when</span> <span class="hljs-string">'https://dev-api-groupdocs.dynabic.com'</span>
264
+ iframe = <span class="hljs-string">"https://dev-apps.groupdocs.com<span class="hljs-subst">#{url}</span>"</span>
265
+ <span class="hljs-keyword">else</span>
266
+ iframe = <span class="hljs-string">"https://apps.groupdocs.com<span class="hljs-subst">#{url}</span>"</span>
267
+ <span class="hljs-keyword">end</span></pre></div></div>
268
268
 
269
269
  </li>
270
270
 
@@ -279,11 +279,11 @@
279
279
 
280
280
  </div>
281
281
 
282
- <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>
282
+ <div class="content"><div class='highlight'><pre> iframe = <span class="hljs-string">"&lt;iframe id='downloadframe' src='<span class="hljs-subst">#{iframe}</span>' width='800' height='1000'&gt;&lt;/iframe&gt;"</span>
283
283
 
284
- <span class="keyword">rescue</span> <span class="constant">Exception</span> =&gt; e
284
+ <span class="hljs-keyword">rescue</span> <span class="hljs-constant">Exception</span> =&gt; e
285
285
  err = e.message
286
- <span class="keyword">end</span></pre></div></div>
286
+ <span class="hljs-keyword">end</span></pre></div></div>
287
287
 
288
288
  </li>
289
289
 
@@ -298,8 +298,8 @@
298
298
 
299
299
  </div>
300
300
 
301
- <div class="content"><div class='highlight'><pre> haml <span class="symbol">:sample17</span>, <span class="symbol">:locals</span> =&gt; {<span class="symbol">:userId</span> =&gt; settings.client_id, <span class="symbol">:privateKey</span> =&gt; settings.private_key, <span class="symbol">:iframe</span> =&gt; iframe, <span class="symbol">:massage</span> =&gt; massage, <span class="symbol">:err</span> =&gt; err}
302
- <span class="keyword">end</span></pre></div></div>
301
+ <div class="content"><div class='highlight'><pre> haml <span class="hljs-symbol">:sample17</span>, <span class="hljs-symbol">:locals</span> =&gt; {<span class="hljs-symbol">:userId</span> =&gt; settings.client_id, <span class="hljs-symbol">:privateKey</span> =&gt; settings.private_key, <span class="hljs-symbol">:iframe</span> =&gt; iframe, <span class="hljs-symbol">:massage</span> =&gt; massage, <span class="hljs-symbol">:err</span> =&gt; err}
302
+ <span class="hljs-keyword">end</span></pre></div></div>
303
303
 
304
304
  </li>
305
305
 
@@ -31,9 +31,9 @@
31
31
 
32
32
  </div>
33
33
 
34
- <div class="content"><div class='highlight'><pre>get <span class="string">'/sample18'</span> <span class="keyword">do</span>
35
- haml <span class="symbol">:sample18</span>
36
- <span class="keyword">end</span></pre></div></div>
34
+ <div class="content"><div class='highlight'><pre>get <span class="hljs-string">'/sample-18-how-to-convert-doc-to-docx-docx-to-doc-docx-to-pdf-ppt-to-pdf'</span> <span class="hljs-keyword">do</span>
35
+ haml <span class="hljs-symbol">:sample18</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">'/sample18/convert_callback'</span> <span class="keyword">do</span></pre></div></div>
51
+ <div class="content"><div class='highlight'><pre>post <span class="hljs-string">'/sample18/convert_callback'</span> <span class="hljs-keyword">do</span></pre></div></div>
52
52
 
53
53
  </li>
54
54
 
@@ -63,7 +63,7 @@
63
63
 
64
64
  </div>
65
65
 
66
- <div class="content"><div class='highlight'><pre> downloads_path = <span class="string">"<span class="subst">#{<span class="constant">File</span>.dirname(__FILE_<span class="number">_</span>)}</span>/../public/downloads"</span></pre></div></div>
66
+ <div class="content"><div class='highlight'><pre> downloads_path = <span class="hljs-string">"<span class="hljs-subst">#{<span class="hljs-constant">File</span>.dirname(__FILE_<span class="hljs-number">_</span>)}</span>/../public/downloads"</span></pre></div></div>
67
67
 
68
68
  </li>
69
69
 
@@ -78,12 +78,12 @@
78
78
 
79
79
  </div>
80
80
 
81
- <div class="content"><div class='highlight'><pre> data = <span class="constant">JSON</span>.parse(request.body.read)
82
- <span class="keyword">begin</span>
83
- raise <span class="string">'Empty params!'</span> <span class="keyword">if</span> data.empty?
84
- source_id = <span class="keyword">nil</span>
85
- client_id = <span class="keyword">nil</span>
86
- private_key = <span class="keyword">nil</span></pre></div></div>
81
+ <div class="content"><div class='highlight'><pre> data = <span class="hljs-constant">JSON</span>.parse(request.body.read)
82
+ <span class="hljs-keyword">begin</span>
83
+ raise <span class="hljs-string">'Empty params!'</span> <span class="hljs-keyword">if</span> data.empty?
84
+ source_id = <span class="hljs-keyword">nil</span>
85
+ client_id = <span class="hljs-keyword">nil</span>
86
+ private_key = <span class="hljs-keyword">nil</span></pre></div></div>
87
87
 
88
88
  </li>
89
89
 
@@ -98,11 +98,11 @@
98
98
 
99
99
  </div>
100
100
 
101
- <div class="content"><div class='highlight'><pre> data.each <span class="keyword">do</span> |key, value|
102
- <span class="keyword">if</span> key == <span class="string">'SourceId'</span>
101
+ <div class="content"><div class='highlight'><pre> data.each <span class="hljs-keyword">do</span> |key, value|
102
+ <span class="hljs-keyword">if</span> key == <span class="hljs-string">'SourceId'</span>
103
103
  source_id = value
104
- <span class="keyword">end</span>
105
- <span class="keyword">end</span></pre></div></div>
104
+ <span class="hljs-keyword">end</span>
105
+ <span class="hljs-keyword">end</span></pre></div></div>
106
106
 
107
107
  </li>
108
108
 
@@ -117,12 +117,12 @@
117
117
 
118
118
  </div>
119
119
 
120
- <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>)
121
- 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>)
122
- contents = contents.split(<span class="string">' '</span>)
120
+ <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>)
121
+ 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>)
122
+ contents = contents.split(<span class="hljs-string">' '</span>)
123
123
  client_id = contents.first
124
124
  private_key = contents.last
125
- <span class="keyword">end</span></pre></div></div>
125
+ <span class="hljs-keyword">end</span></pre></div></div>
126
126
 
127
127
  </li>
128
128
 
@@ -137,7 +137,7 @@
137
137
 
138
138
  </div>
139
139
 
140
- <div class="content"><div class='highlight'><pre> job = <span class="constant">GroupDocs::Job</span>.new({<span class="symbol">:id</span> =&gt; source_id})</pre></div></div>
140
+ <div class="content"><div class='highlight'><pre> job = <span class="hljs-constant">GroupDocs::Job</span>.new({<span class="hljs-symbol">:id</span> =&gt; source_id})</pre></div></div>
141
141
 
142
142
  </li>
143
143
 
@@ -152,7 +152,7 @@
152
152
 
153
153
  </div>
154
154
 
155
- <div class="content"><div class='highlight'><pre> documents = job.documents!({<span class="symbol">:client_id</span> =&gt; client_id, <span class="symbol">:private_key</span> =&gt; private_key})</pre></div></div>
155
+ <div class="content"><div class='highlight'><pre> documents = job.documents!({<span class="hljs-symbol">:client_id</span> =&gt; client_id, <span class="hljs-symbol">:private_key</span> =&gt; private_key})</pre></div></div>
156
156
 
157
157
  </li>
158
158
 
@@ -167,12 +167,12 @@
167
167
 
168
168
  </div>
169
169
 
170
- <div class="content"><div class='highlight'><pre> documents[<span class="symbol">:inputs</span>].first.outputs.first.download!(downloads_path, {<span class="symbol">:client_id</span> =&gt; client_id, <span class="symbol">:private_key</span> =&gt; private_key})
170
+ <div class="content"><div class='highlight'><pre> documents[<span class="hljs-symbol">:inputs</span>].first.outputs.first.download!(downloads_path, {<span class="hljs-symbol">:client_id</span> =&gt; client_id, <span class="hljs-symbol">:private_key</span> =&gt; private_key})
171
171
 
172
- <span class="keyword">rescue</span> <span class="constant">Exception</span> =&gt; e
172
+ <span class="hljs-keyword">rescue</span> <span class="hljs-constant">Exception</span> =&gt; e
173
173
  err = e.message
174
- <span class="keyword">end</span>
175
- <span class="keyword">end</span></pre></div></div>
174
+ <span class="hljs-keyword">end</span>
175
+ <span class="hljs-keyword">end</span></pre></div></div>
176
176
 
177
177
  </li>
178
178
 
@@ -187,7 +187,7 @@
187
187
 
188
188
  </div>
189
189
 
190
- <div class="content"><div class='highlight'><pre>get <span class="string">'/sample18/check'</span> <span class="keyword">do</span></pre></div></div>
190
+ <div class="content"><div class='highlight'><pre>get <span class="hljs-string">'/sample18/check'</span> <span class="hljs-keyword">do</span></pre></div></div>
191
191
 
192
192
  </li>
193
193
 
@@ -202,9 +202,9 @@
202
202
 
203
203
  </div>
204
204
 
205
- <div class="content"><div class='highlight'><pre> <span class="keyword">unless</span> <span class="constant">File</span>.directory?(<span class="string">"<span class="subst">#{<span class="constant">File</span>.dirname(__FILE_<span class="number">_</span>)}</span>/../public/downloads"</span>)
206
- <span class="keyword">return</span> <span class="string">'Directory was not found.'</span>
207
- <span class="keyword">end</span></pre></div></div>
205
+ <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">unless</span> <span class="hljs-constant">File</span>.directory?(<span class="hljs-string">"<span class="hljs-subst">#{<span class="hljs-constant">File</span>.dirname(__FILE_<span class="hljs-number">_</span>)}</span>/../public/downloads"</span>)
206
+ <span class="hljs-keyword">return</span> <span class="hljs-string">'Directory was not found.'</span>
207
+ <span class="hljs-keyword">end</span></pre></div></div>
208
208
 
209
209
  </li>
210
210
 
@@ -219,13 +219,13 @@
219
219
 
220
220
  </div>
221
221
 
222
- <div class="content"><div class='highlight'><pre> name = <span class="keyword">nil</span>
223
- <span class="constant">Dir</span>.entries(<span class="string">"<span class="subst">#{<span class="constant">File</span>.dirname(__FILE_<span class="number">_</span>)}</span>/../public/downloads"</span>).each <span class="keyword">do</span> |file|
224
- name = file <span class="keyword">if</span> file != <span class="string">'.'</span> &amp;&amp; file != <span class="string">'..'</span>
225
- <span class="keyword">end</span>
222
+ <div class="content"><div class='highlight'><pre> name = <span class="hljs-keyword">nil</span>
223
+ <span class="hljs-constant">Dir</span>.entries(<span class="hljs-string">"<span class="hljs-subst">#{<span class="hljs-constant">File</span>.dirname(__FILE_<span class="hljs-number">_</span>)}</span>/../public/downloads"</span>).each <span class="hljs-keyword">do</span> |file|
224
+ name = file <span class="hljs-keyword">if</span> file != <span class="hljs-string">'.'</span> &amp;&amp; file != <span class="hljs-string">'..'</span>
225
+ <span class="hljs-keyword">end</span>
226
226
 
227
227
  name
228
- <span class="keyword">end</span></pre></div></div>
228
+ <span class="hljs-keyword">end</span></pre></div></div>
229
229
 
230
230
  </li>
231
231
 
@@ -240,7 +240,7 @@
240
240
 
241
241
  </div>
242
242
 
243
- <div class="content"><div class='highlight'><pre>get <span class="string">'/sample18/downloads/:filename'</span> <span class="keyword">do</span> |filename|</pre></div></div>
243
+ <div class="content"><div class='highlight'><pre>get <span class="hljs-string">'/sample18/downloads/:filename'</span> <span class="hljs-keyword">do</span> |filename|</pre></div></div>
244
244
 
245
245
  </li>
246
246
 
@@ -255,8 +255,8 @@
255
255
 
256
256
  </div>
257
257
 
258
- <div class="content"><div class='highlight'><pre> send_file <span class="string">"<span class="subst">#{<span class="constant">File</span>.dirname(__FILE_<span class="number">_</span>)}</span>/../public/downloads/<span class="subst">#{filename}</span>"</span>, <span class="symbol">:filename</span> =&gt; filename, <span class="symbol">:type</span> =&gt; <span class="string">'Application/octet-stream'</span>
259
- <span class="keyword">end</span></pre></div></div>
258
+ <div class="content"><div class='highlight'><pre> send_file <span class="hljs-string">"<span class="hljs-subst">#{<span class="hljs-constant">File</span>.dirname(__FILE_<span class="hljs-number">_</span>)}</span>/../public/downloads/<span class="hljs-subst">#{filename}</span>"</span>, <span class="hljs-symbol">:filename</span> =&gt; filename, <span class="hljs-symbol">:type</span> =&gt; <span class="hljs-string">'Application/octet-stream'</span>
259
+ <span class="hljs-keyword">end</span></pre></div></div>
260
260
 
261
261
  </li>
262
262
 
@@ -271,7 +271,7 @@
271
271
 
272
272
  </div>
273
273
 
274
- <div class="content"><div class='highlight'><pre>post <span class="string">'/sample18'</span> <span class="keyword">do</span></pre></div></div>
274
+ <div class="content"><div class='highlight'><pre>post <span class="hljs-string">'/sample-18-how-to-convert-doc-to-docx-docx-to-doc-docx-to-pdf-ppt-to-pdf'</span> <span class="hljs-keyword">do</span></pre></div></div>
275
275
 
276
276
  </li>
277
277
 
@@ -286,14 +286,14 @@
286
286
 
287
287
  </div>
288
288
 
289
- <div class="content"><div class='highlight'><pre> set <span class="symbol">:client_id</span>, params[<span class="symbol">:clientId</span>]
290
- set <span class="symbol">:private_key</span>, params[<span class="symbol">:privateKey</span>]
291
- set <span class="symbol">:source</span>, params[<span class="symbol">:source</span>]
292
- set <span class="symbol">:file_id</span>, params[<span class="symbol">:fileId</span>]
293
- set <span class="symbol">:url</span>, params[<span class="symbol">:url</span>]
294
- set <span class="symbol">:convert_type</span>, params[<span class="symbol">:convertType</span>]
295
- set <span class="symbol">:callback</span>, params[<span class="symbol">:callback</span>]
296
- set <span class="symbol">:base_path</span>, params[<span class="symbol">:basePath</span>]</pre></div></div>
289
+ <div class="content"><div class='highlight'><pre> set <span class="hljs-symbol">:client_id</span>, params[<span class="hljs-symbol">:clientId</span>]
290
+ set <span class="hljs-symbol">:private_key</span>, params[<span class="hljs-symbol">:privateKey</span>]
291
+ set <span class="hljs-symbol">:source</span>, params[<span class="hljs-symbol">:source</span>]
292
+ set <span class="hljs-symbol">:file_id</span>, params[<span class="hljs-symbol">:fileId</span>]
293
+ set <span class="hljs-symbol">:url</span>, params[<span class="hljs-symbol">:url</span>]
294
+ set <span class="hljs-symbol">:convert_type</span>, params[<span class="hljs-symbol">:convertType</span>]
295
+ set <span class="hljs-symbol">:callback</span>, params[<span class="hljs-symbol">:callback</span>]
296
+ set <span class="hljs-symbol">:base_path</span>, params[<span class="hljs-symbol">:basePath</span>]</pre></div></div>
297
297
 
298
298
  </li>
299
299
 
@@ -308,7 +308,7 @@
308
308
 
309
309
  </div>
310
310
 
311
- <div class="content"><div class='highlight'><pre> downloads_path = <span class="string">"<span class="subst">#{<span class="constant">File</span>.dirname(__FILE_<span class="number">_</span>)}</span>/../public/downloads"</span></pre></div></div>
311
+ <div class="content"><div class='highlight'><pre> downloads_path = <span class="hljs-string">"<span class="hljs-subst">#{<span class="hljs-constant">File</span>.dirname(__FILE_<span class="hljs-number">_</span>)}</span>/../public/downloads"</span></pre></div></div>
312
312
 
313
313
  </li>
314
314
 
@@ -323,13 +323,13 @@
323
323
 
324
324
  </div>
325
325
 
326
- <div class="content"><div class='highlight'><pre> <span class="keyword">if</span> <span class="constant">File</span>.directory?(downloads_path)
327
- <span class="constant">Dir</span>.foreach(downloads_path) { |f| fn = <span class="constant">File</span>.join(downloads_path, f); <span class="constant">File</span>.delete(fn) <span class="keyword">if</span> f != <span class="string">'.'</span> &amp;&amp; f != <span class="string">'..'</span> }
328
- <span class="keyword">else</span>
329
- <span class="constant">Dir::</span>mkdir(downloads_path)
330
- <span class="keyword">end</span>
326
+ <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> <span class="hljs-constant">File</span>.directory?(downloads_path)
327
+ <span class="hljs-constant">Dir</span>.foreach(downloads_path) { |f| fn = <span class="hljs-constant">File</span>.join(downloads_path, f); <span class="hljs-constant">File</span>.delete(fn) <span class="hljs-keyword">if</span> f != <span class="hljs-string">'.'</span> &amp;&amp; f != <span class="hljs-string">'..'</span> }
328
+ <span class="hljs-keyword">else</span>
329
+ <span class="hljs-constant">Dir::</span>mkdir(downloads_path)
330
+ <span class="hljs-keyword">end</span>
331
331
 
332
- <span class="keyword">begin</span></pre></div></div>
332
+ <span class="hljs-keyword">begin</span></pre></div></div>
333
333
 
334
334
  </li>
335
335
 
@@ -344,7 +344,7 @@
344
344
 
345
345
  </div>
346
346
 
347
- <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>
347
+ <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>
348
348
 
349
349
  </li>
350
350
 
@@ -359,13 +359,13 @@
359
359
 
360
360
  </div>
361
361
 
362
- <div class="content"><div class='highlight'><pre> <span class="keyword">if</span> settings.base_path.empty?
363
- base_path = <span class="string">'https://api.groupdocs.com'</span>
364
- <span class="keyword">elsif</span> settings.base_path.match(<span class="string">'/v2.0'</span>)
365
- base_path = settings.base_path.split(<span class="string">'/v2.0'</span>)[<span class="number">0</span>]
366
- <span class="keyword">else</span>
362
+ <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> settings.base_path.empty?
363
+ base_path = <span class="hljs-string">'https://api.groupdocs.com'</span>
364
+ <span class="hljs-keyword">elsif</span> settings.base_path.match(<span class="hljs-string">'/v2.0'</span>)
365
+ base_path = settings.base_path.split(<span class="hljs-string">'/v2.0'</span>)[<span class="hljs-number">0</span>]
366
+ <span class="hljs-keyword">else</span>
367
367
  base_path = settings.base_path
368
- <span class="keyword">end</span></pre></div></div>
368
+ <span class="hljs-keyword">end</span></pre></div></div>
369
369
 
370
370
  </li>
371
371
 
@@ -380,7 +380,7 @@
380
380
 
381
381
  </div>
382
382
 
383
- <div class="content"><div class='highlight'><pre> <span class="constant">GroupDocs</span>.configure <span class="keyword">do</span> |groupdocs|
383
+ <div class="content"><div class='highlight'><pre> <span class="hljs-constant">GroupDocs</span>.configure <span class="hljs-keyword">do</span> |groupdocs|
384
384
  groupdocs.client_id = settings.client_id
385
385
  groupdocs.private_key = settings.private_key</pre></div></div>
386
386
 
@@ -397,8 +397,8 @@
397
397
 
398
398
  </div>
399
399
 
400
- <div class="content"><div class='highlight'><pre> groupdocs.api_server = base_path <span class="comment"># default is 'https://api.groupdocs.com'</span>
401
- <span class="keyword">end</span></pre></div></div>
400
+ <div class="content"><div class='highlight'><pre> groupdocs.api_server = base_path <span class="hljs-comment"># default is 'https://api.groupdocs.com'</span>
401
+ <span class="hljs-keyword">end</span></pre></div></div>
402
402
 
403
403
  </li>
404
404
 
@@ -413,8 +413,8 @@
413
413
 
414
414
  </div>
415
415
 
416
- <div class="content"><div class='highlight'><pre> <span class="keyword">if</span> settings.callback[<span class="number">0</span>]
417
- 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>
416
+ <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">if</span> settings.callback[<span class="hljs-number">0</span>]
417
+ 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>
418
418
 
419
419
  </li>
420
420
 
@@ -429,12 +429,12 @@
429
429
 
430
430
  </div>
431
431
 
432
- <div class="content"><div class='highlight'><pre> out_file.write(<span class="string">"<span class="subst">#{settings.client_id}</span> "</span>)
433
- out_file.write(<span class="string">"<span class="subst">#{settings.private_key}</span>"</span>)
432
+ <div class="content"><div class='highlight'><pre> out_file.write(<span class="hljs-string">"<span class="hljs-subst">#{settings.client_id}</span> "</span>)
433
+ out_file.write(<span class="hljs-string">"<span class="hljs-subst">#{settings.private_key}</span>"</span>)
434
434
  out_file.close
435
- <span class="keyword">end</span>
435
+ <span class="hljs-keyword">end</span>
436
436
 
437
- file = <span class="keyword">nil</span></pre></div></div>
437
+ file = <span class="hljs-keyword">nil</span></pre></div></div>
438
438
 
439
439
  </li>
440
440
 
@@ -449,8 +449,8 @@
449
449
 
450
450
  </div>
451
451
 
452
- <div class="content"><div class='highlight'><pre> <span class="keyword">case</span> settings.source
453
- <span class="keyword">when</span> <span class="string">'guid'</span></pre></div></div>
452
+ <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">case</span> settings.source
453
+ <span class="hljs-keyword">when</span> <span class="hljs-string">'guid'</span></pre></div></div>
454
454
 
455
455
  </li>
456
456
 
@@ -465,8 +465,8 @@
465
465
 
466
466
  </div>
467
467
 
468
- <div class="content"><div class='highlight'><pre> file = <span class="constant">GroupDocs::Storage::File</span>.new({<span class="symbol">:guid</span> =&gt; settings.file_id})
469
- <span class="keyword">when</span> <span class="string">'local'</span></pre></div></div>
468
+ <div class="content"><div class='highlight'><pre> file = <span class="hljs-constant">GroupDocs::Storage::File</span>.new({<span class="hljs-symbol">:guid</span> =&gt; settings.file_id})
469
+ <span class="hljs-keyword">when</span> <span class="hljs-string">'local'</span></pre></div></div>
470
470
 
471
471
  </li>
472
472
 
@@ -481,7 +481,7 @@
481
481
 
482
482
  </div>
483
483
 
484
- <div class="content"><div class='highlight'><pre> file_path = <span class="string">"<span class="subst">#{<span class="constant">Dir</span>.tmpdir}</span>/<span class="subst">#{params[<span class="symbol">:file</span>][<span class="symbol">:filename</span>]}</span>"</span></pre></div></div>
484
+ <div class="content"><div class='highlight'><pre> file_path = <span class="hljs-string">"<span class="hljs-subst">#{<span class="hljs-constant">Dir</span>.tmpdir}</span>/<span class="hljs-subst">#{params[<span class="hljs-symbol">:file</span>][<span class="hljs-symbol">:filename</span>]}</span>"</span></pre></div></div>
485
485
 
486
486
  </li>
487
487
 
@@ -496,7 +496,7 @@
496
496
 
497
497
  </div>
498
498
 
499
- <div class="content"><div class='highlight'><pre> <span class="constant">File</span>.open(file_path, <span class="string">'wb'</span>) { |f| f.write(params[<span class="symbol">:file</span>][<span class="symbol">:tempfile</span>].read) }</pre></div></div>
499
+ <div class="content"><div class='highlight'><pre> <span class="hljs-constant">File</span>.open(file_path, <span class="hljs-string">'wb'</span>) { |f| f.write(params[<span class="hljs-symbol">:file</span>][<span class="hljs-symbol">:tempfile</span>].read) }</pre></div></div>
500
500
 
501
501
  </li>
502
502
 
@@ -511,8 +511,8 @@
511
511
 
512
512
  </div>
513
513
 
514
- <div class="content"><div class='highlight'><pre> file = <span class="constant">GroupDocs::Storage::File</span>.upload!(file_path, {})
515
- <span class="keyword">when</span> <span class="string">'url'</span></pre></div></div>
514
+ <div class="content"><div class='highlight'><pre> file = <span class="hljs-constant">GroupDocs::Storage::File</span>.upload!(file_path, {})
515
+ <span class="hljs-keyword">when</span> <span class="hljs-string">'url'</span></pre></div></div>
516
516
 
517
517
  </li>
518
518
 
@@ -527,10 +527,10 @@
527
527
 
528
528
  </div>
529
529
 
530
- <div class="content"><div class='highlight'><pre> file = <span class="constant">GroupDocs::Storage::File</span>.upload_web!(settings.url)
531
- <span class="keyword">else</span>
532
- raise <span class="string">'Wrong GUID source.'</span>
533
- <span class="keyword">end</span></pre></div></div>
530
+ <div class="content"><div class='highlight'><pre> file = <span class="hljs-constant">GroupDocs::Storage::File</span>.upload_web!(settings.url)
531
+ <span class="hljs-keyword">else</span>
532
+ raise <span class="hljs-string">'Wrong GUID source.'</span>
533
+ <span class="hljs-keyword">end</span></pre></div></div>
534
534
 
535
535
  </li>
536
536
 
@@ -545,7 +545,7 @@
545
545
 
546
546
  </div>
547
547
 
548
- <div class="content"><div class='highlight'><pre> raise <span class="string">'No such file'</span> <span class="keyword">unless</span> file.is_a?(<span class="constant">GroupDocs::Storage::File</span>)</pre></div></div>
548
+ <div class="content"><div class='highlight'><pre> raise <span class="hljs-string">'No such file'</span> <span class="hljs-keyword">unless</span> file.is_a?(<span class="hljs-constant">GroupDocs::Storage::File</span>)</pre></div></div>
549
549
 
550
550
  </li>
551
551
 
@@ -575,7 +575,7 @@
575
575
 
576
576
  </div>
577
577
 
578
- <div class="content"><div class='highlight'><pre> convert = document.convert!(settings.convert_type, {<span class="symbol">:callback</span> =&gt; settings.callback})</pre></div></div>
578
+ <div class="content"><div class='highlight'><pre> convert = document.convert!(settings.convert_type, {<span class="hljs-symbol">:callback</span> =&gt; settings.callback})</pre></div></div>
579
579
 
580
580
  </li>
581
581
 
@@ -586,11 +586,15 @@
586
586
  <div class="pilwrap ">
587
587
  <a class="pilcrow" href="#section-34">&#182;</a>
588
588
  </div>
589
- <p>Waite 10 seconds for while file converting</p>
589
+ <p>Waite 15 seconds for while file converting</p>
590
590
 
591
591
  </div>
592
592
 
593
- <div class="content"><div class='highlight'><pre> sleep(<span class="number">10</span>)</pre></div></div>
593
+ <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">for</span> i <span class="hljs-keyword">in</span> <span class="hljs-number">1</span>..<span class="hljs-number">5</span>
594
+ i+=<span class="hljs-number">1</span>
595
+ sleep(<span class="hljs-number">2</span>)
596
+ <span class="hljs-keyword">if</span> <span class="hljs-constant">GroupDocs::Job</span>.get!(convert.id).status.to_s == <span class="hljs-string">'archived'</span> <span class="hljs-keyword">then</span> <span class="hljs-keyword">break</span> <span class="hljs-keyword">end</span>
597
+ <span class="hljs-keyword">end</span></pre></div></div>
594
598
 
595
599
  </li>
596
600
 
@@ -620,7 +624,7 @@
620
624
 
621
625
  </div>
622
626
 
623
- <div class="content"><div class='highlight'><pre> guid = original_document[<span class="symbol">:inputs</span>].first.outputs.first.guid</pre></div></div>
627
+ <div class="content"><div class='highlight'><pre> guid = original_document[<span class="hljs-symbol">:inputs</span>].first.outputs.first.guid</pre></div></div>
624
628
 
625
629
  </li>
626
630
 
@@ -635,7 +639,7 @@
635
639
 
636
640
  </div>
637
641
 
638
- <div class="content"><div class='highlight'><pre> iframe = <span class="string">"/document-viewer/embed/<span class="subst">#{guid}</span>"</span></pre></div></div>
642
+ <div class="content"><div class='highlight'><pre> iframe = <span class="hljs-string">"/document-viewer/embed/<span class="hljs-subst">#{guid}</span>"</span></pre></div></div>
639
643
 
640
644
  </li>
641
645
 
@@ -650,7 +654,7 @@
650
654
 
651
655
  </div>
652
656
 
653
- <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>
657
+ <div class="content"><div class='highlight'><pre> url = <span class="hljs-constant">GroupDocs::Api::Request</span>.new(<span class="hljs-symbol">:path</span> =&gt; iframe).prepare_and_sign_url</pre></div></div>
654
658
 
655
659
  </li>
656
660
 
@@ -665,14 +669,14 @@
665
669
 
666
670
  </div>
667
671
 
668
- <div class="content"><div class='highlight'><pre> <span class="keyword">case</span> base_path
669
- <span class="keyword">when</span> <span class="string">'https://stage-api-groupdocs.dynabic.com'</span>
670
- iframe = <span class="string">"https://stage-api-groupdocs.dynabic.com<span class="subst">#{url}</span>"</span>
671
- <span class="keyword">when</span> <span class="string">'https://dev-api-groupdocs.dynabic.com'</span>
672
- iframe = <span class="string">"https://dev-apps.groupdocs.com<span class="subst">#{url}</span>"</span>
673
- <span class="keyword">else</span>
674
- iframe = <span class="string">"https://apps.groupdocs.com<span class="subst">#{url}</span>"</span>
675
- <span class="keyword">end</span></pre></div></div>
672
+ <div class="content"><div class='highlight'><pre> <span class="hljs-keyword">case</span> base_path
673
+ <span class="hljs-keyword">when</span> <span class="hljs-string">'https://stage-api-groupdocs.dynabic.com'</span>
674
+ iframe = <span class="hljs-string">"https://stage-api-groupdocs.dynabic.com<span class="hljs-subst">#{url}</span>"</span>
675
+ <span class="hljs-keyword">when</span> <span class="hljs-string">'https://dev-api-groupdocs.dynabic.com'</span>
676
+ iframe = <span class="hljs-string">"https://dev-apps.groupdocs.com<span class="hljs-subst">#{url}</span>"</span>
677
+ <span class="hljs-keyword">else</span>
678
+ iframe = <span class="hljs-string">"https://apps.groupdocs.com<span class="hljs-subst">#{url}</span>"</span>
679
+ <span class="hljs-keyword">end</span></pre></div></div>
676
680
 
677
681
  </li>
678
682
 
@@ -687,11 +691,11 @@
687
691
 
688
692
  </div>
689
693
 
690
- <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>
694
+ <div class="content"><div class='highlight'><pre> iframe = <span class="hljs-string">"&lt;iframe id='downloadframe' src='<span class="hljs-subst">#{iframe}</span>' width='800' height='1000'&gt;&lt;/iframe&gt;"</span>
691
695
 
692
- <span class="keyword">rescue</span> <span class="constant">Exception</span> =&gt; e
696
+ <span class="hljs-keyword">rescue</span> <span class="hljs-constant">Exception</span> =&gt; e
693
697
  err = e.message
694
- <span class="keyword">end</span></pre></div></div>
698
+ <span class="hljs-keyword">end</span></pre></div></div>
695
699
 
696
700
  </li>
697
701
 
@@ -706,8 +710,8 @@
706
710
 
707
711
  </div>
708
712
 
709
- <div class="content"><div class='highlight'><pre> haml <span class="symbol">:sample18</span>, <span class="symbol">:locals</span> =&gt; {<span class="symbol">:userId</span> =&gt; settings.client_id, <span class="symbol">:privateKey</span> =&gt; settings.private_key, <span class="symbol">:callback</span> =&gt; settings.callback, <span class="symbol">:fileId</span> =&gt; file, <span class="symbol">:converted</span> =&gt; guid, <span class="symbol">:iframe</span> =&gt; iframe, <span class="symbol">:err</span> =&gt; err}
710
- <span class="keyword">end</span></pre></div></div>
713
+ <div class="content"><div class='highlight'><pre> haml <span class="hljs-symbol">:sample18</span>, <span class="hljs-symbol">:locals</span> =&gt; {<span class="hljs-symbol">:userId</span> =&gt; settings.client_id, <span class="hljs-symbol">:privateKey</span> =&gt; settings.private_key, <span class="hljs-symbol">:callback</span> =&gt; settings.callback, <span class="hljs-symbol">:fileId</span> =&gt; file, <span class="hljs-symbol">:converted</span> =&gt; guid, <span class="hljs-symbol">:iframe</span> =&gt; iframe, <span class="hljs-symbol">:err</span> =&gt; err}
714
+ <span class="hljs-keyword">end</span></pre></div></div>
711
715
 
712
716
  </li>
713
717