groupdocs 1.6.0 → 1.7.0

Sign up to get free protection for your applications and to get access to all the features.
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
@@ -1,53 +1,59 @@
1
- %h3{:style => 'text-align:center;'}
2
- %a{:href => '/'} GroupDocs Ruby SDK Samples
3
- \- Sample06
4
- .samplecontent{:style => 'padding:10px;'}
5
- %i This sample will show how to add provided signature to provided document using Ruby SDK. Signed file will be uploaded to GroupDocs account and its GUID will be returned and embed into webpage with GroupDocs Ebedded Viewer.
6
- %br/
7
- %br/
8
- %span.documentation
9
- %a{:href => '/docs/sample06.html'} Builtin documentation for this sample
10
- %br/
11
- %br/
12
- %p
13
- You entered:
14
- %p
15
- UserId = #{(defined? clientId) ? clientId : ''}
16
- %p
17
- PrivateKey = #{(defined? privateKey) ? privateKey : ''}
18
- %p
19
- %font{:color => 'red'} #{(defined? err) ? err : ''}
20
- #files_form
21
- %form{:action => '/sample06', :enctype => 'multipart/form-data', :method => 'post'}
22
- %br/
23
- %label{:for => 'clientId'} GroupDocs ClientID
24
- %br/
25
- %input{:type=>'text', :id=>'clientId', :name => 'clientId'}
26
- %br/
27
- %label{:for => 'privateKey'} GroupDocs PrivateKey
28
- %br/
29
- %input{:type=>'text', :id=>'privateKey', :name => 'privateKey'}
30
- %br/
31
- %label{:for => 'fiDocument'} Document to sign
32
- %br/
33
- %input{:type => 'file', :id => 'fiDocument', :name => 'fiDocument'}/
34
- %br/
35
- %label{:for => 'fiSignature'} Signature
36
- %br/
37
- %input{:type => 'file',:id => 'fiSignature', :name => 'fiSignature'}/
38
- %br/
39
- %label{:for => 'basePath'} Base Path
40
- %span{:class => 'optional'} (Optional)
41
- %br/
42
- %input{:type=>'text', :name=>'basePath'}
43
- %br/
44
- %br/
45
- %input{:type => 'submit', :value => 'Upload and sign the document', :id => "btnLoad"}/
46
- %br/
47
- %br/
48
- %div{:style => 'padding:20px; border:1px solid black;'}
1
+ %head
2
+ %title Sample 6 - How to add a Signature to a document in GroupDocs Signature
3
+ %link(rel="stylesheet" type="text/css" href="/css/style.css")
4
+ %script{:src=>'//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js'}
5
+ %body
6
+ %h3{:style => 'text-align:center;'}
7
+ %a{:href => '/'} GroupDocs Ruby SDK Samples
8
+ %br/
9
+ Sample 6 - How to add a Signature to a document in GroupDocs Signature
10
+ .samplecontent{:style => 'padding:10px;'}
11
+ %i This sample will show how to add provided signature to provided document using Ruby SDK. Signed file will be uploaded to GroupDocs account and its GUID will be returned and embed into webpage with GroupDocs Ebedded Viewer.
12
+ %br/
13
+ %br/
14
+ %span.documentation
15
+ %a{:href => '/docs/sample06.html'} Builtin documentation for this sample
16
+ %br/
17
+ %br/
49
18
  %p
