obf 0.9.8.26 → 0.9.8.27

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/obf/pdf.rb +17 -26
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9305e71e25cff6673755ff1504e3471e74db6ee5a51c1a683f360e129bccd982
4
- data.tar.gz: 416df51ca314f38b07c572591dd6d2e0a98004c2811a8320a84d6110bfedcb20
3
+ metadata.gz: 1eeb27c5609f46253c7405023ef66d16d3748ab7725c41c54b9a3076f3bf5be9
4
+ data.tar.gz: 619bc96bbb77aefdd7d8ca549b2ceac56b60d6c1e7881be2d07fb59ca60eff26
5
5
  SHA512:
6
- metadata.gz: 349cfd3f96c6aee6c63a1700376581b0bd8b4d26875fd544025fe7f9f7599766fcf31d85bae658b51a834ced331e9f83eb6d3a4122ce6a614fedc1063558a66c
7
- data.tar.gz: 4ac9882db28ce1a20ff48380cf8df008bed4ba0e1feadfbfc3aa28ba22d52a412f92c736c444bddbe5cd7377dc774b6b22a9ab15be7739db4cf1a6aa2d32a8f0
6
+ metadata.gz: 29c7bef27bafad1c7531d16942924cbba69df59fb8f9c3581f22fc2779d7a74cf6e38ac12bab6d7bb658d124e9307967d7b64f3804cd33e24f0a3f6ea576a12b
7
+ data.tar.gz: 86cc5097e0d4210d848ae07d79bec23f5dbaa9488355654885daff707bfbcfc3004ade7972c9dfd8a37c86987b52b35216505e8d00bd8f2b8a504bef81265a88
data/lib/obf/pdf.rb CHANGED
@@ -88,37 +88,28 @@ module OBF::PDF
88
88
  OBF::Utils.as_progress_percent(pre, post) do
89
89
  # if more than 20 pages, build each page individually
90
90
  # and combine them afterwards
91
+
91
92
  if multi_render
92
93
  path = OBF::Utils.temp_path("stash-#{idx}.pdf")
93
94
  pdf = Prawn::Document.new(doc_opts)
94
- build_page(pdf, board, {
95
- 'zipper' => zipper,
96
- 'pages' => obj['pages'],
97
- 'backlinks' => obj['backlinks'][board['id']] || [],
98
- 'headerless' => !!opts['headerless'],
99
- 'font' => font,
100
- 'links' => false,
101
- 'text_on_top' => !!opts['text_on_top'],
102
- 'transparent_background' => !!opts['transparent_background'],
103
- 'symbol_background' => opts['symbol_background'],
104
- 'text_case' => opts['text_case']
105
- })
106
- pdf.render_file(path)
107
- multi_render_paths << path
108
95
  else
109
96
  pdf.start_new_page unless idx == 0
110
- build_page(pdf, board, {
111
- 'zipper' => zipper,
112
- 'pages' => obj['pages'],
113
- 'backlinks' => obj['backlinks'][board['id']] || [],
114
- 'headerless' => !!opts['headerless'],
115
- 'font' => font,
116
- 'links' => true,
117
- 'text_on_top' => !!opts['text_on_top'],
118
- 'transparent_background' => !!opts['transparent_background'],
119
- 'symbol_background' => opts['symbol_background'],
120
- 'text_case' => opts['text_case']
121
- })
97
+ end
98
+ build_page(pdf, board, {
99
+ 'zipper' => zipper,
100
+ 'pages' => obj['pages'],
101
+ 'backlinks' => obj['backlinks'][board['id']] || [],
102
+ 'headerless' => !!opts['headerless'],
103
+ 'font' => font,
104
+ 'links' => false,
105
+ 'text_on_top' => !!opts['text_on_top'],
106
+ 'transparent_background' => !!opts['transparent_background'],
107
+ 'symbol_background' => opts['symbol_background'],
108
+ 'text_case' => opts['text_case']
109
+ })
110
+ if multi_render
111
+ pdf.render_file(path)
112
+ multi_render_paths << path
122
113
  end
123
114
  end
124
115
  OBF::Utils.log " finished pdf of board #{idx}/#{obj['boards'].length} #{Time.now.to_i - started}s"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: obf
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.8.26
4
+ version: 0.9.8.27
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Whitmer