origamindee 3.0.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 (139) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +89 -0
  3. data/COPYING.LESSER +165 -0
  4. data/README.md +131 -0
  5. data/bin/config/pdfcop.conf.yml +236 -0
  6. data/bin/pdf2pdfa +87 -0
  7. data/bin/pdf2ruby +333 -0
  8. data/bin/pdfcop +476 -0
  9. data/bin/pdfdecompress +97 -0
  10. data/bin/pdfdecrypt +91 -0
  11. data/bin/pdfencrypt +113 -0
  12. data/bin/pdfexplode +223 -0
  13. data/bin/pdfextract +277 -0
  14. data/bin/pdfmetadata +143 -0
  15. data/bin/pdfsh +12 -0
  16. data/bin/shell/console.rb +128 -0
  17. data/bin/shell/hexdump.rb +59 -0
  18. data/bin/shell/irbrc +69 -0
  19. data/examples/README.md +34 -0
  20. data/examples/attachments/attachment.rb +38 -0
  21. data/examples/attachments/nested_document.rb +51 -0
  22. data/examples/encryption/encryption.rb +28 -0
  23. data/examples/events/events.rb +72 -0
  24. data/examples/flash/flash.rb +37 -0
  25. data/examples/flash/helloworld.swf +0 -0
  26. data/examples/forms/javascript.rb +54 -0
  27. data/examples/forms/xfa.rb +115 -0
  28. data/examples/javascript/hello_world.rb +22 -0
  29. data/examples/javascript/js_emulation.rb +54 -0
  30. data/examples/loop/goto.rb +32 -0
  31. data/examples/loop/named.rb +33 -0
  32. data/examples/signature/signature.rb +65 -0
  33. data/examples/uri/javascript.rb +56 -0
  34. data/examples/uri/open-uri.rb +21 -0
  35. data/examples/uri/submitform.rb +47 -0
  36. data/lib/origami/3d.rb +364 -0
  37. data/lib/origami/acroform.rb +321 -0
  38. data/lib/origami/actions.rb +318 -0
  39. data/lib/origami/annotations.rb +711 -0
  40. data/lib/origami/array.rb +242 -0
  41. data/lib/origami/boolean.rb +90 -0
  42. data/lib/origami/catalog.rb +418 -0
  43. data/lib/origami/collections.rb +144 -0
  44. data/lib/origami/compound.rb +161 -0
  45. data/lib/origami/destinations.rb +252 -0
  46. data/lib/origami/dictionary.rb +192 -0
  47. data/lib/origami/encryption.rb +1084 -0
  48. data/lib/origami/extensions/fdf.rb +347 -0
  49. data/lib/origami/extensions/ppklite.rb +422 -0
  50. data/lib/origami/filespec.rb +197 -0
  51. data/lib/origami/filters/ascii.rb +211 -0
  52. data/lib/origami/filters/ccitt/tables.rb +267 -0
  53. data/lib/origami/filters/ccitt.rb +357 -0
  54. data/lib/origami/filters/crypt.rb +38 -0
  55. data/lib/origami/filters/dct.rb +54 -0
  56. data/lib/origami/filters/flate.rb +69 -0
  57. data/lib/origami/filters/jbig2.rb +57 -0
  58. data/lib/origami/filters/jpx.rb +47 -0
  59. data/lib/origami/filters/lzw.rb +170 -0
  60. data/lib/origami/filters/predictors.rb +292 -0
  61. data/lib/origami/filters/runlength.rb +129 -0
  62. data/lib/origami/filters.rb +364 -0
  63. data/lib/origami/font.rb +196 -0
  64. data/lib/origami/functions.rb +79 -0
  65. data/lib/origami/graphics/colors.rb +230 -0
  66. data/lib/origami/graphics/instruction.rb +98 -0
  67. data/lib/origami/graphics/path.rb +182 -0
  68. data/lib/origami/graphics/patterns.rb +174 -0
  69. data/lib/origami/graphics/render.rb +62 -0
  70. data/lib/origami/graphics/state.rb +149 -0
  71. data/lib/origami/graphics/text.rb +225 -0
  72. data/lib/origami/graphics/xobject.rb +918 -0
  73. data/lib/origami/graphics.rb +38 -0
  74. data/lib/origami/header.rb +75 -0
  75. data/lib/origami/javascript.rb +713 -0
  76. data/lib/origami/linearization.rb +330 -0
  77. data/lib/origami/metadata.rb +172 -0
  78. data/lib/origami/name.rb +135 -0
  79. data/lib/origami/null.rb +65 -0
  80. data/lib/origami/numeric.rb +181 -0
  81. data/lib/origami/obfuscation.rb +245 -0
  82. data/lib/origami/object.rb +760 -0
  83. data/lib/origami/optionalcontent.rb +183 -0
  84. data/lib/origami/outline.rb +54 -0
  85. data/lib/origami/outputintents.rb +85 -0
  86. data/lib/origami/page.rb +722 -0
  87. data/lib/origami/parser.rb +269 -0
  88. data/lib/origami/parsers/fdf.rb +56 -0
  89. data/lib/origami/parsers/pdf/lazy.rb +176 -0
  90. data/lib/origami/parsers/pdf/linear.rb +122 -0
  91. data/lib/origami/parsers/pdf.rb +118 -0
  92. data/lib/origami/parsers/ppklite.rb +57 -0
  93. data/lib/origami/pdf.rb +1108 -0
  94. data/lib/origami/reference.rb +134 -0
  95. data/lib/origami/signature.rb +702 -0
  96. data/lib/origami/stream.rb +705 -0
  97. data/lib/origami/string.rb +444 -0
  98. data/lib/origami/template/patterns.rb +56 -0
  99. data/lib/origami/template/widgets.rb +151 -0
  100. data/lib/origami/trailer.rb +190 -0
  101. data/lib/origami/tree.rb +62 -0
  102. data/lib/origami/version.rb +23 -0
  103. data/lib/origami/webcapture.rb +100 -0
  104. data/lib/origami/xfa/config.rb +453 -0
  105. data/lib/origami/xfa/connectionset.rb +146 -0
  106. data/lib/origami/xfa/datasets.rb +49 -0
  107. data/lib/origami/xfa/localeset.rb +42 -0
  108. data/lib/origami/xfa/package.rb +59 -0
  109. data/lib/origami/xfa/pdf.rb +73 -0
  110. data/lib/origami/xfa/signature.rb +42 -0
  111. data/lib/origami/xfa/sourceset.rb +43 -0
  112. data/lib/origami/xfa/stylesheet.rb +44 -0
  113. data/lib/origami/xfa/template.rb +1691 -0
  114. data/lib/origami/xfa/xdc.rb +42 -0
  115. data/lib/origami/xfa/xfa.rb +146 -0
  116. data/lib/origami/xfa/xfdf.rb +43 -0
  117. data/lib/origami/xfa/xmpmeta.rb +43 -0
  118. data/lib/origami/xfa.rb +62 -0
  119. data/lib/origami/xreftable.rb +557 -0
  120. data/lib/origami.rb +47 -0
  121. data/test/dataset/calc.pdf +85 -0
  122. data/test/dataset/crypto.pdf +36 -0
  123. data/test/dataset/empty.pdf +49 -0
  124. data/test/test_actions.rb +27 -0
  125. data/test/test_annotations.rb +68 -0
  126. data/test/test_forms.rb +30 -0
  127. data/test/test_native_types.rb +83 -0
  128. data/test/test_object_tree.rb +33 -0
  129. data/test/test_pages.rb +60 -0
  130. data/test/test_pdf.rb +20 -0
  131. data/test/test_pdf_attachment.rb +34 -0
  132. data/test/test_pdf_create.rb +24 -0
  133. data/test/test_pdf_encrypt.rb +102 -0
  134. data/test/test_pdf_parse.rb +134 -0
  135. data/test/test_pdf_parse_lazy.rb +69 -0
  136. data/test/test_pdf_sign.rb +97 -0
  137. data/test/test_streams.rb +184 -0
  138. data/test/test_xrefs.rb +67 -0
  139. metadata +280 -0