50
- Results:
51
- #{(defined? iframe) ? iframe : ''}
52
-
53
- = partial :_others_samples
19
+ You entered:
20
+ %p
21
+ UserId = #{(defined? clientId) ? clientId : ''}
22
+ %p
23
+ PrivateKey = #{(defined? privateKey) ? privateKey : ''}
24
+ %p
25
+ %font{:color => 'red'} #{(defined? err) ? err : ''}
26
+ #files_form
27
+ %form{:action => '/sample-6-how-to-add-a-signature-to-a-document-in-groupdocs-signature', :enctype => 'multipart/form-data', :method => 'post'}
28
+ %br/
29
+ %label{:for => 'clientId'} GroupDocs ClientID
30
+ %br/
31
+ %input{:type=>'text', :id=>'clientId', :name => 'clientId'}
32
+ %br/
33
+ %label{:for => 'privateKey'} GroupDocs PrivateKey
34
+ %br/
35
+ %input{:type=>'text', :id=>'privateKey', :name => 'privateKey'}
36
+ %br/
37
+ %label{:for => 'fiDocument'} Document to sign
38
+ %br/
39
+ %input{:type => 'file', :id => 'fiDocument', :name => 'fiDocument'}/
40
+ %br/
41
+ %label{:for => 'fiSignature'} Signature
42
+ %br/
43
+ %input{:type => 'file',:id => 'fiSignature', :name => 'fiSignature'}/
44
+ %br/
45
+ %label{:for => 'basePath'} Base Path
46
+ %span{:class => 'optional'} (Optional)
47
+ %br/
48
+ %input{:type=>'text', :name=>'basePath'}
49
+ %br/
50
+ %br/
51
+ %input{:type => 'submit', :value => 'Upload and sign the document', :id => "btnLoad"}/
52
+ %br/
53
+ %br/
54
+ %div{:style => 'padding:20px; border:1px solid black;'}
55
+ %p
56
+ Results:
57
+ #{(defined? iframe) ? iframe : ''}
58
+
59
+ = partial :_others_samples
@@ -1,47 +1,53 @@
1
- %h3{:style => 'text-align:center;'}
2
- %a{:href => '/'} GroupDocs Ruby SDK Samples
3
- \- Sample7
4
- .samplecontent{:style => 'padding:10px;'}
5
- %i This sample will show how to list thumbnails for documents in the GroupDocs account using Ruby SDK
1
+ %head
2
+ %title Sample 7 - How to create a list of thumbnails for a document
3
+ %link(rel="stylesheet" type="text/css" href="/css/style.css")
4
+ %script{:src=>'//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js'}
5
+ %body
6
+ %h3{:style => 'text-align:center;'}
7
+ %a{:href => '/'} GroupDocs Ruby SDK Samples
8
+ %br/
9
+ Sample 7 - How to create a list of thumbnails for a document
10
+ .samplecontent{:style => 'padding:10px;'}
11
+ %i This sample will show how to list thumbnails for documents in the GroupDocs account using Ruby SDK
12
+ %br/
13
+ %br/
14
+ %span.documentation
15
+ %a{:href => '/docs/sample7.html'} Builtin documentation for this sample
16
+ %br/
17
+ %br/
18
+ %p
19
+ You entered:
20
+ %p
21
+ UserId = #{(defined? clientId) ? clientId : ''}
22
+ %p
23
+ PrivateKey = #{(defined? privateKey) ? privateKey : ''}
24
+ %p
25
+ %font{:color => 'red'} #{(defined? err) ? err : ''}
26
+ #requestForm{:style => 'padding:20px; border:1px solid black;'}
27
+ %p Enter data for request and press "Make request" button
28
+ %form{:action => '/sample-7-how-to-create-a-list-of-thumbnails-for-a-document', :enctype => 'multipart/form-data', :method => 'post'}
29
+ %label{:for => 'clientId'} GroupDocs ClientID
30
+ %br/
31
+ %input{:type=>'text', :name=>'clientId', :id=>'clientId'}
32
+ %br/
33
+ %label{:for => 'privateKey'} GroupDocs PrivateKey
34
+ %br/
35
+ %input{:type=>'text', :name=>'privateKey', :id=>'privateKey'}
36
+ %br/
37
+ %label{:for => 'basePath'} Base Path
38
+ %span{:class => 'optional'} (Optional)
39
+ %br/
40
+ %input{:type=>'text', :name=>'basePath', :id=>'basePath'}
41
+ %br/
42
+ %input{:type => 'submit', :value => 'Make Request'}/
43
+ %div{:style => 'padding:20px; border:1px solid black;'}
44
+ %p Results:
45
+ %table{:style => 'border:1px double black;'}
46
+ %tr
47
+ %th Field
48
+ %th Value
49
+ %tr
50
+ %td #{(defined? thumbnailList) ? thumbnailList : ''} #{(defined? file_List) ? file_List : ''}
6
51
  %br/
