combine_pdf 0.1.20 → 0.1.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +1 -2
- data/lib/combine_pdf/combine_pdf_methods.rb +1 -1
- data/lib/combine_pdf/combine_pdf_pdf.rb +6 -5
- data/lib/combine_pdf/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: de5890a0bbc35644a9438b7b2c34aeb562edd59f
|
4
|
+
data.tar.gz: e7af63840188c28b12515c37c02ea87fc2a22d6b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cee07e844a7890f815f6af4af80ba7cecc952df630f158d7265e0102c2f8719ac7a1b5ca05e3a9d5a0e53b1d247eebb49671bfc203f946d276b32beeb3223616
|
7
|
+
data.tar.gz: 3a19e222a63e1627f91fd9fe5058ca95370667ad24ae66db1312a268e781ccb067a7d422788e17000006bb3c1aad4b2bdf1fe1d1c4748a96f0ba5c8a7f687082
|
data/CHANGELOG.md
CHANGED
@@ -15,7 +15,7 @@ module CombinePDF
|
|
15
15
|
PDF.new( PDFParser.new( IO.read(file_name, mode: 'rb').force_encoding(Encoding::ASCII_8BIT) ) )
|
16
16
|
end
|
17
17
|
def new(file_name = "")
|
18
|
-
load(file_name)
|
18
|
+
load(file_name) rescue parse(file_name)
|
19
19
|
end
|
20
20
|
|
21
21
|
# Create a PDF object from a raw PDF data (parsing the data).
|
@@ -149,12 +149,13 @@ module CombinePDF
|
|
149
149
|
indirect_object_count += 1
|
150
150
|
xref << loc
|
151
151
|
out << PDFOperations._object_to_pdf(o)
|
152
|
-
loc += out.last.
|
152
|
+
loc += out.last.bytesize + 1
|
153
153
|
end
|
154
|
-
xref_location =
|
155
|
-
|
156
|
-
out
|
157
|
-
|
154
|
+
xref_location = loc
|
155
|
+
# xref_location = 0
|
156
|
+
# out.each { |line| xref_location += line.bytesize + 1}
|
157
|
+
out << "xref\n0 #{(indirect_object_count).to_s}\n0000000000 65535 f \n"
|
158
|
+
xref.each {|offset| out << ( out.pop + ("%010d 00000 n \n" % offset) ) }
|
158
159
|
out << out.pop + "trailer"
|
159
160
|
out << "<<\n/Root #{false || "#{catalog[:indirect_reference_id]} #{catalog[:indirect_generation_number]} R"}"
|
160
161
|
out << "/Size #{indirect_object_count.to_s}"
|
data/lib/combine_pdf/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: combine_pdf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.21
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Boaz Segev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-04-
|
11
|
+
date: 2015-04-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ruby-rc4
|