obf 0.9.8.29 → 0.9.8.30
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/lib/obf/pdf.rb +5 -9
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1cb56d99fe87de9bba6903881552faf415b2d448f4b2db53a9dbef31920822b7
|
|
4
|
+
data.tar.gz: ce3feae227bfbcbed640c6e6fe58dddcfbd5656763ce7ca10c24a0f0bd76e155
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ee15c8c553577d46247d9105ffd24fa982704f615eba9efa32c32d7c019fe4f72e384e72e05b8d1b835985d9dd9f665d525cdc38cc85da514241d7b154e3760e
|
|
7
|
+
data.tar.gz: f6f8f9f2ab1ef2b9e2eebe33d53b4641dadc9f4bc522114afd9f6f6dfa857093239035ed706c6dee3cd972a3d8f9d470128ed61a7ee73cd6af52f48d0fc6e654
|
data/lib/obf/pdf.rb
CHANGED
|
@@ -62,7 +62,7 @@ module OBF::PDF
|
|
|
62
62
|
if font && File.exists?(font)
|
|
63
63
|
pdf.font(font)
|
|
64
64
|
else
|
|
65
|
-
|
|
65
|
+
File.expand_path('../../Arial.ttf', __FILE__)
|
|
66
66
|
end
|
|
67
67
|
|
|
68
68
|
multi_render_paths = []
|
|
@@ -157,11 +157,7 @@ module OBF::PDF
|
|
|
157
157
|
if !options['headerless']
|
|
158
158
|
header_height = 80
|
|
159
159
|
pdf.bounding_box([0, doc_height], :width => doc_width, :height => header_height) do
|
|
160
|
-
|
|
161
|
-
pdf.font('Arial')
|
|
162
|
-
rescue => e
|
|
163
|
-
pdf.font(File.expand_path('../../Arial.ttf', __FILE__)) rescue nil
|
|
164
|
-
end
|
|
160
|
+
pdf.font(File.expand_path('../../Arial.ttf', __FILE__)) rescue nil
|
|
165
161
|
pdf.line_width = 2
|
|
166
162
|
pdf.font_size 16
|
|
167
163
|
pdf.fill_color "eeeeee"
|
|
@@ -183,7 +179,7 @@ module OBF::PDF
|
|
|
183
179
|
pdf.formatted_text_box [text_options], :at => [x + 10, header_height], :width => 80, :height => 80, :align => :center, :valign => :bottom, :overflow => :shrink_to_fit
|
|
184
180
|
backlinks = (options['backlinks'] || []).join(',')
|
|
185
181
|
pdf.fill_color "ffffff"
|
|
186
|
-
pdf.formatted_text_box [{:text => backlinks}], :at => [x +
|
|
182
|
+
pdf.formatted_text_box [{:text => backlinks}], :at => [x + 20, header_height + 5 - 25], :width => 70, :height => 30, :align => :center, :valign => :center, :overflow => :shrink_to_fit
|
|
187
183
|
end
|
|
188
184
|
end
|
|
189
185
|
|
|
@@ -357,7 +353,7 @@ module OBF::PDF
|
|
|
357
353
|
if font && File.exists?(font)
|
|
358
354
|
pdf.font(font)
|
|
359
355
|
else
|
|
360
|
-
pdf.font('
|
|
356
|
+
pdf.font(File.expand_path('../../TimesNewRoman.ttf', __FILE__))
|
|
361
357
|
end
|
|
362
358
|
direction = text.match(rtl_regex) ? :rtl : :ltr
|
|
363
359
|
if options['text_case'] == 'upper'
|
|
@@ -424,7 +420,7 @@ module OBF::PDF
|
|
|
424
420
|
# footer
|
|
425
421
|
pdf.fill_color "bbbbbb"
|
|
426
422
|
obj['name'] = nil if obj['name'] == 'Unnamed Board'
|
|
427
|
-
pdf.font('
|
|
423
|
+
pdf.font(File.expand_path('../../Arial.ttf', __FILE__))
|
|
428
424
|
if OBF::PDF.footer_text || obj['name']
|
|
429
425
|
text = [obj['name'], OBF::PDF.footer_text].compact.join(', ')
|
|
430
426
|
offset = options['pages'] ? 400 : 300
|