7
- %br/
8
- %span.documentation
9
- %a{:href => '/docs/sample7.html'} Builtin documentation for this sample
10
- %br/
11
- %br/
12
- %p
13
- You entered:
14
- %p
15
- UserId = #{(defined? clientId) ? clientId : ''}
16
- %p
17
- PrivateKey = #{(defined? privateKey) ? privateKey : ''}
18
- %p
19
- %font{:color => 'red'} #{(defined? err) ? err : ''}
20
- #requestForm{:style => 'padding:20px; border:1px solid black;'}
21
- %p Enter data for request and press "Make request" button
22
- %form{:action => '/sample07', :enctype => 'multipart/form-data', :method => 'post'}
23
- %label{:for => 'clientId'} GroupDocs ClientID
24
- %br/
25
- %input{:type=>'text', :name=>'clientId', :id=>'clientId'}
26
- %br/
27
- %label{:for => 'privateKey'} GroupDocs PrivateKey
28
- %br/
29
- %input{:type=>'text', :name=>'privateKey', :id=>'privateKey'}
30
- %br/
31
- %label{:for => 'basePath'} Base Path
32
- %span{:class => 'optional'} (Optional)
33
- %br/
34
- %input{:type=>'text', :name=>'basePath', :id=>'basePath'}
35
- %br/
36
- %input{:type => 'submit', :value => 'Make Request'}/
37
- %div{:style => 'padding:20px; border:1px solid black;'}
38
- %p Results:
39
- %table{:style => 'border:1px double black;'}
40
- %tr
41
- %th Field
42
- %th Value
43
- %tr
44
- %td #{(defined? thumbnailList) ? thumbnailList : ''} #{(defined? file_List) ? file_List : ''}
45
- %br/
46
52
 
