combine_pdf 0.2.36 → 0.2.37

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 24cff4ff99e59aebbf23e9152c38d16d43d5ef02
4
- data.tar.gz: 346ebee7f019ec072d5aa794fa4c9329a831ecbb
3
+ metadata.gz: cac27b28f3653156374b1ea4a429676625ba0c9f
4
+ data.tar.gz: 8ce9f60a9bdcbd763a72461703c51845dbab0f2c
5
5
  SHA512:
6
- metadata.gz: 1c7858197bb0e1da9f3467c602580a0d8d10e6f19156ac8d43b3a1b22f93d004d4fb6b7bc7074847e1b82ffdcd540848911b196b0fefb35b7ba17427bea5ddd3
7
- data.tar.gz: cf7a0d9e5e77a6e94815de3fdc3e7cf29c82ee1e33dfc832351c1784a4a44c33c40cf729d55aea184371563a839baf8b067b634bce2a4361af2abc61c55c4344
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.36 (Release Candidate)
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: 0,
188
+ x: page_size[0],
189
+ y: page_size[1],
190
190
  width: 0,
191
191
  height: -1,
192
192
  text_align: :center,
@@ -76,7 +76,7 @@ module CombinePDF
76
76
  @parsed = _parse_
77
77
  # puts @parsed
78
78
 
79
- raise 'Unknown PDF parsing error - maleformed PDF file?' unless (@parsed.select { |i| !i.is_a?(Hash) }).empty?
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 }
@@ -1,3 +1,3 @@
1
1
  module CombinePDF
2
- VERSION = '0.2.36'.freeze
2
+ VERSION = '0.2.37'.freeze
3
3
  end
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.36
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-03-27 00:00:00.000000000 Z
11
+ date: 2017-05-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ruby-rc4