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/spec/update_spec.rb CHANGED
@@ -12,25 +12,25 @@ describe Podoff do
12
12
 
13
13
  before :all do
14
14
 
15
- @d = Podoff.load('pdfs/udocument0.pdf')
15
+ #@d0 = Podoff.load('pdfs/udocument0.pdf')
16
+ #@t0 = Podoff.load('pdfs/t0.pdf')
16
17
  end
17
18
 
18
- describe 'Obj.prepend_text' do
19
-
20
- it 'adds text at the beginning of an obj' do
21
-
22
- d = @d.dup
23
-
24
- p1 = d.page(1)
25
- p1.prepend_text(0, 500, 'hello world! xxx', size: 35, font: 'Helv')
26
- #p1.prepend_text(0, 450, '"stuff NADA"', size: 35, font: 'Helv')
27
-
28
- d.write('tmp/out.pdf')
29
-
30
- s = `grep -a "hello world!" tmp/out.pdf`.strip
31
-
32
- expect(s).to eq('BT 0 500 Td /Helv 35 Tf (hello world! xxx)Tj ET')
33
- end
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.9.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-21 00:00:00.000000000 Z
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: