origami 1.2.4 → 1.2.5
Sign up to get free protection for your applications and to get access to all the features.
- 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
data/bin/gui/about.rb
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
= Info
|
7
7
|
This file is part of PDF Walker, a graphical PDF file browser
|
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
|
PDF Walker is free software: you can redistribute it and/or modify
|
@@ -34,7 +34,7 @@ module PDFWalker
|
|
34
34
|
:name => "PDF Walker",
|
35
35
|
:program_name => "PDF Walker",
|
36
36
|
:version => Origami::VERSION,
|
37
|
-
:copyright => "Copyright (C) 2010\nGuillaume Delugre <guillaume
|
37
|
+
:copyright => "Copyright (C) 2010\nGuillaume Delugre <guillaume AT security-labs DOT org>\nAll right reserved.",
|
38
38
|
:comments => "A graphical PDF parser front-end",
|
39
39
|
:license => File.read("#{File.dirname(__FILE__)}/COPYING")
|
40
40
|
})
|
data/bin/gui/config.rb
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
= Info
|
7
7
|
This file is part of PDF Walker, a graphical PDF file browser
|
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
|
PDF Walker is free software: you can redistribute it and/or modify
|
data/bin/gui/file.rb
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
= Info
|
7
7
|
This file is part of PDF Walker, a graphical PDF file browser
|
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
|
PDF Walker is free software: you can redistribute it and/or modify
|
data/bin/gui/gtkhex.rb
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
= Info
|
7
7
|
This file is part of PDF Walker, a graphical PDF file browser
|
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
|
PDF Walker is free software: you can redistribute it and/or modify
|
@@ -312,7 +312,7 @@ module Gtk
|
|
312
312
|
@adisp.show
|
313
313
|
|
314
314
|
@adj = Gtk::Adjustment.new(0, 0, 0, 0, 0, 0)
|
315
|
-
@scrollbar = VScrollbar.new(@adj)
|
315
|
+
@scrollbar = Gtk::VScrollbar.new(@adj)
|
316
316
|
@adj.signal_connect 'value_changed' do |adj|
|
317
317
|
unless @xdisp_gc.nil? or @adisp_gc.nil? or not @xdisp.drawable? or not @adisp.drawable?
|
318
318
|
|
data/bin/gui/hexview.rb
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
= Info
|
7
7
|
This file is part of PDF Walker, a graphical PDF file browser
|
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
|
PDF Walker is free software: you can redistribute it and/or modify
|
data/bin/gui/imgview.rb
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
= Info
|
7
7
|
This file is part of PDF Walker, a graphical PDF file browser
|
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
|
PDF Walker is free software: you can redistribute it and/or modify
|
data/bin/gui/menu.rb
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
= Info
|
7
7
|
This file is part of PDF Walker, a graphical PDF file browser
|
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
|
PDF Walker is free software: you can redistribute it and/or modify
|
data/bin/gui/properties.rb
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
= Info
|
7
7
|
This file is part of PDF Walker, a graphical PDF file browser
|
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
|
PDF Walker is free software: you can redistribute it and/or modify
|
@@ -23,7 +23,6 @@
|
|
23
23
|
|
24
24
|
=end
|
25
25
|
|
26
|
-
require 'iconv'
|
27
26
|
require 'digest/md5'
|
28
27
|
|
29
28
|
module PDFWalker
|
data/bin/gui/signing.rb
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
= Info
|
7
7
|
This file is part of PDF Walker, a graphical PDF file browser
|
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
|
PDF Walker is free software: you can redistribute it and/or modify
|
data/bin/gui/textview.rb
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
= Info
|
7
7
|
This file is part of PDF Walker, a graphical PDF file browser
|
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
|
PDF Walker is free software: you can redistribute it and/or modify
|
data/bin/gui/treeview.rb
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
= Info
|
7
7
|
This file is part of PDF Walker, a graphical PDF file browser
|
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
|
PDF Walker is free software: you can redistribute it and/or modify
|
data/bin/gui/walker.rb
CHANGED
@@ -7,7 +7,7 @@
|
|
7
7
|
|
8
8
|
= Info
|
9
9
|
This file is part of PDF Walker, a graphical PDF file browser
|
10
|
-
Copyright (C) 2010 Guillaume Delugré <guillaume
|
10
|
+
Copyright (C) 2010 Guillaume Delugré <guillaume AT security-labs DOT org>
|
11
11
|
All right reserved.
|
12
12
|
|
13
13
|
PDF Walker is free software: you can redistribute it and/or modify
|
data/bin/gui/xrefs.rb
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
= Info
|
7
7
|
This file is part of PDF Walker, a graphical PDF file browser
|
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
|
PDF Walker is free software: you can redistribute it and/or modify
|
data/lib/origami/3d.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/acroform.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/actions.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/annotations.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
|
@@ -347,7 +347,7 @@ module Origami
|
|
347
347
|
class Link < Annotation
|
348
348
|
|
349
349
|
#
|
350
|
-
# The annotation
|
350
|
+
# The annotations highlighting mode, the visual effect to be used when the mouse button is pressed or held down inside its active area.
|
351
351
|
#
|
352
352
|
module Highlight
|
353
353
|
# No highlighting
|
@@ -356,7 +356,7 @@ module Origami
|
|
356
356
|
# Invert the contents of the annotation rectangle.
|
357
357
|
INVERT = :I
|
358
358
|
|
359
|
-
# Invert the annotation
|
359
|
+
# Invert the annotations border.
|
360
360
|
OUTLINE = :O
|
361
361
|
|
362
362
|
# Display the annotation as if it were being pushed below the surface of the page
|
@@ -602,7 +602,7 @@ module Origami
|
|
602
602
|
# Invert the contents of the annotation rectangle.
|
603
603
|
INVERT = :I
|
604
604
|
|
605
|
-
# Invert the annotation
|
605
|
+
# Invert the annotations border.
|
606
606
|
OUTLINE = :O
|
607
607
|
|
608
608
|
# Display the annotation as if it were being pushed below the surface of the page
|
data/lib/origami/array.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/boolean.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/catalog.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/destinations.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/dictionary.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/encryption.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/export.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
|
@@ -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/file.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
|
@@ -41,30 +41,38 @@ module Origami
|
|
41
41
|
{
|
42
42
|
:Register => true, # Shall the file be registered in the name directory ?
|
43
43
|
:EmbeddedName => nil, # The inner filename of the attachment.
|
44
|
-
:Filter => :FlateDecode
|
44
|
+
:Filter => :FlateDecode, # The stream filter used to store data.
|
45
45
|
}.update(options)
|
46
46
|
|
47
|
-
if path.
|
48
|
-
|
47
|
+
if path.is_a? FileSpec
|
48
|
+
filespec = path
|
49
49
|
params[:EmbeddedName] ||= ''
|
50
50
|
else
|
51
|
-
|
52
|
-
|
53
|
-
|
51
|
+
if path.respond_to?(:read)
|
52
|
+
fd = path
|
53
|
+
params[:EmbeddedName] ||= ''
|
54
|
+
else
|
55
|
+
fd = File.open(File.expand_path(path), 'r').binmode
|
56
|
+
params[:EmbeddedName] ||= File.basename(path)
|
57
|
+
end
|
54
58
|
|
55
|
-
|
59
|
+
fstream = EmbeddedFileStream.new
|
56
60
|
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
+
if ''.respond_to? :force_encoding
|
62
|
+
fstream.data = fd.read.force_encoding('binary') # 1.9
|
63
|
+
else
|
64
|
+
fstream.data = fd.read
|
65
|
+
end
|
66
|
+
|
67
|
+
fd.close
|
68
|
+
|
69
|
+
fstream.setFilter(params[:Filter])
|
70
|
+
filespec = FileSpec.new(:F => fstream)
|
61
71
|
end
|
62
72
|
|
63
|
-
fstream.setFilter(params[:Filter])
|
64
|
-
|
65
73
|
name = params[:EmbeddedName]
|
66
74
|
fspec = FileSpec.new.setType(:Filespec).setF(name.dup).setEF(
|
67
|
-
|
75
|
+
filespec
|
68
76
|
)
|
69
77
|
|
70
78
|
register(
|
@@ -73,8 +81,6 @@ module Origami
|
|
73
81
|
fspec
|
74
82
|
) if params[:Register] == true
|
75
83
|
|
76
|
-
fd.close
|
77
|
-
|
78
84
|
fspec
|
79
85
|
end
|
80
86
|
|
@@ -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
|
@@ -63,6 +63,7 @@ module Origami
|
|
63
63
|
end
|
64
64
|
|
65
65
|
end
|
66
|
+
AHx = ASCIIHex
|
66
67
|
|
67
68
|
class InvalidASCII85StringError < InvalidFilterDataError #:nodoc:
|
68
69
|
end
|
@@ -189,6 +190,7 @@ module Origami
|
|
189
190
|
end
|
190
191
|
|
191
192
|
end
|
193
|
+
A85 = ASCII85
|
192
194
|
end
|
193
195
|
end
|
194
196
|
|
@@ -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
|
@@ -516,6 +516,7 @@ module Origami
|
|
516
516
|
bitw.write((bit_value << length) - bit_value, length)
|
517
517
|
end
|
518
518
|
end
|
519
|
+
CCF = CCITTFax
|
519
520
|
|
520
521
|
end
|
521
522
|
|
@@ -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/filters/dct.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 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
|
@@ -98,6 +98,7 @@ module Origami
|
|
98
98
|
end
|
99
99
|
|
100
100
|
end
|
101
|
+
Fl = Flate
|
101
102
|
end
|
102
103
|
end
|
103
104
|
|
@@ -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/filters/jpx.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/filters/lzw.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 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 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
|
@@ -112,6 +112,7 @@ module Origami
|
|
112
112
|
end
|
113
113
|
|
114
114
|
end
|
115
|
+
RL = RunLength
|
115
116
|
end
|
116
117
|
end
|
117
118
|
|
data/lib/origami/filters.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/font.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/functions.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
|
@@ -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 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
|
@@ -54,7 +54,7 @@ module Origami
|
|
54
54
|
end
|
55
55
|
|
56
56
|
def to_s
|
57
|
-
"#{operands.map
|
57
|
+
"#{operands.map{|op| op.to_o.to_s}.join(' ')}#{' ' unless operands.empty?}#{operator}\n"
|
58
58
|
end
|
59
59
|
|
60
60
|
class << self
|
@@ -79,7 +79,7 @@ module Origami
|
|
79
79
|
def parse(stream)
|
80
80
|
operands = []
|
81
81
|
while type = Object.typeof(stream, true)
|
82
|
-
operands.
|
82
|
+
operands.push type.parse(stream)
|
83
83
|
end
|
84
84
|
|
85
85
|
if not stream.eos?
|
@@ -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 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 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 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 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
|