origami 1.2.4 → 1.2.5
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.
- data/bin/gui/about.rb +2 -2
- data/bin/gui/config.rb +1 -1
- data/bin/gui/file.rb +1 -1
- data/bin/gui/gtkhex.rb +2 -2
- data/bin/gui/hexview.rb +1 -1
- data/bin/gui/imgview.rb +1 -1
- data/bin/gui/menu.rb +1 -1
- data/bin/gui/properties.rb +1 -2
- data/bin/gui/signing.rb +1 -1
- data/bin/gui/textview.rb +1 -1
- data/bin/gui/treeview.rb +1 -1
- data/bin/gui/walker.rb +1 -1
- data/bin/gui/xrefs.rb +1 -1
- data/lib/origami/3d.rb +1 -1
- data/lib/origami/acroform.rb +1 -1
- data/lib/origami/actions.rb +1 -1
- data/lib/origami/annotations.rb +4 -4
- data/lib/origami/array.rb +1 -1
- data/lib/origami/boolean.rb +1 -1
- data/lib/origami/catalog.rb +1 -1
- data/lib/origami/destinations.rb +1 -1
- data/lib/origami/dictionary.rb +1 -1
- data/lib/origami/encryption.rb +1 -1
- data/lib/origami/export.rb +1 -1
- data/lib/origami/extensions/fdf.rb +1 -1
- data/lib/origami/extensions/ppklite.rb +1 -1
- data/lib/origami/file.rb +23 -17
- data/lib/origami/filters/ascii.rb +3 -1
- data/lib/origami/filters/ccitt.rb +2 -1
- data/lib/origami/filters/crypt.rb +1 -1
- data/lib/origami/filters/dct.rb +1 -1
- data/lib/origami/filters/flate.rb +2 -1
- data/lib/origami/filters/jbig2.rb +1 -1
- data/lib/origami/filters/jpx.rb +1 -1
- data/lib/origami/filters/lzw.rb +1 -1
- data/lib/origami/filters/predictors.rb +1 -1
- data/lib/origami/filters/runlength.rb +2 -1
- data/lib/origami/filters.rb +1 -1
- data/lib/origami/font.rb +1 -1
- data/lib/origami/functions.rb +1 -1
- data/lib/origami/graphics/colors.rb +1 -1
- data/lib/origami/graphics/instruction.rb +3 -3
- data/lib/origami/graphics/path.rb +1 -1
- data/lib/origami/graphics/patterns.rb +1 -1
- data/lib/origami/graphics/render.rb +1 -1
- data/lib/origami/graphics/state.rb +1 -1
- data/lib/origami/graphics/text.rb +1 -1
- data/lib/origami/graphics/xobject.rb +1 -1
- data/lib/origami/graphics.rb +1 -1
- data/lib/origami/header.rb +1 -1
- data/lib/origami/javascript.rb +1 -1
- data/lib/origami/linearization.rb +1 -1
- data/lib/origami/metadata.rb +1 -1
- data/lib/origami/name.rb +2 -2
- data/lib/origami/null.rb +1 -1
- data/lib/origami/numeric.rb +8 -2
- data/lib/origami/object.rb +96 -6
- data/lib/origami/outline.rb +1 -1
- data/lib/origami/outputintents.rb +4 -0
- data/lib/origami/page.rb +16 -1
- data/lib/origami/parser.rb +16 -5
- data/lib/origami/parsers/pdf.rb +1 -1
- data/lib/origami/pdf.rb +26 -3
- data/lib/origami/reference.rb +4 -0
- data/lib/origami/signature.rb +4 -0
- data/lib/origami/stream.rb +13 -2
- data/lib/origami/string.rb +4 -0
- data/lib/origami/trailer.rb +4 -0
- data/lib/origami/webcapture.rb +4 -0
- data/lib/origami/xfa.rb +1 -1
- data/lib/origami/xreftable.rb +4 -0
- data/test/ts_pdf.rb +6 -1
- metadata +30 -30
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
= Info
|
7
7
|
This file is part of Origami, PDF manipulation framework for Ruby
|
8
|
-
Copyright (C) 2010 Guillaume Delugré <guillaume
|
8
|
+
Copyright (C) 2010 Guillaume Delugré <guillaume AT security-labs DOT org>
|
9
9
|
All right reserved.
|
10
10
|
|
11
11
|
Origami is free software: you can redistribute it and/or modify
|
data/lib/origami/graphics.rb
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
= Info
|
7
7
|
This file is part of Origami, PDF manipulation framework for Ruby
|
8
|
-
Copyright (C) 2010 Guillaume
|
8
|
+
Copyright (C) 2010 Guillaume Delugré <guillaume AT security-labs DOT org>
|
9
9
|
All right reserved.
|
10
10
|
|
11
11
|
Origami is free software: you can redistribute it and/or modify
|
data/lib/origami/header.rb
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
= Info
|
7
7
|
This file is part of Origami, PDF manipulation framework for Ruby
|
8
|
-
Copyright (C) 2010 Guillaume
|
8
|
+
Copyright (C) 2010 Guillaume Delugré <guillaume AT security-labs DOT org>
|
9
9
|
All right reserved.
|
10
10
|
|
11
11
|
Origami is free software: you can redistribute it and/or modify
|
data/lib/origami/javascript.rb
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
= Info
|
7
7
|
This file is part of Origami, PDF manipulation framework for Ruby
|
8
|
-
Copyright (C) 2010 Guillaume Delugré <guillaume
|
8
|
+
Copyright (C) 2010 Guillaume Delugré <guillaume AT security-labs DOT org>
|
9
9
|
All right reserved.
|
10
10
|
|
11
11
|
Origami is free software: you can redistribute it and/or modify
|
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
= Info
|
7
7
|
This file is part of Origami, PDF manipulation framework for Ruby
|
8
|
-
Copyright (C) 2010 Guillaume
|
8
|
+
Copyright (C) 2010 Guillaume Delugré <guillaume AT security-labs DOT org>
|
9
9
|
All right reserved.
|
10
10
|
|
11
11
|
Origami is free software: you can redistribute it and/or modify
|
data/lib/origami/metadata.rb
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
= Info
|
7
7
|
This file is part of Origami, PDF manipulation framework for Ruby
|
8
|
-
Copyright (C) 2010 Guillaume Delugré <guillaume
|
8
|
+
Copyright (C) 2010 Guillaume Delugré <guillaume AT security-labs DOT org>
|
9
9
|
All right reserved.
|
10
10
|
|
11
11
|
Origami is free software: you can redistribute it and/or modify
|
data/lib/origami/name.rb
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
= Info
|
7
7
|
This file is part of Origami, PDF manipulation framework for Ruby
|
8
|
-
Copyright (C) 2010 Guillaume Delugré <guillaume
|
8
|
+
Copyright (C) 2010 Guillaume Delugré <guillaume AT security-labs DOT org>
|
9
9
|
All right reserved.
|
10
10
|
|
11
11
|
Origami is free software: you can redistribute it and/or modify
|
@@ -92,7 +92,7 @@ module Origami
|
|
92
92
|
end
|
93
93
|
|
94
94
|
def ==(object) #:nodoc:
|
95
|
-
@value.to_sym == object
|
95
|
+
self.eql?(object) or @value.to_sym == object
|
96
96
|
end
|
97
97
|
|
98
98
|
def eql?(object) #:nodoc:
|
data/lib/origami/null.rb
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
= Info
|
7
7
|
This file is part of Origami, PDF manipulation framework for Ruby
|
8
|
-
Copyright (C) 2010 Guillaume
|
8
|
+
Copyright (C) 2010 Guillaume Delugré <guillaume AT security-labs DOT org>
|
9
9
|
All right reserved.
|
10
10
|
|
11
11
|
Origami is free software: you can redistribute it and/or modify
|
data/lib/origami/numeric.rb
CHANGED
@@ -4,6 +4,10 @@
|
|
4
4
|
numeric.rb
|
5
5
|
|
6
6
|
= Info
|
7
|
+
This file is part of Origami, PDF manipulation framework for Ruby
|
8
|
+
Copyright (C) 2010 Guillaume Delugré <guillaume AT security-labs DOT org>
|
9
|
+
All right reserved.
|
10
|
+
|
7
11
|
Origami is free software: you can redistribute it and/or modify
|
8
12
|
it under the terms of the GNU Lesser General Public License as published by
|
9
13
|
the Free Software Foundation, either version 3 of the License, or
|
@@ -133,7 +137,6 @@ module Origami
|
|
133
137
|
end
|
134
138
|
|
135
139
|
alias value to_i
|
136
|
-
|
137
140
|
end
|
138
141
|
|
139
142
|
class InvalidRealObjectError < InvalidObjectError #:nodoc:
|
@@ -182,7 +185,10 @@ module Origami
|
|
182
185
|
end
|
183
186
|
|
184
187
|
alias value to_f
|
185
|
-
|
188
|
+
|
189
|
+
def to_s
|
190
|
+
sprintf("%f", self).sub(/\.0*$|(\.\d*[^0])0*$/, '\1')
|
191
|
+
end
|
186
192
|
end
|
187
193
|
|
188
194
|
end
|
data/lib/origami/object.rb
CHANGED
@@ -4,6 +4,10 @@
|
|
4
4
|
object.rb
|
5
5
|
|
6
6
|
= Info
|
7
|
+
This file is part of Origami, PDF manipulation framework for Ruby
|
8
|
+
Copyright (C) 2010 Guillaume Delugré <guillaume AT security-labs DOT org>
|
9
|
+
All right reserved.
|
10
|
+
|
7
11
|
Origami is free software: you can redistribute it and/or modify
|
8
12
|
it under the terms of the GNU Lesser General Public License as published by
|
9
13
|
the Free Software Foundation, either version 3 of the License, or
|
@@ -276,12 +280,16 @@ module Origami
|
|
276
280
|
# Sets whether the object is indirect or not.
|
277
281
|
# Indirect objects are allocated numbers at build time.
|
278
282
|
#
|
279
|
-
def set_indirect(
|
280
|
-
unless
|
283
|
+
def set_indirect(bool)
|
284
|
+
unless bool == true or bool == false
|
281
285
|
raise TypeError, "The argument must be boolean"
|
282
286
|
end
|
283
|
-
|
284
|
-
|
287
|
+
|
288
|
+
if not bool
|
289
|
+
@no = @generation = 0
|
290
|
+
@pdf = nil
|
291
|
+
end
|
292
|
+
@indirect = bool
|
285
293
|
self
|
286
294
|
end
|
287
295
|
|
@@ -319,7 +327,20 @@ module Origami
|
|
319
327
|
# Deep copy of an object.
|
320
328
|
#
|
321
329
|
def copy
|
322
|
-
|
330
|
+
saved_pdf = @pdf
|
331
|
+
saved_parent = @parent
|
332
|
+
@pdf = @parent = nil # do not process parent object and document in the copy
|
333
|
+
|
334
|
+
# Perform the recursive copy (quite dirty).
|
335
|
+
copyobj = Marshal.load(Marshal.dump(self))
|
336
|
+
|
337
|
+
# restore saved values
|
338
|
+
@pdf = saved_pdf
|
339
|
+
@parent = saved_parent
|
340
|
+
copyobj.set_pdf(saved_pdf)
|
341
|
+
copyobj.parent = parent
|
342
|
+
|
343
|
+
copyobj
|
323
344
|
end
|
324
345
|
|
325
346
|
#
|
@@ -370,6 +391,76 @@ module Origami
|
|
370
391
|
xref_cache[self.reference]
|
371
392
|
end
|
372
393
|
|
394
|
+
#
|
395
|
+
# Creates an exportable version of current object.
|
396
|
+
# The exportable version is a copy of _self_ with solved references, no owning PDF and no parent.
|
397
|
+
# References to Catalog or PageTreeNode objects have been destroyed.
|
398
|
+
#
|
399
|
+
# When exported, an object can be moved into another document without hassle.
|
400
|
+
#
|
401
|
+
def export
|
402
|
+
exported_obj = self.logicalize
|
403
|
+
exported_obj.no = exported_obj.generation = 0
|
404
|
+
exported_obj.set_pdf(nil) if exported_obj.is_indirect?
|
405
|
+
exported_obj.parent = nil
|
406
|
+
|
407
|
+
exported_obj
|
408
|
+
end
|
409
|
+
|
410
|
+
#
|
411
|
+
# Returns a logicalized copy of _self_.
|
412
|
+
# See logicalize!
|
413
|
+
#
|
414
|
+
def logicalize #:nodoc:
|
415
|
+
self.copy.logicalize!
|
416
|
+
end
|
417
|
+
|
418
|
+
#
|
419
|
+
# Transforms recursively every references to the copy of their respective object.
|
420
|
+
# Catalog and PageTreeNode objects are excluded to limit the recursion.
|
421
|
+
#
|
422
|
+
def logicalize! #:nodoc:
|
423
|
+
|
424
|
+
def resolve_all_references(obj, browsed = [], ref_cache = {})
|
425
|
+
return if browsed.include?(obj)
|
426
|
+
browsed.push(obj)
|
427
|
+
|
428
|
+
if obj.is_a?(ObjectStream)
|
429
|
+
obj.each do |subobj|
|
430
|
+
resolve_all_references(obj, browsed, ref_cache)
|
431
|
+
end
|
432
|
+
end
|
433
|
+
|
434
|
+
if obj.is_a?(Dictionary) or obj.is_a?(Array)
|
435
|
+
obj.map! do |subobj|
|
436
|
+
if subobj.is_a?(Reference)
|
437
|
+
new_obj =
|
438
|
+
if ref_cache.has_key?(subobj)
|
439
|
+
ref_cache[subobj]
|
440
|
+
else
|
441
|
+
ref_cache[subobj] = subobj.solve.copy
|
442
|
+
end
|
443
|
+
new_obj.no = new_obj.generation = 0
|
444
|
+
new_obj.parent = obj
|
445
|
+
|
446
|
+
new_obj unless new_obj.is_a?(Catalog) or new_obj.is_a?(PageTreeNode)
|
447
|
+
else
|
448
|
+
subobj
|
449
|
+
end
|
450
|
+
end
|
451
|
+
|
452
|
+
obj.each do |subobj|
|
453
|
+
resolve_all_references(subobj, browsed, ref_cache)
|
454
|
+
end
|
455
|
+
|
456
|
+
elsif obj.is_a?(Stream)
|
457
|
+
resolve_all_references(obj.dictionary, browsed, ref_cache)
|
458
|
+
end
|
459
|
+
end
|
460
|
+
|
461
|
+
resolve_all_references(self)
|
462
|
+
end
|
463
|
+
|
373
464
|
#
|
374
465
|
# Returns the indirect object which contains this object.
|
375
466
|
# If the current object is already indirect, returns self.
|
@@ -530,5 +621,4 @@ module Origami
|
|
530
621
|
alias output to_s
|
531
622
|
|
532
623
|
end
|
533
|
-
|
534
624
|
end
|
data/lib/origami/outline.rb
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
= Info
|
7
7
|
This file is part of Origami, PDF manipulation framework for Ruby
|
8
|
-
Copyright (C) 2010 Guillaume Delugré <guillaume
|
8
|
+
Copyright (C) 2010 Guillaume Delugré <guillaume AT security-labs DOT org>
|
9
9
|
All right reserved.
|
10
10
|
|
11
11
|
Origami is free software: you can redistribute it and/or modify
|
@@ -4,6 +4,10 @@
|
|
4
4
|
outputintents.rb
|
5
5
|
|
6
6
|
= Info
|
7
|
+
This file is part of Origami, PDF manipulation framework for Ruby
|
8
|
+
Copyright (C) 2010 Guillaume Delugré <guillaume AT security-labs DOT org>
|
9
|
+
All right reserved.
|
10
|
+
|
7
11
|
Origami is free software: you can redistribute it and/or modify
|
8
12
|
it under the terms of the GNU Lesser General Public License as published by
|
9
13
|
the Free Software Foundation, either version 3 of the License, or
|
data/lib/origami/page.rb
CHANGED
@@ -4,6 +4,10 @@
|
|
4
4
|
page.rb
|
5
5
|
|
6
6
|
= Info
|
7
|
+
This file is part of Origami, PDF manipulation framework for Ruby
|
8
|
+
Copyright (C) 2010 Guillaume Delugré <guillaume AT security-labs DOT org>
|
9
|
+
All right reserved.
|
10
|
+
|
7
11
|
Origami is free software: you can redistribute it and/or modify
|
8
12
|
it under the terms of the GNU Lesser General Public License as published by
|
9
13
|
the Free Software Foundation, either version 3 of the License, or
|
@@ -25,7 +29,15 @@ module Origami
|
|
25
29
|
|
26
30
|
def append_page(page = Page.new, *more)
|
27
31
|
raise InvalidPDFError, "Invalid page tree" if not self.Catalog or not self.Catalog.Pages or not self.Catalog.Pages.is_a?(PageTreeNode)
|
28
|
-
|
32
|
+
|
33
|
+
pages = [ page ].concat(more).map! do |pg|
|
34
|
+
if pg.pdf and pg.pdf != self
|
35
|
+
# Page from another document must be exported.
|
36
|
+
pg.export
|
37
|
+
else
|
38
|
+
pg
|
39
|
+
end
|
40
|
+
end
|
29
41
|
|
30
42
|
treeroot = self.Catalog.Pages
|
31
43
|
|
@@ -43,6 +55,9 @@ module Origami
|
|
43
55
|
def insert_page(index, page)
|
44
56
|
raise InvalidPDFError, "Invalid page tree" if not self.Catalog or not self.Catalog.Pages or not self.Catalog.Pages.is_a?(PageTreeNode)
|
45
57
|
|
58
|
+
# Page from another document must be exported.
|
59
|
+
page = page.export if page.pdf and page.pdf != self
|
60
|
+
|
46
61
|
self.Catalog.Pages.insert_page(index, page)
|
47
62
|
self
|
48
63
|
end
|
data/lib/origami/parser.rb
CHANGED
@@ -4,6 +4,10 @@
|
|
4
4
|
parser.rb
|
5
5
|
|
6
6
|
= Info
|
7
|
+
This file is part of Origami, PDF manipulation framework for Ruby
|
8
|
+
Copyright (C) 2010 Guillaume Delugré <guillaume AT security-labs DOT org>
|
9
|
+
All right reserved.
|
10
|
+
|
7
11
|
Origami is free software: you can redistribute it and/or modify
|
8
12
|
it under the terms of the GNU Lesser General Public License as published by
|
9
13
|
the Free Software Foundation, either version 3 of the License, or
|
@@ -28,9 +32,9 @@ module Origami
|
|
28
32
|
if RUBY_PLATFORM =~ /win32/ or RUBY_PLATFORM =~ /mingw32/
|
29
33
|
require "Win32API"
|
30
34
|
|
31
|
-
getStdHandle = Win32API.new("kernel32", "GetStdHandle",
|
32
|
-
@@
|
33
|
-
|
35
|
+
getStdHandle = Win32API.new("kernel32", "GetStdHandle", 'L', 'L')
|
36
|
+
@@getConsoleScreenBufferInfo = Win32API.new("kernel32", "GetConsoleScreenBufferInfo", 'LP', 'L')
|
37
|
+
@@setConsoleTextAttribute = Win32API.new("kernel32", "SetConsoleTextAttribute", 'LN', 'I')
|
34
38
|
@@hOut = getStdHandle.call(-11)
|
35
39
|
end
|
36
40
|
|
@@ -68,10 +72,17 @@ module Origami
|
|
68
72
|
|
69
73
|
def self.set_fg_color(color, bright = false, fd = STDOUT) #:nodoc:
|
70
74
|
if RUBY_PLATFORM =~ /win32/ or RUBY_PLATFORM =~ /mingw32/
|
71
|
-
|
75
|
+
screen_info = "\x00" * 30
|
76
|
+
current =
|
77
|
+
if @@getConsoleScreenBufferInfo.call(@@hOut, screen_info) == 1
|
78
|
+
screen_info[8,2].unpack('v')[0]
|
79
|
+
else
|
80
|
+
Colors::GREY
|
81
|
+
end
|
82
|
+
color |= Colors::WHITE if bright
|
72
83
|
@@setConsoleTextAttribute.call(@@hOut, color)
|
73
84
|
yield
|
74
|
-
@@setConsoleTextAttribute.call(@@hOut,
|
85
|
+
@@setConsoleTextAttribute.call(@@hOut, current)
|
75
86
|
else
|
76
87
|
col, nocol = [color, Colors::GREY].map! { |key| "\033[#{key}m" }
|
77
88
|
fd << col
|
data/lib/origami/parsers/pdf.rb
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
= Info
|
7
7
|
This file is part of Origami, PDF manipulation framework for Ruby
|
8
|
-
Copyright (C) 2010 Guillaume Delugré <guillaume
|
8
|
+
Copyright (C) 2010 Guillaume Delugré <guillaume AT security-labs DOT org>
|
9
9
|
All right reserved.
|
10
10
|
|
11
11
|
Origami is free software: you can redistribute it and/or modify
|
data/lib/origami/pdf.rb
CHANGED
@@ -4,6 +4,10 @@
|
|
4
4
|
pdf.rb
|
5
5
|
|
6
6
|
= Info
|
7
|
+
This file is part of Origami, PDF manipulation framework for Ruby
|
8
|
+
Copyright (C) 2010 Guillaume Delugré <guillaume AT security-labs DOT org>
|
9
|
+
All right reserved.
|
10
|
+
|
7
11
|
Origami is free software: you can redistribute it and/or modify
|
8
12
|
it under the terms of the GNU Lesser General Public License as published by
|
9
13
|
the Free Software Foundation, either version 3 of the License, or
|
@@ -61,8 +65,8 @@ require 'origami/parsers/pdf'
|
|
61
65
|
|
62
66
|
module Origami
|
63
67
|
|
64
|
-
VERSION = "1.2.
|
65
|
-
REVISION = "$Revision$" #:nodoc:
|
68
|
+
VERSION = "1.2.5"
|
69
|
+
REVISION = "$Revision: rev 167/, 2013/01/28 11:59:28 $" #:nodoc:
|
66
70
|
|
67
71
|
#
|
68
72
|
# Global options for Origami.
|
@@ -511,10 +515,29 @@ module Origami
|
|
511
515
|
# _object_:: The object to add.
|
512
516
|
#
|
513
517
|
def <<(object)
|
514
|
-
|
518
|
+
owner = object.pdf
|
519
|
+
|
520
|
+
#
|
521
|
+
# Does object belongs to another PDF ?
|
522
|
+
#
|
523
|
+
if owner and not owner.equal?(self)
|
524
|
+
import object
|
525
|
+
else
|
526
|
+
add_to_revision(object, @revisions.last)
|
527
|
+
end
|
515
528
|
end
|
516
529
|
alias :insert :<<
|
517
530
|
|
531
|
+
#
|
532
|
+
# Similar to PDF#insert or PDF#<<, but for an object belonging to another document.
|
533
|
+
# Object will be recursively copied and new version numbers will be assigned.
|
534
|
+
# Returns the new reference to the imported object.
|
535
|
+
# _object_:: The object to import.
|
536
|
+
#
|
537
|
+
def import(object)
|
538
|
+
self.insert(object.export)
|
539
|
+
end
|
540
|
+
|
518
541
|
#
|
519
542
|
# Adds a new object to a specific revision.
|
520
543
|
# If this object has no version number, then a new one will be automatically computed and assignated to him.
|
data/lib/origami/reference.rb
CHANGED
@@ -4,6 +4,10 @@
|
|
4
4
|
reference.rb
|
5
5
|
|
6
6
|
= Info
|
7
|
+
This file is part of Origami, PDF manipulation framework for Ruby
|
8
|
+
Copyright (C) 2010 Guillaume Delugré <guillaume AT security-labs DOT org>
|
9
|
+
All right reserved.
|
10
|
+
|
7
11
|
Origami is free software: you can redistribute it and/or modify
|
8
12
|
it under the terms of the GNU Lesser General Public License as published by
|
9
13
|
the Free Software Foundation, either version 3 of the License, or
|
data/lib/origami/signature.rb
CHANGED
@@ -4,6 +4,10 @@
|
|
4
4
|
signature.rb
|
5
5
|
|
6
6
|
= Info
|
7
|
+
This file is part of Origami, PDF manipulation framework for Ruby
|
8
|
+
Copyright (C) 2010 Guillaume Delugré <guillaume AT security-labs DOT org>
|
9
|
+
All right reserved.
|
10
|
+
|
7
11
|
Origami is free software: you can redistribute it and/or modify
|
8
12
|
it under the terms of the GNU Lesser General Public License as published by
|
9
13
|
the Free Software Foundation, either version 3 of the License, or
|
data/lib/origami/stream.rb
CHANGED
@@ -4,6 +4,10 @@
|
|
4
4
|
stream.rb
|
5
5
|
|
6
6
|
= Info
|
7
|
+
This file is part of Origami, PDF manipulation framework for Ruby
|
8
|
+
Copyright (C) 2010 Guillaume Delugré <guillaume AT security-labs DOT org>
|
9
|
+
All right reserved.
|
10
|
+
|
7
11
|
Origami is free software: you can redistribute it and/or modify
|
8
12
|
it under the terms of the GNU Lesser General Public License as published by
|
9
13
|
the Free Software Foundation, either version 3 of the License, or
|
@@ -54,7 +58,15 @@ module Origami
|
|
54
58
|
:CCITTFaxDecode,
|
55
59
|
:JBIG2Decode,
|
56
60
|
:DCTDecode,
|
57
|
-
:JPXDecode
|
61
|
+
:JPXDecode,
|
62
|
+
# abbrev
|
63
|
+
:AHx, # ASCIIHexDecode
|
64
|
+
:A85, # ASCII85Decode
|
65
|
+
:LZW, # LZWDecode
|
66
|
+
:Fl, # FlateDecode
|
67
|
+
:RL, # RunLengthDecode
|
68
|
+
:CCF, # CCITTFaxDecode
|
69
|
+
:DCT, # DCTDecode
|
58
70
|
]
|
59
71
|
|
60
72
|
attr_accessor :dictionary
|
@@ -366,7 +378,6 @@ module Origami
|
|
366
378
|
end
|
367
379
|
|
368
380
|
Origami::Filter.const_get(filter.value.to_s.sub(/Decode$/,"")).decode(data, params)
|
369
|
-
|
370
381
|
end
|
371
382
|
|
372
383
|
def encode_data(data, filter, params) #:nodoc:
|
data/lib/origami/string.rb
CHANGED
@@ -4,6 +4,10 @@
|
|
4
4
|
string.rb
|
5
5
|
|
6
6
|
= Info
|
7
|
+
This file is part of Origami, PDF manipulation framework for Ruby
|
8
|
+
Copyright (C) 2010 Guillaume Delugré <guillaume AT security-labs DOT org>
|
9
|
+
All right reserved.
|
10
|
+
|
7
11
|
Origami is free software: you can redistribute it and/or modify
|
8
12
|
it under the terms of the GNU Lesser General Public License as published by
|
9
13
|
the Free Software Foundation, either version 3 of the License, or
|
data/lib/origami/trailer.rb
CHANGED
@@ -4,6 +4,10 @@
|
|
4
4
|
trailer.rb
|
5
5
|
|
6
6
|
= Info
|
7
|
+
This file is part of Origami, PDF manipulation framework for Ruby
|
8
|
+
Copyright (C) 2010 Guillaume Delugré <guillaume AT security-labs DOT org>
|
9
|
+
All right reserved.
|
10
|
+
|
7
11
|
Origami is free software: you can redistribute it and/or modify
|
8
12
|
it under the terms of the GNU Lesser General Public License as published by
|
9
13
|
the Free Software Foundation, either version 3 of the License, or
|
data/lib/origami/webcapture.rb
CHANGED
@@ -4,6 +4,10 @@
|
|
4
4
|
webcapture.rb
|
5
5
|
|
6
6
|
= Info
|
7
|
+
This file is part of Origami, PDF manipulation framework for Ruby
|
8
|
+
Copyright (C) 2010 Guillaume Delugré <guillaume AT security-labs DOT org>
|
9
|
+
All right reserved.
|
10
|
+
|
7
11
|
Origami is free software: you can redistribute it and/or modify
|
8
12
|
it under the terms of the GNU Lesser General Public License as published by
|
9
13
|
the Free Software Foundation, either version 3 of the License, or
|
data/lib/origami/xfa.rb
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
= Info
|
7
7
|
This file is part of Origami, PDF manipulation framework for Ruby
|
8
|
-
Copyright (C) 2010 Guillaume
|
8
|
+
Copyright (C) 2010 Guillaume Delugré <guillaume AT security-labs DOT org>
|
9
9
|
All right reserved.
|
10
10
|
|
11
11
|
Origami is free software: you can redistribute it and/or modify
|
data/lib/origami/xreftable.rb
CHANGED
@@ -4,6 +4,10 @@
|
|
4
4
|
xreftable.rb
|
5
5
|
|
6
6
|
= Info
|
7
|
+
This file is part of Origami, PDF manipulation framework for Ruby
|
8
|
+
Copyright (C) 2010 Guillaume Delugré <guillaume AT security-labs DOT org>
|
9
|
+
All right reserved.
|
10
|
+
|
7
11
|
Origami is free software: you can redistribute it and/or modify
|
8
12
|
it under the terms of the GNU Lesser General Public License as published by
|
9
13
|
the Free Software Foundation, either version 3 of the License, or
|