combine_pdf 0.2.36 → 0.2.37
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -1
- data/lib/combine_pdf/page_methods.rb +2 -2
- data/lib/combine_pdf/parser.rb +1 -1
- data/lib/combine_pdf/version.rb +1 -1
- data/test/automated +14 -0
- 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: cac27b28f3653156374b1ea4a429676625ba0c9f
|
4
|
+
data.tar.gz: 8ce9f60a9bdcbd763a72461703c51845dbab0f2c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 78aa47281a6f9fa5723a99ed9ce666479999348b69a19778e02eb2144e1c507d4a62ac23a07e4b46079193d14fecf77cbb9dac06591ac2354e92046ba0ba5d20
|
7
|
+
data.tar.gz: 2b92948efba5ab031a46865416b13b1aecb892a1763c0d45190598313e6e0139907ece00c129349060ff030c7b38531d1d848f9696168d5fec499a4c65121db8
|
data/CHANGELOG.md
CHANGED
@@ -2,7 +2,15 @@
|
|
2
2
|
|
3
3
|
***
|
4
4
|
|
5
|
-
#### Change log v.0.2.
|
5
|
+
#### Change log v.0.2.37 (Release Candidate)
|
6
|
+
|
7
|
+
**Fix**: Fixed `Page_Methods#textbox` default `:x`,`:y` to allow for non-zero/cropped page origin. Credit to @donnguyen for exposing the issue.
|
8
|
+
|
9
|
+
**Fix**: Fix typo on Parser error message for general parser error. Credit to @axlekb.
|
10
|
+
|
11
|
+
***
|
12
|
+
|
13
|
+
#### Change log v.0.2.36
|
6
14
|
|
7
15
|
**Fix**: Fix for [issue #104](https://github.com/boazsegev/combine_pdf/issues/104). Credit to @tomascharad for exposing the issue.
|
8
16
|
|
@@ -185,8 +185,8 @@ module CombinePDF
|
|
185
185
|
# ctm:: A PDF complient CTM data array that will manipulate the axis and allow transformations. i.e. `[1,0,0,1,0,0]`
|
186
186
|
def textbox(text, properties = {})
|
187
187
|
options = {
|
188
|
-
x: 0,
|
189
|
-
y:
|
188
|
+
x: page_size[0],
|
189
|
+
y: page_size[1],
|
190
190
|
width: 0,
|
191
191
|
height: -1,
|
192
192
|
text_align: :center,
|
data/lib/combine_pdf/parser.rb
CHANGED
@@ -76,7 +76,7 @@ module CombinePDF
|
|
76
76
|
@parsed = _parse_
|
77
77
|
# puts @parsed
|
78
78
|
|
79
|
-
raise 'Unknown PDF parsing error -
|
79
|
+
raise 'Unknown PDF parsing error - malformed PDF file?' unless (@parsed.select { |i| !i.is_a?(Hash) }).empty?
|
80
80
|
|
81
81
|
if @root_object == {}.freeze
|
82
82
|
xref_streams = @parsed.select { |obj| obj.is_a?(Hash) && obj[:Type] == :XRef }
|
data/lib/combine_pdf/version.rb
CHANGED
data/test/automated
CHANGED
@@ -56,6 +56,20 @@ pdf = CombinePDF.new
|
|
56
56
|
lists.each { |n| pdf << CombinePDF.load(n) }
|
57
57
|
pdf.save('07_named destinations.pdf')
|
58
58
|
|
59
|
+
pdf = CombinePDF.new
|
60
|
+
lists.each { |n| pdf << CombinePDF.load(n) }
|
61
|
+
pdf.number_pages(start_at: 1,
|
62
|
+
font_size: 14,
|
63
|
+
font_color: [0, 0, 0.4],
|
64
|
+
box_color: [0.8, 0.8, 0.8],
|
65
|
+
border_width: 1,
|
66
|
+
border_color: [0.3, 0.3, 0.3],
|
67
|
+
box_radius: 8,
|
68
|
+
number_location: [:top, :bottom],
|
69
|
+
opacity: 0.75)
|
70
|
+
|
71
|
+
pdf.save('07_named destinations_numbered.pdf')
|
72
|
+
|
59
73
|
CombinePDF.load("./Ruby/test\ pdfs/Scribus-unknown_err.pdf").save '08_1-unknown-err-empty-str.pdf'
|
60
74
|
CombinePDF.load("./Ruby/test\ pdfs/Scribus-unknown_err2.pdf").save '08_2-unknown-err-empty-str.pdf'
|
61
75
|
CombinePDF.load("./Ruby/test\ pdfs/Scribus-unknown_err3.pdf").save '08_3-unknown-err-empty-str.pdf'
|
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.2.
|
4
|
+
version: 0.2.37
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Boaz Segev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-05-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ruby-rc4
|