47
- = partial :_others_samples
53
+ = partial :_others_samples
@@ -1,95 +1,101 @@
1
- %h3{:style => 'text-align:center;'}
2
- %a{:href => '/'} GroupDocs Ruby SDK Samples
3
- \- Sample08
4
- .samplecontent{:style => 'padding:10px;'}
5
- %i This sample will show how to return a URL representing a single page of particular Document in the GroupDocs account using Ruby SDK
6
- %br/
7
- %br/
8
- %span.documentation
9
- %a{:href => '/docs/sample08.html'} Builtin documentation for this sample
10
- %br/
11
- %br/
12
- %p
13
- You entered:
14
- %p
15
- UserId = #{(defined? clientId) ? clientId : ''}
16
- %p
17
- PrivateKey = #{(defined? privateKey) ? privateKey : ''}
18
- %p
19
- File Id = #{(defined? guid) ? guid : ''}
20
- %p
21
- Page number = #{(defined? pageNumber) ? pageNumber : ''}
22
- %p
23
- %font{:color => 'red'} #{(defined? err) ? err : ''}
24
- #requestForm{:style => 'padding:20px; border:1px solid black;'}
25
- %p Enter data for request and press "Make request" button
26
- %form{:action => '/sample08', :enctype => 'multipart/form-data', :method => 'post'}
27
- %label{:for => 'clientId'} GroupDocs ClientID
28
- %br/
29
- %input{:type=>'text', :id => 'clientId' , :name=>'clientId'}
30
- %br/
31
- %label{:for => 'privateKey'} GroupDocs PrivateKey
32
- %br/
33
- %input{:type=>'text', :id => 'privateKey' , :name=>'privateKey'}
34
- %br/
35
-
36
- %div.guid_radio
37
- %input{:type=>'radio', :name=>'source', :value=>'guid', :checked=>'checked'} File ID (GUID)
1
+ %head
2
+ %title Sample 8 - How to return a URL representing a single page of a Document
3
+ %link(rel="stylesheet" type="text/css" href="/css/style.css")
4
+ %script{:src=>'//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js'}
5
+ %body
6
+ %h3{:style => 'text-align:center;'}
7
+ %a{:href => '/'} GroupDocs Ruby SDK Samples
8
+ %br/
9
+ Sample 8 - How to return a URL representing a single page of a Document
10
+ .samplecontent{:style => 'padding:10px;'}
11
+ %i This sample will show how to return a URL representing a single page of particular Document in the GroupDocs account using Ruby SDK
12
+ %br/
13
+ %br/
14
+ %span.documentation
15
+ %a{:href => '/docs/sample08.html'} Builtin documentation for this sample
16
+ %br/
17
+ %br/
18
+ %p
19
+ You entered:
20
+ %p
21
+ UserId = #{(defined? clientId) ? clientId : ''}
22
+ %p
23
+ PrivateKey = #{(defined? privateKey) ? privateKey : ''}
24
+ %p
25
+ File Id = #{(defined? guid) ? guid : ''}
26
+ %p
27
+ Page number = #{(defined? pageNumber) ? pageNumber : ''}
28
+ %p
29
+ %font{:color => 'red'} #{(defined? err) ? err : ''}
30
+ #requestForm{:style => 'padding:20px; border:1px solid black;'}
31
+ %p Enter data for request and press "Make request" button
32
+ %form{:action => '/sample-8-how-to-return-a-url-representing-a-single-page-of-a-document', :enctype => 'multipart/form-data', :method => 'post'}
33
+ %label{:for => 'clientId'} GroupDocs ClientID
34
+ %br/
35
+ %input{:type=>'text', :id => 'clientId' , :name=>'clientId'}
38
36
  %br/
39
- %input{:type=>'radio', :name=>'source', :value=>'local'}Upload local file
37
+ %label{:for => 'privateKey'} GroupDocs PrivateKey
40
38
  %br/
41
- %input{:type=>'radio', :name=>'source', :value=>'url'} Upload file from URL
39
+ %input{:type=>'text', :id => 'privateKey' , :name=>'privateKey'}
42
40
  %br/
43
41
 
44
- %div.guid_field
45
- %label{:for=>'fileId', :id=>'guid'} File ID (GUID)
42
+ %div.guid_radio
43
+ %input{:type=>'radio', :name=>'source', :value=>'guid', :checked=>'checked'} File ID (GUID)
44
+ %br/
45
+ %input{:type=>'radio', :name=>'source', :value=>'local'}Upload local file
46
+ %br/
47
+ %input{:type=>'radio', :name=>'source', :value=>'url'} Upload file from URL
48
+ %br/
49
+
50
+ %div.guid_field
51
+ %label{:for=>'fileId', :id=>'guid'} File ID (GUID)
52
+ %br/
53
+ %input{:type=>'text', :name=>'fileId'}
54
+
55
+ %div.guid_field{:style=>'display:none;'}
56
+ %label{:for=>'file'} Upload local file
57
+ %br/
58
+ %input{:type=>'file', :name=>'file'}
59
+
60
+ %div.guid_field{:style=>'display:none;'}
61
+ %label{:for=>'url', :id=>'url'} Upload file from URL
62
+ %br/
63
+ %input{:type=>'text', :name=>'url'}
64
+
46
65
  %br/
47
- %input{:type=>'text', :name=>'fileId'}
48
-
49
- %div.guid_field{:style=>'display:none;'}
50
- %label{:for=>'file'} Upload local file
66
+ %label{:for => 'pageNumber'} GroupDocs page number (starts from zero)
51
67
  %br/
