combine_pdf 1.0.15 → 1.0.16

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
  SHA256:
3
- metadata.gz: 23a07449258879f448dc9296b367ff0c9413a1ea2d40da8cbd0e2e9ba3830c61
4
- data.tar.gz: 9624aab26ab067ba3e49ea0ec71f2f7ba22f0555e5e4e9784d787371364d4d04
3
+ metadata.gz: d071703a8903bc5a11d7beb5a0bcb284a8bced5763705de3a7dd9ae6be35b64d
4
+ data.tar.gz: 898069ad7ec79ad4fadea5383a721f28c5dfc3632fc20aaa40624954bfe70170
5
5
  SHA512:
6
- metadata.gz: aedfb6afebad0c9d7ff4f47141ab0f7f1352829358ee4b888815e525212ba7f853b73e353fb073df03a705ae7c131d8300c4acd5c1c30287e8f90cd68e07e920
7
- data.tar.gz: e24bc6be0be1974711dd586d4a30cf94617e0c37a483613104558800ab5e8d04f32073bd09a0813cb386bb7c297164bfdb73a3fc0904b811c86b3afc7670b6b7
6
+ metadata.gz: d52868ff7a021801207ff17a1e87aca8fa1bd82e6fd0dacf91d39d57695b07b87238898238fa90755bfaaec65cb4df384b6db97f3f4e3bf70da7d3d808e55daa
7
+ data.tar.gz: f68133d14d5eb5f0428097b4421976da49471eed61f4ac0e574c4718b588458f6971fd107ccc397be004997f3c31ac6bfc122675992412fd521a7910d6f2abd9
@@ -2,6 +2,10 @@
2
2
 
3
3
  ***
4
4
 
5
+ #### Change log v.1.0.16
6
+
7
+ **Fix**: some documentation typos were fixed (PR #147) - credit to @djhopper01 (Derek Hopper).
8
+
5
9
  #### Change log v.1.0.15
6
10
 
7
11
  **Fix**: An attempt to fix JRuby compatibility concerns (issue #127).
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
20
20
 
21
21
  spec.add_runtime_dependency 'ruby-rc4', '>= 0.1.5'
22
22
 
23
- spec.add_development_dependency "bundler", "~> 1.7"
23
+ # spec.add_development_dependency "bundler", ">= 1.7"
24
24
  spec.add_development_dependency "rake", "~> 10.0"
25
25
  spec.add_development_dependency "minitest"
26
26
  end
@@ -140,7 +140,7 @@ module CombinePDF
140
140
  # this function enables plug-ins to expend the font functionality of CombinePDF.
141
141
  #
142
142
  # font_name:: a Symbol with the name of the font. if the fonts exists in the library, it will be overwritten!
143
- # font_metrics:: a Hash of font metrics, of the format char => {wx: char_width, boundingbox: [left_x, buttom_y, right_x, top_y]} where char == character itself (i.e. " " for space). The Hash should contain a special value :missing for the metrics of missing characters. an optional :wy might be supported in the future, for up to down fonts.
143
+ # font_metrics:: a Hash of font metrics, of the format char => {wx: char_width, boundingbox: [left_x, bottom_y, right_x, top_y]} where char == character itself (i.e. " " for space). The Hash should contain a special value :missing for the metrics of missing characters. an optional :wy might be supported in the future, for up to down fonts.
144
144
  # font_pdf_object:: a Hash in the internal format recognized by CombinePDF, that represents the font object.
145
145
  # font_cmap:: a CMap dictionary Hash) which maps unicode characters to the hex CID for the font (i.e. {"a" => "61", "z" => "7a" }).
146
146
  def register_font(font_name, font_metrics, font_pdf_object, font_cmap = nil)
@@ -100,7 +100,7 @@ module CombinePDF
100
100
 
101
101
  # adds a correctly formatted font object to the font library.
102
102
  # font_name:: a Symbol with the name of the font. if the fonts name exists, the font will be overwritten!
103
- # font_metrics:: a Hash of ont metrics, of the format char => {wx: char_width, boundingbox: [left_x, buttom_y, right_x, top_y]} where i == character code (i.e. 32 for space). The Hash should contain a special value :missing for the metrics of missing characters. an optional :wy will be supported in the future, for up to down fonts.
103
+ # font_metrics:: a Hash of ont metrics, of the format char => {wx: char_width, boundingbox: [left_x, bottom_y, right_x, top_y]} where i == character code (i.e. 32 for space). The Hash should contain a special value :missing for the metrics of missing characters. an optional :wy will be supported in the future, for up to down fonts.
104
104
  # font_pdf_object:: a Hash in the internal format recognized by CombinePDF, that represents the font object.
105
105
  # font_cmap:: a CMap dictionary Hash) which maps unicode characters to the hex CID for the font (i.e. {"a" => "61", "z" => "7a" }).
106
106
  def register_font(font_name, font_metrics, font_pdf_object, font_cmap = nil)
@@ -151,11 +151,11 @@ module CombinePDF
151
151
  # properties:: a Hash of box properties.
152
152
  # the symbols and values in the properties Hash could be any or all of the following:
153
153
  # x:: the left position of the box.
154
- # y:: the BUTTOM position of the box.
154
+ # y:: the BOTTOM position of the box.
155
155
  # width:: the width/length of the box. negative values will be computed from edge of page. defaults to 0 (end of page).
156
156
  # height:: the height of the box. negative values will be computed from edge of page. defaults to 0 (end of page).
157
157
  # text_align:: symbol for horizontal text alignment, can be ":center" (default), ":right", ":left"
158
- # text_valign:: symbol for vertical text alignment, can be ":center" (default), ":top", ":buttom"
158
+ # text_valign:: symbol for vertical text alignment, can be ":center" (default), ":top", ":bottom"
159
159
  # text_padding:: a Float between 0 and 1, setting the padding for the text. defaults to 0.05 (5%).
160
160
  # font:: a registered font name or an Array of names. defaults to ":Helvetica". The 14 standard fonts names are:
161
161
  # - :"Times-Roman"
@@ -244,8 +244,8 @@ module CombinePDF
244
244
  half_radius = (radius.to_f / 2).round 4
245
245
  ## set starting point
246
246
  box_stream << "#{options[:x] + radius} #{options[:y]} m\n"
247
- ## buttom and right corner - first line and first corner
248
- box_stream << "#{options[:x] + options[:width] - radius} #{options[:y]} l\n" # buttom
247
+ ## bottom and right corner - first line and first corner
248
+ box_stream << "#{options[:x] + options[:width] - radius} #{options[:y]} l\n" # bottom
249
249
  if options[:box_radius] != 0 # make first corner, if not straight.
250
250
  box_stream << "#{options[:x] + options[:width] - half_radius} #{options[:y]} "
251
251
  box_stream << "#{options[:x] + options[:width]} #{options[:y] + half_radius} "
@@ -265,7 +265,7 @@ module CombinePDF
265
265
  box_stream << "#{options[:x]} #{options[:y] + options[:height] - half_radius} "
266
266
  box_stream << "#{options[:x]} #{options[:y] + options[:height] - radius} c\n"
267
267
  end
268
- ## left and buttom-left corner
268
+ ## left and bottom-left corner
269
269
  box_stream << "#{options[:x]} #{options[:y] + radius} l\n"
270
270
  if options[:box_radius] != 0
271
271
  box_stream << "#{options[:x]} #{options[:y] + half_radius} "
@@ -287,7 +287,7 @@ module CombinePDF
287
287
  end
288
288
  contents << box_stream
289
289
 
290
- # reset x,y by text alignment - x,y are calculated from the buttom left
290
+ # reset x,y by text alignment - x,y are calculated from the bottom left
291
291
  # each unit (1) is 1/72 Inch
292
292
  # create text stream
293
293
  text_stream = ''
@@ -358,9 +358,9 @@ module CombinePDF
358
358
  #
359
359
  # options:: a Hash of options setting the behavior and format of the page numbers:
360
360
  # - :number_format a string representing the format for page number. defaults to ' - %s - ' (allows for letter numbering as well, such as "a", "b"...).
361
- # - :location an Array containing the location for the page numbers, can be :top, :buttom, :top_left, :top_right, :bottom_left, :bottom_right or :center (:center == full page). defaults to [:top, :buttom].
361
+ # - :location an Array containing the location for the page numbers, can be :top, :bottom, :top_left, :top_right, :bottom_left, :bottom_right or :center (:center == full page). defaults to [:top, :bottom].
362
362
  # - :start_at an Integer that sets the number for first page number. also accepts a letter ("a") for letter numbering. defaults to 1.
363
- # - :margin_from_height a number (PDF points) for the top and buttom margins. defaults to 45.
363
+ # - :margin_from_height a number (PDF points) for the top and bottom margins. defaults to 45.
364
364
  # - :margin_from_side a number (PDF points) for the left and right margins. defaults to 15.
365
365
  # - :page_range a range of pages to be numbered (i.e. (2..-1) ) defaults to all the pages (nil). Remember to set the :start_at to the correct value.
366
366
  # the options Hash can also take all the options for {Page_Methods#textbox}.
@@ -1,3 +1,3 @@
1
1
  module CombinePDF
2
- VERSION = '1.0.15'.freeze
2
+ VERSION = '1.0.16'.freeze
3
3
  end
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: 1.0.15
4
+ version: 1.0.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Boaz Segev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-08-12 00:00:00.000000000 Z
11
+ date: 2019-02-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ruby-rc4
@@ -24,20 +24,6 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: 0.1.5
27
- - !ruby/object:Gem::Dependency
28
- name: bundler
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - "~>"
32
- - !ruby/object:Gem::Version
33
- version: '1.7'
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - "~>"
39
- - !ruby/object:Gem::Version
40
- version: '1.7'
41
27
  - !ruby/object:Gem::Dependency
42
28
  name: rake
43
29
  requirement: !ruby/object:Gem::Requirement
@@ -118,8 +104,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
118
104
  - !ruby/object:Gem::Version
119
105
  version: '0'
120
106
  requirements: []
121
- rubyforge_project:
122
- rubygems_version: 2.7.6
107
+ rubygems_version: 3.0.1
123
108
  signing_key:
124
109
  specification_version: 4
125
110
  summary: Combine, stamp and watermark PDF files in pure Ruby.