@@ -0,0 +1,453 @@
1
+ =begin
2
+
3
+ This file is part of Origami, PDF manipulation framework for Ruby
4
+ Copyright (C) 2017 Guillaume Delugré.
5
+
6
+ Origami is free software: you can redistribute it and/or modify
7
+ it under the terms of the GNU Lesser General Public License as published by
8
+ the Free Software Foundation, either version 3 of the License, or
9
+ (at your option) any later version.
10
+
11
+ Origami is distributed in the hope that it will be useful,
12
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ GNU Lesser General Public License for more details.
15
+
16
+ You should have received a copy of the GNU Lesser General Public License
17
+ along with Origami. If not, see <http://www.gnu.org/licenses/>.
18
+
19
+ =end
20
+
21
+ module Origami
22
+
23
+ module XFA
24
+ class ConfigElement < Element
25
+ include Lockable
26
+ include Descriptive
27
+ end
28
+ end
29
+
30
+ module XDP
31
+
32
+ module Packet
33
+
34
+ #
35
+ # This packet encloses the configuration settings.
36
+ #
37
+ class Config < XFA::Element
38
+ mime_type 'text/xml'
39
+
40
+ def initialize
41
+ super("config")
42
+
43
+ add_attribute 'xmlns:xfa', 'http://www.xfa.org/schema/xci/3.0/'
44
+ end
45
+
46
+ class URI < XFA::ConfigElement
47
+ def initialize(uri = "")
48
+ super('uri')
49
+
50
+ self.text = uri
51
+ end
52
+ end
53
+
54
+ class Debug < XFA::ConfigElement
55
+ xfa_node 'uri', Config::URI, 0..1
56
+
57
+ def initialize
58
+ super('debug')
59
+ end
60
+ end
61
+
62
+ class AdjustData < XFA::ConfigElement
63
+ def initialize(coercion = "0")
64
+ super('adjustData')
65
+
66
+ self.text = coercion
67
+ end
68
+ end
69
+
70
+ class Attributes < XFA::ConfigElement
71
+ PRESERVE = "preserve"
72
+ DELEGATE = "delegate"
73
+ IGNORE = "ignore"
74
+
75
+ def initialize(attr = PRESERVE)
76
+ super('attributes')
77
+
78
+ self.text = attr
79
+ end
80
+ end
81
+
82
+ class IncrementalLoad < XFA::ConfigElement
83
+ NONE = "none"
84
+ FORWARDONLY = "forwardOnly"
85
+
86
+ def initialize(incload = NONE)
87
+ super('incrementalLoad')
88
+
89
+ self.text = incload
90
+ end
91
+ end
92
+
93
+ class Locale < XFA::ConfigElement
94
+ def initialize(locale = "")
95
+ super('locale')
96
+
97
+ self.text = locale
98
+ end
99
+ end
100
+
101
+ class LocaleSet < XFA::ConfigElement
102
+ def initialize(uri = "")
103
+ super('localeSet')
104
+
105
+ self.text = uri
106
+ end
107
+ end
108
+
109
+ class OutputXSL < XFA::ConfigElement
110
+ xfa_node 'uri', Config::URI, 0..1
111
+
112
+ def initialize
113
+ super('outputXSL')
114
+ end
115
+ end
116
+
117
+ class Range < XFA::ConfigElement
118
+ def initialize(range = "")
119
+ super('range')
120
+
121
+ self.text = range
122
+ end
123
+ end
124
+
125
+ class Record < XFA::ConfigElement
126
+ def initialize(record = "")
127
+ super('record')
128
+
129
+ self.text = record
130
+ end
131
+ end
132
+
133
+ class StartNode < XFA::ConfigElement
134
+ def initialize(somexpr = "")
135
+ super('startNode')
136
+
137
+ self.text = somexpr
138
+ end
139
+ end
140
+
141
+ class Window < XFA::ConfigElement
142
+ def initialize(win = "0")
143
+ super('window')
144
+
145
+ self.text = win
146
+ end
147
+ end
148
+
149
+ class XSL < XFA::ConfigElement
150
+ xfa_node 'debug', Config::Debug, 0..1
151
+ xfa_node 'uri', Config::URI, 0..1
152
+
153
+ def initialize
154
+ super('xsl')
155
+ end
156
+ end
157
+
158
+ class ExcludeNS < XFA::ConfigElement
159
+ def initialize(ns = "")
160
+ super('excludeNS')
161
+
162
+ self.text = ns
163
+ end
164
+ end
165
+
166
+ class GroupParent < XFA::ConfigElement
167
+ def initialize(parentname = "")
168
+ super('groupParent')
169
+
170
+ self.text = parentname
171
+ end
172
+ end
173
+
174
+ class IfEmpty < XFA::ConfigElement
175
+ DATAVALUE = "dataValue"
176
+ DATAGROUP = "dataGroup"
177
+ IGNORE = "ignore"
178
+ REMOVE = "remove"
179
+
180
+ def initialize(default = DATAVALUE)
181
+ super('ifEmpty')
182
+
183
+ self.text = default
184
+ end
185
+ end
186
+
187
+ class NameAttr < XFA::ConfigElement
188
+ def initialize(name)
189
+ super('nameAttr')
190
+
191
+ self.text = name
192
+ end
193
+ end
194
+
195
+ class Picture < XFA::ConfigElement
196
+ def initialize(clause = "")
197
+ super('picture')
198
+
199
+ self.text = clause
200
+ end
201
+ end
202
+
203
+ class Presence < XFA::ConfigElement
204
+ PRESERVE = "preserve"
205
+ DISSOLVE = "dissolve"
206
+ DISSOLVESTRUCTURE = "dissolveStructure"
207
+ IGNORE = "ignore"
208
+ REMOVE = "remove"
209
+
210
+ def initialize(action = PRESERVE)
211
+ super('presence')
212
+
213
+ self.text = action
214
+ end
215
+ end
216
+
217
+ class Rename < XFA::ConfigElement
218
+ def initialize(nodename = "")
219
+ super('rename')
220
+
221
+ self.text = nodename
222
+ end
223
+ end
224
+
225
+ class Whitespace < XFA::ConfigElement
226
+ PRESERVE = "preserve"
227
+ LTRIM = "ltrim"
228
+ NORMALIZE = "normalize"
229
+ RTRIM = "rtrim"
230
+ TRIM = "trim"
231
+
232
+ def initialize(action = PRESERVE)
233
+ super('whitespace')
234
+
235
+ self.text = action
236
+ end
237
+ end
238
+
239
+ class Transform < XFA::ConfigElement
240
+ xfa_attribute 'ref'
241
+
242
+ xfa_node 'groupParent', Config::GroupParent, 0..1
243
+ xfa_node 'ifEmpty', Config::IfEmpty, 0..1
244
+ xfa_node 'nameAttr', Config::NameAttr, 0..1
245
+ xfa_node 'picture', Config::Picture, 0..1
246
+ xfa_node 'presence', Config::Presence, 0..1
247
+ xfa_node 'rename', Config::Rename, 0..1
248
+ xfa_node 'whitespace', Config::Whitespace, 0..1
249
+ end
250
+
251
+ class Data < XFA::ConfigElement
252
+ xfa_node 'adjustData', Config::AdjustData, 0..1
253
+ xfa_node 'attributes', Config::Attributes, 0..1
254
+ xfa_node 'incrementalLoad', Config::IncrementalLoad, 0..1
255
+ xfa_node 'outputXSL', Config::OutputXSL, 0..1
256
+ xfa_node 'range', Config::Range, 0..1
257
+ xfa_node 'record', Config::Record, 0..1
258
+ xfa_node 'startNode', Config::StartNode, 0..1
259
+ xfa_node 'uri', Config::URI, 0..1
260
+ xfa_node 'window', Config::Window, 0..1
261
+ xfa_node 'xsl', Config::XSL, 0..1
262
+
263
+ xfa_node 'excludeNS', Config::ExcludeNS
264
+ xfa_node 'transform', Config::Transform
265
+
266
+ def initialize
267
+ super('data')
268
+ end
269
+ end
270
+
271
+ class Severity < XFA::ConfigElement
272
+ IGNORE = "ignore"
273
+ ERROR = "error"
274
+ INFORMATION = "information"
275
+ TRACE = "trace"
276
+ WARNING = "warning"
277
+
278
+ def initialize(level = IGNORE)
279
+ super('severity')
280
+
281
+ self.text = level
282
+ end
283
+ end
284
+
285
+ class MsgId < XFA::ConfigElement
286
+ def initialize(uid = "1")
287
+ super('msgId')
288
+
289
+ self.text = uid
290
+ end
291
+ end
292
+
293
+ class Message < XFA::ConfigElement
294
+ xfa_node 'msgId', Config::MsgId, 0..1
295
+ xfa_node 'severity', Config::Severity, 0..1
296
+
297
+ def initialize
298
+ super('message')
299
+ end
300
+ end
301
+
302
+ class Messaging < XFA::ConfigElement
303
+ xfa_node 'message', Config::Message
304
+
305
+ def initialize
306
+ super('messaging')
307
+ end
308
+ end
309
+
310
+ class SuppressBanner < XFA::ConfigElement
311
+ ALLOWED = "0"
312
+ DENIED = "1"
313
+
314
+ def initialize(display = ALLOWED)
315
+ super('suppressBanner')
316
+
317
+ self.text = display
318
+ end
319
+ end
320
+
321
+ class Base < XFA::ConfigElement
322
+ def initialize(uri = "")
323
+ super('base')
324
+
325
+ self.text = uri
326
+ end
327
+ end
328
+
329
+ class Relevant < XFA::ConfigElement
330
+ def initialize(token = "")
331
+ super('relevant')
332
+
333
+ self.text = token
334
+ end
335
+ end
336
+
337
+ class StartPage < XFA::ConfigElement
338
+ def initialize(pagenum = "0")
339
+ super('startPage')
340
+
341
+ self.text = pagenum
342
+ end
343
+ end
344
+
345
+ class Template < XFA::ConfigElement
346
+ xfa_node 'base', Config::Base, 0..1
347
+ xfa_node 'relevant', Config::Relevant, 0..1
348
+ xfa_node 'startPage', Config::StartPage, 0..1
349
+ xfa_node 'uri', Config::URI, 0..1
350
+ xfa_node 'xsl', Config::XSL, 0..1
351
+
352
+ def initialize
353
+ super('template')
354
+ end
355
+ end
356
+
357
+ class ValidationMessaging < XFA::ConfigElement
358
+ ALL_INDIVIDUALLY = "allMessagesIndividually"
359
+ ALL_TOGETHER = "allMessagesTogether"
360
+ FIRST_ONLY = "firstMessageOnly"
361
+ NONE = "noMessages"
362
+
363
+ def initialize(validate = ALL_INDIVIDUALLY)
364
+ super('validationMessaging')
365
+
366
+ self.text = validate
367
+ end
368
+ end
369
+
370
+ class VersionControl < XFA::Element
371
+ include Lockable
372
+
373
+ xfa_attribute 'outputBelow'
374
+ xfa_attribute 'sourceAbove'
375
+ xfa_attribute 'sourceBelow'
376
+
377
+ def initialize
378
+ super('versionControl')
379
+ end
380
+ end
381
+
382
+ class Mode < XFA::ConfigElement
383
+ APPEND = "append"
384
+ OVERWRITE = "overwrite"
385
+
386
+ def initialize(mode = APPEND)
387
+ super('mode')
388
+
389
+ self.text = mode
390
+ end
391
+ end
392
+
393
+ class Threshold < XFA::ConfigElement
394
+ TRACE = "trace"
395
+ ERROR = "error"
396
+ INFORMATION = "information"
397
+ WARN = "warn"
398
+
399
+ def initialize(threshold = TRACE)
400
+ super('threshold')
401
+
402
+ self.text = threshold
403
+ end
404
+ end
405
+
406
+ class To < XFA::ConfigElement
407
+ NULL = "null"
408
+ MEMORY = "memory"
409
+ STD_ERR = "stderr"
410
+ STD_OUT = "stdout"
411
+ SYSTEM = "system"
412
+ URI = "uri"
413
+
414
+ def initialize(dest = NULL)
415
+ super('to')
416
+
417
+ self.text = dest
418
+ end
419
+ end
420
+
421
+ class Log < XFA::ConfigElement
422
+ xfa_node 'mode', Config::Mode, 0..1
423
+ xfa_node 'threshold', Config::Threshold, 0..1
424
+ xfa_node 'to', Config::To, 0..1
425
+ xfa_node 'uri', Config::URI, 0..1
426
+
427
+ def initialize
428
+ super('log')
429
+ end
430
+ end
431
+
432
+ class Common < XFA::ConfigElement
433
+ xfa_node 'data', Config::Data, 0..1
434
+ xfa_node 'locale', Config::Locale, 0..1
435
+ xfa_node 'localeSet', Config::LocaleSet, 0..1
436
+ xfa_node 'messaging', Config::Messaging, 0..1
437
+ xfa_node 'suppressBanner', Config::SuppressBanner, 0..1
438
+ xfa_node 'template', Config::Template, 0..1
439
+ xfa_node 'validationMessaging', Config::ValidationMessaging, 0..1
440
+ xfa_node 'versionControl', Config::VersionControl, 0..1
441
+
442
+ xfa_node 'log', Config::Log
443
+
444
+ def initialize
445
+ super("common")
446
+ end
447
+ end
448
+
449
+ end
450
+
451
+ end
452
+ end
453
+ end
@@ -0,0 +1,146 @@
1
+ =begin
2
+
3
+ This file is part of Origami, PDF manipulation framework for Ruby
4
+ Copyright (C) 2017 Guillaume Delugré.
5
+
6
+ Origami is free software: you can redistribute it and/or modify
7
+ it under the terms of the GNU Lesser General Public License as published by
8
+ the Free Software Foundation, either version 3 of the License, or
9
+ (at your option) any later version.
10
+
11
+ Origami is distributed in the hope that it will be useful,
12
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ GNU Lesser General Public License for more details.
15
+
16
+ You should have received a copy of the GNU Lesser General Public License
17
+ along with Origami. If not, see <http://www.gnu.org/licenses/>.
18
+
19
+ =end
20
+
21
+ module Origami
22
+
23
+ module XFA
24
+ class ConnectionElement < Element
25
+ xfa_attribute 'dataDescription'
26
+ xfa_attribute 'name'
27
+ end
28
+ end
29
+
30
+ module XDP
31
+
32
+ module Packet
33
+
34
+ #
35
+ # The _connectionSet_ packet describes the connections used to initiate or conduct web services.
36
+ #
37
+ class ConnectionSet < XFA::Element
38
+ mime_type 'text/xml'
39
+
40
+ def initialize
41
+ super("connectionSet")
42
+
43
+ add_attribute 'xmlns', 'http://www.xfa.org/schema/xfa-connection-set/2.8/'
44
+ end
45
+
46
+ class EffectiveInputPolicy < XFA::NamedTemplateElement
47
+ def initialize
48
+ super('effectiveInputPolicy')
49
+ end
50
+ end
51
+
52
+ class EffectiveOutputPolicy < XFA::NamedTemplateElement
53
+ def initialize
54
+ super('effectiveOutputPolicy')
55
+ end
56
+ end
57
+
58
+ class Operation < XFA::NamedTemplateElement
59
+ xfa_attribute 'input'
60
+ xfa_attribute 'output'
61
+
62
+ def initialize(name = "")
63
+ super('operation')
64
+
65
+ self.text = name
66
+ end
67
+ end
68
+
69
+ class SOAPAction < XFA::NamedTemplateElement
70
+ def initialize(uri = "")
71
+ super('soapAction')
72
+
73
+ self.text = uri
74
+ end
75
+ end
76
+
77
+ class SOAPAddress < XFA::NamedTemplateElement
78
+ def initialize(addr = "")
79
+ super('soapAddress')
80
+
81
+ self.text = addr
82
+ end
83
+ end
84
+
85
+ class WSDLAddress < XFA::NamedTemplateElement
86
+ def initialize(addr = "")
87
+ super('wsdlAddress')
88
+
89
+ self.text = addr
90
+ end
91
+ end
92
+
93
+ class WSDLConnection < XFA::ConnectionElement
94
+ xfa_node 'effectiveInputPolicy', ConnectionSet::EffectiveInputPolicy, 0..1
95
+ xfa_node 'effectiveOutputPolicy', ConnectionSet::EffectiveOutputPolicy, 0..1
96
+ xfa_node 'operation', ConnectionSet::Operation, 0..1
97
+ xfa_node 'soapAction', ConnectionSet::SOAPAction, 0..1
98
+ xfa_node 'soapAddress', ConnectionSet::SOAPAddress, 0..1
99
+ xfa_node 'wsdlAddress', ConnectionSet::WSDLAddress, 0..1
100
+
101
+ def initialize
102
+ super('wsdlConnection')
103
+ end
104
+ end
105
+
106
+ class URI < XFA::NamedTemplateElement
107
+ def initialize(uri = "")
108
+ super('uri')
109
+
110
+ self.text = uri
111
+ end
112
+ end
113
+
114
+ class RootElement < XFA::NamedTemplateElement
115
+ def initialize(root = '')
116
+ super('rootElement')
117
+
118
+ self.text = root
119
+ end
120
+ end
121
+
122
+ class XSDConnection < XFA::ConnectionElement
123
+ xfa_node 'rootElement', ConnectionSet::RootElement, 0..1
124
+ xfa_node 'uri', ConnectionSet::URI, 0..1
125
+
126
+ def initialize
127
+ super('xsdConnection')
128
+ end
129
+ end
130
+
131
+ class XMLConnection < XFA::ConnectionElement
132
+ xfa_node 'uri', ConnectionSet::URI, 0..1
133
+
134
+ def initialize
135
+ super('xmlConnection')
136
+ end
137
+ end
138
+
139
+ xfa_node 'wsdlConnection', ConnectionSet::WSDLConnection
140
+ xfa_node 'xmlConnection', ConnectionSet::XMLConnection
141
+ xfa_node 'xsdConnection', ConnectionSet::XSDConnection
142
+ end
143
+
144
+ end
145
+ end
146
+ end
@@ -0,0 +1,49 @@
1
+ =begin
2
+
3
+ This file is part of Origami, PDF manipulation framework for Ruby
4
+ Copyright (C) 2017 Guillaume Delugré.
5
+
6
+ Origami is free software: you can redistribute it and/or modify
7
+ it under the terms of the GNU Lesser General Public License as published by
8
+ the Free Software Foundation, either version 3 of the License, or
9
+ (at your option) any later version.
10
+
11
+ Origami is distributed in the hope that it will be useful,
12
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ GNU Lesser General Public License for more details.
15
+
16
+ You should have received a copy of the GNU Lesser General Public License
17
+ along with Origami. If not, see <http://www.gnu.org/licenses/>.
18
+
19
+ =end
20
+
21
+ module Origami
22
+
23
+ module XDP
24
+
25
+ module Packet
26
+
27
+ #
28
+ # The _datasets_ element enclosed XML data content that may have originated from an XFA form and/or
29
+ # may be intended to be consumed by an XFA form.
30
+ #
31
+ class Datasets < XFA::Element
32
+ mime_type 'text/xml'
33
+
34
+ class Data < XFA::Element
35
+ def initialize
36
+ super('xfa:data')
37
+ end
38
+ end
39
+
40
+ def initialize
41
+ super("xfa:datasets")
42
+
43
+ add_attribute 'xmlns:xfa', 'http://www.xfa.org/schema/xfa-data/1.0/'
44
+ end
45
+ end
46
+
47
+ end
48
+ end
49
+ end
@@ -0,0 +1,42 @@
1
+ =begin
2
+
3
+ This file is part of Origami, PDF manipulation framework for Ruby
4
+ Copyright (C) 2017 Guillaume Delugré.
5
+
6
+ Origami is free software: you can redistribute it and/or modify
7
+ it under the terms of the GNU Lesser General Public License as published by
8
+ the Free Software Foundation, either version 3 of the License, or
9
+ (at your option) any later version.
10
+
11
+ Origami is distributed in the hope that it will be useful,
12
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ GNU Lesser General Public License for more details.
15
+
16
+ You should have received a copy of the GNU Lesser General Public License
17
+ along with Origami. If not, see <http://www.gnu.org/licenses/>.
18
+
19
+ =end
20
+
21
+ module Origami
22
+
23
+ module XDP
24
+
25
+ module Packet
26
+
27
+ #
28
+ # The _localeSet_ packet encloses information about locales.
29
+ #
30
+ class LocaleSet < XFA::Element
31
+ mime_type 'text/xml'
32
+
33
+ def initialize
34
+ super("localeSet")
35
+
36
+ add_attribute 'xmlns', 'http://www.xfa.org/schema/xfa-locale-set/2.7/'
37
+ end
38
+ end
39
+
40
+ end
41
+ end
42
+ end