52
- %input{:type=>'file', :name=>'file'}
53
-
54
- %div.guid_field{:style=>'display:none;'}
55
- %label{:for=>'url', :id=>'url'} Upload file from URL
68
+ %input{:type=>'text', :name=>'pageNumber'}
69
+ %br/
70
+ %label{:for => 'basePath'} Base Path
71
+ %span{:class => 'optional'} (Optional)
72
+ %br/
73
+ %input{:type=>'text', :name=>'basePath', :id => "basePath"}
56
74
  %br/
57
- %input{:type=>'text', :name=>'url'}
58
-
59
- %br/
60
- %label{:for => 'pageNumber'} GroupDocs page number (starts from zero)
61
- %br/
62
- %input{:type=>'text', :name=>'pageNumber'}
63
- %br/
64
- %label{:for => 'basePath'} Base Path
65
- %span{:class => 'optional'} (Optional)
66
- %br/
67
- %input{:type=>'text', :name=>'basePath', :id => "basePath"}
68
- %br/
69
- %input{:type => 'submit', :value => 'Make Request'}/
70
- %div{:style => 'padding:20px; border:1px solid black;'}
71
- %p Results:
72
- %table{:style => 'border:1px double black;'}
73
- %tr
74
- %th Field
75
- %th Value
76
- %tr
77
- %td Page URL
78
- %td #{(defined? image) ? image : ''}
79
- %font{:color => 'green'}#{(defined? image) ? if image.nil? then 'You entered incorrect page number' else 'The page you requested:' end : ''}
75
+ %input{:type => 'submit', :value => 'Make Request'}/
76
+ %div{:style => 'padding:20px; border:1px solid black;'}
77
+ %p Results:
78
+ %table{:style => 'border:1px double black;'}
79
+ %tr
80
+ %th Field
81
+ %th Value
82
+ %tr
83
+ %td Page URL
84
+ %td #{(defined? image) ? image : ''}
85
+ %font{:color => 'green'}#{(defined? image) ? if image.nil? then 'You entered incorrect page number' else 'The page you requested:' end : ''}
86
+ %br/
87
+ %img{:src => "#{(defined? image) ? image : ''}"}
80
88
  %br/
81
- %img{:src => "#{(defined? image) ? image : ''}"}
82
- %br/
83
89
 
84
- = partial :_others_samples
90
+ = partial :_others_samples
85
91
 
86
- %script{:src=>'//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js'}
87
- :javascript
92
+ %script{:src=>'//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js'}
93
+ :javascript
88
94
 
