podoff 0.9.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.txt +10 -0
- data/README.md +3 -0
- data/lib/podoff.rb +400 -129
- data/spec/core_spec.rb +47 -0
- data/spec/document_spec.rb +198 -15
- data/spec/obj_spec.rb +153 -99
- data/spec/stream_spec.rb +67 -0
- data/spec/update_spec.rb +18 -18
- data/todo.txt +13 -0
- metadata +4 -2
data/spec/update_spec.rb
CHANGED
@@ -12,25 +12,25 @@ describe Podoff do
|
|
12
12
|
|
13
13
|
before :all do
|
14
14
|
|
15
|
-
|
15
|
+
#@d0 = Podoff.load('pdfs/udocument0.pdf')
|
16
|
+
#@t0 = Podoff.load('pdfs/t0.pdf')
|
16
17
|
end
|
17
18
|
|
18
|
-
describe 'Obj
|
19
|
-
|
20
|
-
it '
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
end
|
19
|
+
# describe 'Obj#add_free_text' do
|
20
|
+
#
|
21
|
+
# it 'annotates an object with free text' do
|
22
|
+
#
|
23
|
+
# doc = @t0.dup
|
24
|
+
# page = doc.page(1)
|
25
|
+
#
|
26
|
+
# puts page.source
|
27
|
+
# page.add_free_text(100, 100, 'free text', :helvetica, 15)
|
28
|
+
#
|
29
|
+
# expect(doc.objs.size).to eq(7)
|
30
|
+
# expect(doc.additions.size).to eq(2)
|
31
|
+
#
|
32
|
+
# doc.write('tmp/out.pdf')
|
33
|
+
# end
|
34
|
+
# end
|
35
35
|
end
|
36
36
|
|
data/todo.txt
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
|
2
|
+
[ ] stop using the st-mark thing
|
3
|
+
[ ] doc.add_stream { |st| st.bt ... }
|
4
|
+
|
5
|
+
[o] st = d.addstream
|
6
|
+
st.tf '/helv', 12
|
7
|
+
st.bt 5, 6, "hello"
|
8
|
+
d.write('out.pdf') # closes the stream...
|
9
|
+
[ ] fail if insert_content or insert_font on an unclosed stream obj
|
10
|
+
|
11
|
+
[ ] recompress idea? uncompress with pdftk, recompress with podoff
|
12
|
+
smaller docs anyway...
|
13
|
+
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: podoff
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-10-
|
12
|
+
date: 2015-10-23 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
@@ -56,10 +56,12 @@ files:
|
|
56
56
|
- spec/document_spec.rb
|
57
57
|
- spec/obj_spec.rb
|
58
58
|
- spec/spec_helper.rb
|
59
|
+
- spec/stream_spec.rb
|
59
60
|
- spec/update_spec.rb
|
60
61
|
- podoff.gemspec
|
61
62
|
- CHANGELOG.txt
|
62
63
|
- LICENSE.txt
|
64
|
+
- todo.txt
|
63
65
|
- README.md
|
64
66
|
homepage: http://github.com/jmettraux/podoff
|
65
67
|
licenses:
|