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 +4 -4
- data/README.md +7 -5
- data/lib/jpdfunite/version.rb +1 -1
- data/lib/jpdfunite.rb +5 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2266af949356c62fe328a2a8b549712260d2ecf0
|
4
|
+
data.tar.gz: a9f37f918d26e22c6295770bfb1e040574afb555
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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("
|
42
|
-
file_two = Jpdfunite::PdfFile.new("
|
43
|
-
file_three = Jpdfunite::PdfFile.new("
|
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
|
-
|
53
|
-
|
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
|
data/lib/jpdfunite/version.rb
CHANGED
data/lib/jpdfunite.rb
CHANGED