89
- $(function($){
90
- $('.guid_radio input').change(function(){
91
- var elementIndex = $(this).parent().children('input').index($(this));
92
- $('.guid_field').hide();
93
- $('.guid_field').eq(elementIndex).show();
94
- });
95
- });
95
+ $(function($){
96
+ $('.guid_radio input').change(function(){
97
+ var elementIndex = $(this).parent().children('input').index($(this));
98
+ $('.guid_field').hide();
99
+ $('.guid_field').eq(elementIndex).show();
100
+ });
101
+ });
@@ -1,90 +1,96 @@
1
- %h3{:style => 'text-align:center;'}
2
- %a{:href => '/'} GroupDocs Ruby SDK Samples
3
- \- Sample09
4
- .samplecontent{:style => 'padding:10px;'}
5
- %i This sample will show how to generate an embedded Viewer URL for particular Document in the GroupDocs account using Ruby SDK
6
- %br/
7
- %br/
8
- %span.documentation
9
- %a{:href => '/docs/sample09.html'} Builtin documentation for this sample
10
- %br/
11
- %br/
12
- %p
13
- You entered:
14
- %p
15
- File GUID = #{(defined? guid) ? guid : ''}
16
- %p
17
- Height = #{(defined? height) ? height : ''}
18
- %p
19
- Width = #{(defined? width) ? width : ''}
20
- %p
21
- Viewer URL = #{(defined? v_url) ? v_url : ''}
22
- %p
23
- %font{:color => 'red'} #{(defined? err) ? err : ''}
24
- #requestForm{:style => 'padding:20px; border:1px solid black;'}
25
- %p Enter data for request and press "Make request" button
26
- %form{:action => '/sample09', :enctype => 'multipart/form-data', :method => 'post'}
27
- %label{:for => 'clientId'} GroupDocs ClientID
28
- %br/
29
- %input{:type=>'text', :id => 'clientId' , :name=>'clientId'}
30
- %br/
31
- %label{:for => 'privateKey'} GroupDocs PrivateKey
32
- %br/
33
- %input{:type=>'text', :id => 'privateKey', :name=>'privateKey'}
34
- %br/
35
- %div.guid_radio
36
- %input{:type=>'radio', :name=>'source', :value=>'guid', :checked=>'checked'} File ID (GUID)
1
+ %head
2
+ %title Sample 9 - How to generate an embedded Viewer URL for a Document
3
+ %link(rel="stylesheet" type="text/css" href="/css/style.css")
4
+ %script{:src=>'//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js'}
5
+ %body
6
+ %h3{:style => 'text-align:center;'}
7
+ %a{:href => '/'} GroupDocs Ruby SDK Samples
8
+ %br/
9
+ Sample 9 - How to generate an embedded Viewer URL for a Document
10
+ .samplecontent{:style => 'padding:10px;'}
11
+ %i This sample will show how to generate an embedded Viewer URL for particular Document in the GroupDocs account using Ruby SDK
12
+ %br/
13
+ %br/
14
+ %span.documentation
15
+ %a{:href => '/docs/sample09.html'} Builtin documentation for this sample
16
+ %br/
17
+ %br/
18
+ %p
19
+ You entered:
20
+ %p
21
+ File GUID = #{(defined? guid) ? guid : ''}
22
+ %p
23
+ Height = #{(defined? height) ? height : ''}
24
+ %p
25
+ Width = #{(defined? width) ? width : ''}
26
+ %p
27
+ Viewer URL = #{(defined? v_url) ? v_url : ''}
28
+ %p
29
+ %font{:color => 'red'} #{(defined? err) ? err : ''}
30
+ #requestForm{:style => 'padding:20px; border:1px solid black;'}
31
+ %p Enter data for request and press "Make request" button
32
+ %form{:action => '/sample-9-how-to-generate-an-embedded-viewer-url-for-a-document', :enctype => 'multipart/form-data', :method => 'post'}
33
+ %label{:for => 'clientId'} GroupDocs ClientID
37
34
  %br/
38
- %input{:type=>'radio', :name=>'source', :value=>'local'}Upload local file
35
+ %input{:type=>'text', :id => 'clientId' , :name=>'clientId'}
39
36
  %br/
40
- %input{:type=>'radio', :name=>'source', :value=>'url'} Upload file from URL
37
+ %label{:for => 'privateKey'} GroupDocs PrivateKey
41
38
  %br/
39
+ %input{:type=>'text', :id => 'privateKey', :name=>'privateKey'}
40
+ %br/
41
+ %div.guid_radio
42
+ %input{:type=>'radio', :name=>'source', :value=>'guid', :checked=>'checked'} File ID (GUID)
43
+ %br/
44
+ %input{:type=>'radio', :name=>'source', :value=>'local'}Upload local file
45
+ %br/
46
+ %input{:type=>'radio', :name=>'source', :value=>'url'} Upload file from URL
47
+ %br/
48
+
49
+ %div.guid_field
50
+ %label{:for=>'fileId', :id=>'guid'} File ID (GUID)
51
+ %br/
52
+ %input{:type=>'text', :name=>'fileId'}
53
+
54
+ %div.guid_field{:style=>'display:none;'}
55
+ %label{:for=>'file'} Upload local file
56
+ %br/
57
+ %input{:type=>'file', :name=>'file'}
42
58
 
