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.
- checksums.yaml +4 -4
- data/lib/obf/pdf.rb +17 -26
- 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: 1eeb27c5609f46253c7405023ef66d16d3748ab7725c41c54b9a3076f3bf5be9
|
4
|
+
data.tar.gz: 619bc96bbb77aefdd7d8ca549b2ceac56b60d6c1e7881be2d07fb59ca60eff26
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
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"
|