jpdfunite 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ec025dc9246d7835e24e555112b1c3f88662255f
4
- data.tar.gz: eac2644fd83fddcc5ebfd154a2486960580f09e0
3
+ metadata.gz: 2266af949356c62fe328a2a8b549712260d2ecf0
4
+ data.tar.gz: a9f37f918d26e22c6295770bfb1e040574afb555
5
5
  SHA512:
6
- metadata.gz: e854c5d843e1e7442f1ada129fc2fd8dd872168561a95372328a3bd563c38b563cec871e315e790f1feed3b304264fb1f128c11132f82364ee4b167689084b87
7
- data.tar.gz: 67643a0b3bf30f3320796824628cc39d24efcbeb51ffbcd0c966e42ded32cbece0604b55a4526ff72ce86b5591281618e41c71094f0f435e860fa47b59b5bec6
6
+ metadata.gz: 93eb6e2e1e5a88392f890671de39c19e6516b28f7e3cef9297029e057122b3067d62d59ddd56f62b6595a0996c08182743d19507d5356d4dedf466ead7f7469d
7
+ data.tar.gz: cb3bfa22469692fd3a0974953b8694297ffdf7298bb58f003d5fa104a50f13c1783ce470efb6daf5200cd9f82206a1935c2ce7cfb8259a7929adb67884a3604a
data/README.md CHANGED
@@ -38,9 +38,9 @@ section. Here is an example that combines three PDF files into one:
38
38
 
39
39
  ``` ruby
40
40
  require 'jpdfunite'
41
- file_one = Jpdfunite::PdfFile.new("lab7markup.pdf")
42
- file_two = Jpdfunite::PdfFile.new("macorm.pdf")
43
- file_three = Jpdfunite::PdfFile.new("discrete_math_textbook.pdf")
41
+ file_one = Jpdfunite::PdfFile.new("file_one.pdf")
42
+ file_two = Jpdfunite::PdfFile.new("file_two.pdf")
43
+ file_three = Jpdfunite::PdfFile.new("file_three.pdf")
44
44
  sec_one = Jpdfunite::Section.new("Section One")
45
45
  sec_two = Jpdfunite::Section.new("Section Two")
46
46
  document = Jpdfunite::Outline.new("Combined Files")
@@ -49,8 +49,10 @@ sec_one.add_mark(file_two)
49
49
  sec_two.add_mark(file_three)
50
50
  document.add_mark(sec_one)
51
51
  document.add_mark(sec_two)
52
- outfile = Jpdfunite::combine(document)
53
- Jpdfunite::outline(outfile, document)
52
+ Jpdfunite.create(document)
53
+ # Or do one at a time
54
+ outfile = Jpdfunite.combine(document)
55
+ Jpdfunite.outline(outfile, document)
54
56
  ```
55
57
 
56
58
  ## Contributing
@@ -1,3 +1,3 @@
1
1
  module Jpdfunite
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
data/lib/jpdfunite.rb CHANGED
@@ -5,6 +5,11 @@ require 'tempfile'
5
5
  module Jpdfunite
6
6
 
7
7
  class << self
8
+
9
+ def create(pdf_outline)
10
+ sans_outline = combine(pdf_outline)
11
+ outline(sans_outline, pdf_outline)
12
+ end
8
13
 
9
14
  def combine(pdf_outline)
10
15
  sans_outline = Tempfile.new("pdfgs")
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jpdfunite
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ricardo Piro-Rael