43
- %div.guid_field
44
- %label{:for=>'fileId', :id=>'guid'} File ID (GUID)
59
+ %div.guid_field{:style=>'display:none;'}
60
+ %label{:for=>'url', :id=>'url'} Upload file from URL
61
+ %br/
62
+ %input{:type=>'text', :name=>'url'}
63
+
64
+ %input{:type=>'radio', :name=>'check', :value=>'viewer', :checked=>'checked'} Viewer
65
+ %input{:type=>'radio', :name=>'check', :value=>'annotation'} Annotation
45
66
  %br/
46
- %input{:type=>'text', :name=>'fileId'}
47
-
48
- %div.guid_field{:style=>'display:none;'}
49
- %label{:for=>'file'} Upload local file
67
+ %label{:for => 'private_key'} Width
50
68
  %br/
51
- %input{:type=>'file', :name=>'file'}
52
-
53
- %div.guid_field{:style=>'display:none;'}
54
- %label{:for=>'url', :id=>'url'} Upload file from URL
69
+ %input{:type=>'text', :name=>'width'}
55
70
  %br/
56
- %input{:type=>'text', :name=>'url'}
57
-
58
- %input{:type=>'radio', :name=>'check', :value=>'viewer', :checked=>'checked'} Viewer
59
- %input{:type=>'radio', :name=>'check', :value=>'annotation'} Annotation
60
- %br/
61
- %label{:for => 'private_key'} Width
62
- %br/
63
- %input{:type=>'text', :name=>'width'}
64
- %br/
65
- %label{:for => 'private_key'} Height
66
- %br/
67
- %input{:type=>'text', :name=>'height'}
68
- %br/
69
- %label{:for => 'basePath'} Base Path
70
- %span{:class => 'optional'} (Optional)
71
- %br/
72
- %input{:type=>'text', :name=>'basePath', :id => "basePath"}
73
- %br/
74
- %input{:type => 'submit', :value => 'Make Request'}/
75
- %div{:style => 'padding:20px; border:1px solid black;'}
76
- %iframe{:src => "#{(defined? v_url) ? v_url : ''}", :width=> "#{(defined? width) ? width : ''}", :height=>"#{(defined? height) ? height : ''}"}
77
- %br/
71
+ %label{:for => 'private_key'} Height
72
+ %br/
73
+ %input{:type=>'text', :name=>'height'}
74
+ %br/
75
+ %label{:for => 'basePath'} Base Path
76
+ %span{:class => 'optional'} (Optional)
77
+ %br/
78
+ %input{:type=>'text', :name=>'basePath', :id => "basePath"}
79
+ %br/
80
+ %input{:type => 'submit', :value => 'Make Request'}/
81
+ %div{:style => 'padding:20px; border:1px solid black;'}
82
+ %iframe{:src => "#{(defined? v_url) ? v_url : ''}", :width=> "#{(defined? width) ? width : ''}", :height=>"#{(defined? height) ? height : ''}"}
83
+ %br/
78
84
 
79
- = partial :_others_samples
85
+ = partial :_others_samples
80
86
 
81
- %script{:src=>'//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js'}
82
- :javascript
87
+ %script{:src=>'//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js'}
88
+ :javascript
83
89
 
84
- $(function($){
85
- $('.guid_radio input').change(function(){
86
- var elementIndex = $(this).parent().children('input').index($(this));
87
- $('.guid_field').hide();
88
- $('.guid_field').eq(elementIndex).show();
89
- });
90
- });
90
+ $(function($){
91
+ $('.guid_radio input').change(function(){
92
+ var elementIndex = $(this).parent().children('input').index($(this));
93
+ $('.guid_field').hide();
94
+ $('.guid_field').eq(elementIndex).show();
95
+ });
96
+ });