prawn 2.3.0 → 2.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/prawn/document/bounding_box.rb +223 -143
- data/lib/prawn/document/column_box.rb +61 -26
- data/lib/prawn/document/internals.rb +25 -16
- data/lib/prawn/document/span.rb +21 -18
- data/lib/prawn/document.rb +273 -182
- data/lib/prawn/encoding.rb +2 -5
- data/lib/prawn/errors.rb +23 -34
- data/lib/prawn/font.rb +254 -139
- data/lib/prawn/font_metric_cache.rb +18 -16
- data/lib/prawn/fonts/afm.rb +99 -57
- data/lib/prawn/fonts/dfont.rb +7 -1
- data/lib/prawn/fonts/otf.rb +4 -1
- data/lib/prawn/fonts/to_unicode_cmap.rb +151 -0
- data/lib/prawn/fonts/ttc.rb +7 -2
- data/lib/prawn/fonts/ttf.rb +345 -107
- data/lib/prawn/fonts.rb +14 -0
- data/lib/prawn/graphics/blend_mode.rb +25 -28
- data/lib/prawn/graphics/cap_style.rb +9 -12
- data/lib/prawn/graphics/color.rb +75 -50
- data/lib/prawn/graphics/dash.rb +45 -42
- data/lib/prawn/graphics/join_style.rb +18 -12
- data/lib/prawn/graphics/patterns.rb +239 -110
- data/lib/prawn/graphics/transformation.rb +51 -44
- data/lib/prawn/graphics/transparency.rb +16 -40
- data/lib/prawn/graphics.rb +370 -260
- data/lib/prawn/grid.rb +219 -57
- data/lib/prawn/image_handler.rb +27 -10
- data/lib/prawn/images/image.rb +8 -10
- data/lib/prawn/images/jpg.rb +46 -20
- data/lib/prawn/images/png.rb +94 -42
- data/lib/prawn/images.rb +70 -81
- data/lib/prawn/measurement_extensions.rb +39 -8
- data/lib/prawn/measurements.rb +60 -5
- data/lib/prawn/outline.rb +120 -113
- data/lib/prawn/repeater.rb +52 -36
- data/lib/prawn/security/arcfour.rb +4 -4
- data/lib/prawn/security.rb +106 -98
- data/lib/prawn/soft_mask.rb +42 -30
- data/lib/prawn/stamp.rb +38 -42
- data/lib/prawn/text/box.rb +156 -105
- data/lib/prawn/text/formatted/arranger.rb +121 -41
- data/lib/prawn/text/formatted/box.rb +239 -163
- data/lib/prawn/text/formatted/fragment.rb +130 -14
- data/lib/prawn/text/formatted/line_wrap.rb +49 -38
- data/lib/prawn/text/formatted/parser.rb +116 -74
- data/lib/prawn/text/formatted/wrap.rb +25 -26
- data/lib/prawn/text/formatted.rb +75 -0
- data/lib/prawn/text.rb +456 -211
- data/lib/prawn/transformation_stack.rb +29 -10
- data/lib/prawn/utilities.rb +13 -13
- data/lib/prawn/version.rb +2 -1
- data/lib/prawn/view.rb +69 -54
- data/lib/prawn.rb +24 -18
- data.tar.gz.sig +0 -0
- metadata +55 -262
- metadata.gz.sig +3 -4
- data/.yardopts +0 -10
- data/Gemfile +0 -5
- data/Rakefile +0 -54
- data/manual/absolute_position.pdf +0 -0
- data/manual/basic_concepts/adding_pages.rb +0 -26
- data/manual/basic_concepts/basic_concepts.rb +0 -43
- data/manual/basic_concepts/creation.rb +0 -38
- data/manual/basic_concepts/cursor.rb +0 -32
- data/manual/basic_concepts/measurement.rb +0 -24
- data/manual/basic_concepts/origin.rb +0 -37
- data/manual/basic_concepts/other_cursor_helpers.rb +0 -39
- data/manual/basic_concepts/view.rb +0 -48
- data/manual/bounding_box/bounding_box.rb +0 -41
- data/manual/bounding_box/bounds.rb +0 -48
- data/manual/bounding_box/canvas.rb +0 -23
- data/manual/bounding_box/creation.rb +0 -22
- data/manual/bounding_box/indentation.rb +0 -45
- data/manual/bounding_box/nesting.rb +0 -52
- data/manual/bounding_box/russian_boxes.rb +0 -40
- data/manual/bounding_box/stretchy.rb +0 -29
- data/manual/contents.rb +0 -35
- data/manual/cover.rb +0 -43
- data/manual/document_and_page_options/background.rb +0 -25
- data/manual/document_and_page_options/document_and_page_options.rb +0 -34
- data/manual/document_and_page_options/metadata.rb +0 -25
- data/manual/document_and_page_options/page_margins.rb +0 -36
- data/manual/document_and_page_options/page_size.rb +0 -34
- data/manual/document_and_page_options/print_scaling.rb +0 -22
- data/manual/example_helper.rb +0 -8
- data/manual/graphics/blend_mode.rb +0 -52
- data/manual/graphics/circle_and_ellipse.rb +0 -21
- data/manual/graphics/color.rb +0 -22
- data/manual/graphics/common_lines.rb +0 -29
- data/manual/graphics/fill_and_stroke.rb +0 -41
- data/manual/graphics/fill_rules.rb +0 -37
- data/manual/graphics/gradients.rb +0 -43
- data/manual/graphics/graphics.rb +0 -64
- data/manual/graphics/helper.rb +0 -27
- data/manual/graphics/line_width.rb +0 -36
- data/manual/graphics/lines_and_curves.rb +0 -40
- data/manual/graphics/polygon.rb +0 -27
- data/manual/graphics/rectangle.rb +0 -20
- data/manual/graphics/rotate.rb +0 -25
- data/manual/graphics/scale.rb +0 -42
- data/manual/graphics/soft_masks.rb +0 -44
- data/manual/graphics/stroke_cap.rb +0 -30
- data/manual/graphics/stroke_dash.rb +0 -47
- data/manual/graphics/stroke_join.rb +0 -29
- data/manual/graphics/translate.rb +0 -28
- data/manual/graphics/transparency.rb +0 -33
- data/manual/how_to_read_this_manual.rb +0 -39
- data/manual/images/absolute_position.rb +0 -22
- data/manual/images/fit.rb +0 -20
- data/manual/images/horizontal.rb +0 -24
- data/manual/images/images.rb +0 -41
- data/manual/images/plain_image.rb +0 -17
- data/manual/images/scale.rb +0 -21
- data/manual/images/vertical.rb +0 -27
- data/manual/images/width_and_height.rb +0 -24
- data/manual/layout/boxes.rb +0 -26
- data/manual/layout/content.rb +0 -24
- data/manual/layout/layout.rb +0 -27
- data/manual/layout/simple_grid.rb +0 -22
- data/manual/outline/add_subsection_to.rb +0 -60
- data/manual/outline/insert_section_after.rb +0 -46
- data/manual/outline/outline.rb +0 -33
- data/manual/outline/sections_and_pages.rb +0 -66
- data/manual/repeatable_content/alternate_page_numbering.rb +0 -36
- data/manual/repeatable_content/page_numbering.rb +0 -55
- data/manual/repeatable_content/repeatable_content.rb +0 -35
- data/manual/repeatable_content/repeater.rb +0 -54
- data/manual/repeatable_content/stamp.rb +0 -40
- data/manual/security/encryption.rb +0 -28
- data/manual/security/permissions.rb +0 -41
- data/manual/security/security.rb +0 -28
- data/manual/table.rb +0 -16
- data/manual/text/alignment.rb +0 -43
- data/manual/text/color.rb +0 -24
- data/manual/text/column_box.rb +0 -30
- data/manual/text/fallback_fonts.rb +0 -41
- data/manual/text/font.rb +0 -40
- data/manual/text/font_size.rb +0 -44
- data/manual/text/font_style.rb +0 -22
- data/manual/text/formatted_callbacks.rb +0 -65
- data/manual/text/formatted_text.rb +0 -58
- data/manual/text/free_flowing_text.rb +0 -50
- data/manual/text/inline.rb +0 -40
- data/manual/text/kerning_and_character_spacing.rb +0 -38
- data/manual/text/leading.rb +0 -24
- data/manual/text/line_wrapping.rb +0 -60
- data/manual/text/paragraph_indentation.rb +0 -32
- data/manual/text/positioned_text.rb +0 -37
- data/manual/text/registering_families.rb +0 -51
- data/manual/text/rendering_and_color.rb +0 -36
- data/manual/text/right_to_left_text.rb +0 -54
- data/manual/text/rotation.rb +0 -47
- data/manual/text/single_usage.rb +0 -36
- data/manual/text/text.rb +0 -75
- data/manual/text/text_box_excess.rb +0 -35
- data/manual/text/text_box_extensions.rb +0 -48
- data/manual/text/text_box_overflow.rb +0 -49
- data/manual/text/utf8.rb +0 -27
- data/manual/text/win_ansi_charset.rb +0 -62
- data/prawn.gemspec +0 -57
- data/spec/data/curves.pdf +0 -66
- data/spec/extensions/encoding_helpers.rb +0 -11
- data/spec/prawn/document/bounding_box_spec.rb +0 -546
- data/spec/prawn/document/column_box_spec.rb +0 -75
- data/spec/prawn/document/security_spec.rb +0 -176
- data/spec/prawn/document_annotations_spec.rb +0 -76
- data/spec/prawn/document_destinations_spec.rb +0 -15
- data/spec/prawn/document_grid_spec.rb +0 -99
- data/spec/prawn/document_reference_spec.rb +0 -27
- data/spec/prawn/document_span_spec.rb +0 -36
- data/spec/prawn/document_spec.rb +0 -802
- data/spec/prawn/font_metric_cache_spec.rb +0 -54
- data/spec/prawn/font_spec.rb +0 -542
- data/spec/prawn/graphics/blend_mode_spec.rb +0 -63
- data/spec/prawn/graphics/transparency_spec.rb +0 -81
- data/spec/prawn/graphics_spec.rb +0 -837
- data/spec/prawn/graphics_stroke_styles_spec.rb +0 -229
- data/spec/prawn/image_handler_spec.rb +0 -53
- data/spec/prawn/images/jpg_spec.rb +0 -20
- data/spec/prawn/images/png_spec.rb +0 -283
- data/spec/prawn/images_spec.rb +0 -224
- data/spec/prawn/measurements_extensions_spec.rb +0 -24
- data/spec/prawn/outline_spec.rb +0 -412
- data/spec/prawn/repeater_spec.rb +0 -165
- data/spec/prawn/soft_mask_spec.rb +0 -74
- data/spec/prawn/stamp_spec.rb +0 -172
- data/spec/prawn/text/box_spec.rb +0 -1112
- data/spec/prawn/text/formatted/arranger_spec.rb +0 -466
- data/spec/prawn/text/formatted/box_spec.rb +0 -846
- data/spec/prawn/text/formatted/fragment_spec.rb +0 -343
- data/spec/prawn/text/formatted/line_wrap_spec.rb +0 -494
- data/spec/prawn/text/formatted/parser_spec.rb +0 -697
- data/spec/prawn/text_draw_text_spec.rb +0 -149
- data/spec/prawn/text_rendering_mode_spec.rb +0 -48
- data/spec/prawn/text_spacing_spec.rb +0 -95
- data/spec/prawn/text_spec.rb +0 -603
- data/spec/prawn/text_with_inline_formatting_spec.rb +0 -35
- data/spec/prawn/transformation_stack_spec.rb +0 -66
- data/spec/prawn/view_spec.rb +0 -63
- data/spec/prawn_manual_spec.rb +0 -35
- data/spec/spec_helper.rb +0 -48
metadata
CHANGED
@@ -1,9 +1,10 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: prawn
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
+
- Alexander Mankuta
|
7
8
|
- Gregory Brown
|
8
9
|
- Brad Ediger
|
9
10
|
- Daniel Nelson
|
@@ -14,55 +15,67 @@ bindir: bin
|
|
14
15
|
cert_chain:
|
15
16
|
- |
|
16
17
|
-----BEGIN CERTIFICATE-----
|
17
|
-
|
18
|
-
|
19
|
-
|
18
|
+
MIIC+jCCAeKgAwIBAgIBAzANBgkqhkiG9w0BAQsFADAjMSEwHwYDVQQDDBhhbGV4
|
19
|
+
L0RDPXBvaW50bGVzcy9EQz1vbmUwHhcNMjMxMTA5MTA1MzIxWhcNMjQxMTA4MTA1
|
20
|
+
MzIxWjAjMSEwHwYDVQQDDBhhbGV4L0RDPXBvaW50bGVzcy9EQz1vbmUwggEiMA0G
|
20
21
|
CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDPOVLPGEK+eaP6zJfifrpWvPTg4qo3
|
21
22
|
XNJJPom80SwqX2hVCVsRDK4RYgKUQqKRQzHhlx14wZHwWLETBVbNDGX3uqyCnTWU
|
22
23
|
JUKh3ydiZShXpNHoV/NW7hhEYvNsDcBAjYTmbvXOhuYCo0Tz/0N2Oiun/0wIICtP
|
23
24
|
vytY9TY0/lklWjAbsqJjNOu3o8IYkJBAN/rU96E/6WhFwjnxLcTnV9RfFRXdjG5j
|
24
25
|
CughoB2xSwKX8gwbQ8fsnaZRmdyDGYNpz6sGF0zycfiLkTttbLA2nYATCALy98CH
|
25
26
|
nsyZNsTjb4WINCuY2yEDjwesw9f/ROkNC68EgQ5M+aMjp+D0WcYGfzojAgMBAAGj
|
26
|
-
|
27
|
-
Ny/
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
Un1TJEahAlgENVml6CyDXSwk0H8N1V3gm1mb9Fe1T2Z/kAzvjo0qTDEtMVLU7Bxh
|
34
|
-
uqMUrdETjTnRYCVq
|
27
|
+
OTA3MAkGA1UdEwQCMAAwCwYDVR0PBAQDAgSwMB0GA1UdDgQWBBRPgIwSVbeonua/
|
28
|
+
Ny/8576oxdUbrjANBgkqhkiG9w0BAQsFAAOCAQEAX28QLxNNz5EgaZZuQQUkbOXB
|
29
|
+
4b5luBO22535+Vgj2jw7yjV8KKoGMWKrnB00ijgntqPEPXCzaPNibOcPZV5WfWVS
|
30
|
+
t0Ls8lWE/8kezPwV4SbRe4Y7C+D4J+oirs0L5PtpREV9CJ7kfdW/AN9MtvjjBFlb
|
31
|
+
jHquD/MiOOMyHtuO0FiTL265m10thcAUsbyi0MehKgGbtJ5fGceHvZDqDouvbMjT
|
32
|
+
hoijFk1oTY939JhjdcHuJzMiS2TrqIw8Dr5DkQu2vAjHpw0aOOWhlRjNJ7RHYJNm
|
33
|
+
QugXmCnHQxSKTmc7imKuotyMdRRKFh8UEFCLRsFtBbNxkXyNuB4xBMuUYodhEw==
|
35
34
|
-----END CERTIFICATE-----
|
36
|
-
date:
|
35
|
+
date: 2024-03-05 00:00:00.000000000 Z
|
37
36
|
dependencies:
|
37
|
+
- !ruby/object:Gem::Dependency
|
38
|
+
name: matrix
|
39
|
+
requirement: !ruby/object:Gem::Requirement
|
40
|
+
requirements:
|
41
|
+
- - "~>"
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '0.4'
|
44
|
+
type: :runtime
|
45
|
+
prerelease: false
|
46
|
+
version_requirements: !ruby/object:Gem::Requirement
|
47
|
+
requirements:
|
48
|
+
- - "~>"
|
49
|
+
- !ruby/object:Gem::Version
|
50
|
+
version: '0.4'
|
38
51
|
- !ruby/object:Gem::Dependency
|
39
52
|
name: pdf-core
|
40
53
|
requirement: !ruby/object:Gem::Requirement
|
41
54
|
requirements:
|
42
55
|
- - "~>"
|
43
56
|
- !ruby/object:Gem::Version
|
44
|
-
version: 0.
|
57
|
+
version: 0.10.0
|
45
58
|
type: :runtime
|
46
59
|
prerelease: false
|
47
60
|
version_requirements: !ruby/object:Gem::Requirement
|
48
61
|
requirements:
|
49
62
|
- - "~>"
|
50
63
|
- !ruby/object:Gem::Version
|
51
|
-
version: 0.
|
64
|
+
version: 0.10.0
|
52
65
|
- !ruby/object:Gem::Dependency
|
53
66
|
name: ttfunk
|
54
67
|
requirement: !ruby/object:Gem::Requirement
|
55
68
|
requirements:
|
56
69
|
- - "~>"
|
57
70
|
- !ruby/object:Gem::Version
|
58
|
-
version: '1.
|
71
|
+
version: '1.8'
|
59
72
|
type: :runtime
|
60
73
|
prerelease: false
|
61
74
|
version_requirements: !ruby/object:Gem::Requirement
|
62
75
|
requirements:
|
63
76
|
- - "~>"
|
64
77
|
- !ruby/object:Gem::Version
|
65
|
-
version: '1.
|
78
|
+
version: '1.8'
|
66
79
|
- !ruby/object:Gem::Dependency
|
67
80
|
name: pdf-inspector
|
68
81
|
requirement: !ruby/object:Gem::Requirement
|
@@ -104,119 +117,36 @@ dependencies:
|
|
104
117
|
- !ruby/object:Gem::Version
|
105
118
|
version: 1.4.1
|
106
119
|
- !ruby/object:Gem::Dependency
|
107
|
-
name: prawn-
|
108
|
-
requirement: !ruby/object:Gem::Requirement
|
109
|
-
requirements:
|
110
|
-
- - ">="
|
111
|
-
- !ruby/object:Gem::Version
|
112
|
-
version: 0.3.0
|
113
|
-
type: :development
|
114
|
-
prerelease: false
|
115
|
-
version_requirements: !ruby/object:Gem::Requirement
|
116
|
-
requirements:
|
117
|
-
- - ">="
|
118
|
-
- !ruby/object:Gem::Version
|
119
|
-
version: 0.3.0
|
120
|
-
- !ruby/object:Gem::Dependency
|
121
|
-
name: rake
|
122
|
-
requirement: !ruby/object:Gem::Requirement
|
123
|
-
requirements:
|
124
|
-
- - "~>"
|
125
|
-
- !ruby/object:Gem::Version
|
126
|
-
version: '12.0'
|
127
|
-
type: :development
|
128
|
-
prerelease: false
|
129
|
-
version_requirements: !ruby/object:Gem::Requirement
|
130
|
-
requirements:
|
131
|
-
- - "~>"
|
132
|
-
- !ruby/object:Gem::Version
|
133
|
-
version: '12.0'
|
134
|
-
- !ruby/object:Gem::Dependency
|
135
|
-
name: rspec
|
136
|
-
requirement: !ruby/object:Gem::Requirement
|
137
|
-
requirements:
|
138
|
-
- - "~>"
|
139
|
-
- !ruby/object:Gem::Version
|
140
|
-
version: '3.0'
|
141
|
-
type: :development
|
142
|
-
prerelease: false
|
143
|
-
version_requirements: !ruby/object:Gem::Requirement
|
144
|
-
requirements:
|
145
|
-
- - "~>"
|
146
|
-
- !ruby/object:Gem::Version
|
147
|
-
version: '3.0'
|
148
|
-
- !ruby/object:Gem::Dependency
|
149
|
-
name: rubocop
|
150
|
-
requirement: !ruby/object:Gem::Requirement
|
151
|
-
requirements:
|
152
|
-
- - "~>"
|
153
|
-
- !ruby/object:Gem::Version
|
154
|
-
version: 0.84.0
|
155
|
-
type: :development
|
156
|
-
prerelease: false
|
157
|
-
version_requirements: !ruby/object:Gem::Requirement
|
158
|
-
requirements:
|
159
|
-
- - "~>"
|
160
|
-
- !ruby/object:Gem::Version
|
161
|
-
version: 0.84.0
|
162
|
-
- !ruby/object:Gem::Dependency
|
163
|
-
name: rubocop-performance
|
120
|
+
name: prawn-dev
|
164
121
|
requirement: !ruby/object:Gem::Requirement
|
165
122
|
requirements:
|
166
123
|
- - "~>"
|
167
124
|
- !ruby/object:Gem::Version
|
168
|
-
version:
|
125
|
+
version: 0.4.0
|
169
126
|
type: :development
|
170
127
|
prerelease: false
|
171
128
|
version_requirements: !ruby/object:Gem::Requirement
|
172
129
|
requirements:
|
173
130
|
- - "~>"
|
174
131
|
- !ruby/object:Gem::Version
|
175
|
-
version:
|
132
|
+
version: 0.4.0
|
176
133
|
- !ruby/object:Gem::Dependency
|
177
|
-
name:
|
134
|
+
name: prawn-manual_builder
|
178
135
|
requirement: !ruby/object:Gem::Requirement
|
179
136
|
requirements:
|
180
137
|
- - "~>"
|
181
138
|
- !ruby/object:Gem::Version
|
182
|
-
version:
|
139
|
+
version: 0.4.0
|
183
140
|
type: :development
|
184
141
|
prerelease: false
|
185
142
|
version_requirements: !ruby/object:Gem::Requirement
|
186
143
|
requirements:
|
187
144
|
- - "~>"
|
188
145
|
- !ruby/object:Gem::Version
|
189
|
-
version:
|
190
|
-
|
191
|
-
name: simplecov
|
192
|
-
requirement: !ruby/object:Gem::Requirement
|
193
|
-
requirements:
|
194
|
-
- - ">="
|
195
|
-
- !ruby/object:Gem::Version
|
196
|
-
version: '0'
|
197
|
-
type: :development
|
198
|
-
prerelease: false
|
199
|
-
version_requirements: !ruby/object:Gem::Requirement
|
200
|
-
requirements:
|
201
|
-
- - ">="
|
202
|
-
- !ruby/object:Gem::Version
|
203
|
-
version: '0'
|
204
|
-
- !ruby/object:Gem::Dependency
|
205
|
-
name: yard
|
206
|
-
requirement: !ruby/object:Gem::Requirement
|
207
|
-
requirements:
|
208
|
-
- - ">="
|
209
|
-
- !ruby/object:Gem::Version
|
210
|
-
version: '0'
|
211
|
-
type: :development
|
212
|
-
prerelease: false
|
213
|
-
version_requirements: !ruby/object:Gem::Requirement
|
214
|
-
requirements:
|
215
|
-
- - ">="
|
216
|
-
- !ruby/object:Gem::Version
|
217
|
-
version: '0'
|
218
|
-
description: " Prawn is a fast, tiny, and nimble PDF generator for Ruby\n"
|
146
|
+
version: 0.4.0
|
147
|
+
description: Prawn is a fast, tiny, and nimble PDF generator for Ruby
|
219
148
|
email:
|
149
|
+
- alex@pointless.one
|
220
150
|
- gregory.t.brown@gmail.com
|
221
151
|
- brad@bradediger.com
|
222
152
|
- dnelson@bluejade.com
|
@@ -226,13 +156,10 @@ executables: []
|
|
226
156
|
extensions: []
|
227
157
|
extra_rdoc_files: []
|
228
158
|
files:
|
229
|
-
- ".yardopts"
|
230
159
|
- COPYING
|
231
160
|
- GPLv2
|
232
161
|
- GPLv3
|
233
|
-
- Gemfile
|
234
162
|
- LICENSE
|
235
|
-
- Rakefile
|
236
163
|
- data/fonts/Courier-Bold.afm
|
237
164
|
- data/fonts/Courier-BoldOblique.afm
|
238
165
|
- data/fonts/Courier-Oblique.afm
|
@@ -258,9 +185,11 @@ files:
|
|
258
185
|
- lib/prawn/errors.rb
|
259
186
|
- lib/prawn/font.rb
|
260
187
|
- lib/prawn/font_metric_cache.rb
|
188
|
+
- lib/prawn/fonts.rb
|
261
189
|
- lib/prawn/fonts/afm.rb
|
262
190
|
- lib/prawn/fonts/dfont.rb
|
263
191
|
- lib/prawn/fonts/otf.rb
|
192
|
+
- lib/prawn/fonts/to_unicode_cmap.rb
|
264
193
|
- lib/prawn/fonts/ttc.rb
|
265
194
|
- lib/prawn/fonts/ttf.rb
|
266
195
|
- lib/prawn/graphics.rb
|
@@ -299,170 +228,34 @@ files:
|
|
299
228
|
- lib/prawn/utilities.rb
|
300
229
|
- lib/prawn/version.rb
|
301
230
|
- lib/prawn/view.rb
|
302
|
-
|
303
|
-
- manual/basic_concepts/adding_pages.rb
|
304
|
-
- manual/basic_concepts/basic_concepts.rb
|
305
|
-
- manual/basic_concepts/creation.rb
|
306
|
-
- manual/basic_concepts/cursor.rb
|
307
|
-
- manual/basic_concepts/measurement.rb
|
308
|
-
- manual/basic_concepts/origin.rb
|
309
|
-
- manual/basic_concepts/other_cursor_helpers.rb
|
310
|
-
- manual/basic_concepts/view.rb
|
311
|
-
- manual/bounding_box/bounding_box.rb
|
312
|
-
- manual/bounding_box/bounds.rb
|
313
|
-
- manual/bounding_box/canvas.rb
|
314
|
-
- manual/bounding_box/creation.rb
|
315
|
-
- manual/bounding_box/indentation.rb
|
316
|
-
- manual/bounding_box/nesting.rb
|
317
|
-
- manual/bounding_box/russian_boxes.rb
|
318
|
-
- manual/bounding_box/stretchy.rb
|
319
|
-
- manual/contents.rb
|
320
|
-
- manual/cover.rb
|
321
|
-
- manual/document_and_page_options/background.rb
|
322
|
-
- manual/document_and_page_options/document_and_page_options.rb
|
323
|
-
- manual/document_and_page_options/metadata.rb
|
324
|
-
- manual/document_and_page_options/page_margins.rb
|
325
|
-
- manual/document_and_page_options/page_size.rb
|
326
|
-
- manual/document_and_page_options/print_scaling.rb
|
327
|
-
- manual/example_helper.rb
|
328
|
-
- manual/graphics/blend_mode.rb
|
329
|
-
- manual/graphics/circle_and_ellipse.rb
|
330
|
-
- manual/graphics/color.rb
|
331
|
-
- manual/graphics/common_lines.rb
|
332
|
-
- manual/graphics/fill_and_stroke.rb
|
333
|
-
- manual/graphics/fill_rules.rb
|
334
|
-
- manual/graphics/gradients.rb
|
335
|
-
- manual/graphics/graphics.rb
|
336
|
-
- manual/graphics/helper.rb
|
337
|
-
- manual/graphics/line_width.rb
|
338
|
-
- manual/graphics/lines_and_curves.rb
|
339
|
-
- manual/graphics/polygon.rb
|
340
|
-
- manual/graphics/rectangle.rb
|
341
|
-
- manual/graphics/rotate.rb
|
342
|
-
- manual/graphics/scale.rb
|
343
|
-
- manual/graphics/soft_masks.rb
|
344
|
-
- manual/graphics/stroke_cap.rb
|
345
|
-
- manual/graphics/stroke_dash.rb
|
346
|
-
- manual/graphics/stroke_join.rb
|
347
|
-
- manual/graphics/translate.rb
|
348
|
-
- manual/graphics/transparency.rb
|
349
|
-
- manual/how_to_read_this_manual.rb
|
350
|
-
- manual/images/absolute_position.rb
|
351
|
-
- manual/images/fit.rb
|
352
|
-
- manual/images/horizontal.rb
|
353
|
-
- manual/images/images.rb
|
354
|
-
- manual/images/plain_image.rb
|
355
|
-
- manual/images/scale.rb
|
356
|
-
- manual/images/vertical.rb
|
357
|
-
- manual/images/width_and_height.rb
|
358
|
-
- manual/layout/boxes.rb
|
359
|
-
- manual/layout/content.rb
|
360
|
-
- manual/layout/layout.rb
|
361
|
-
- manual/layout/simple_grid.rb
|
362
|
-
- manual/outline/add_subsection_to.rb
|
363
|
-
- manual/outline/insert_section_after.rb
|
364
|
-
- manual/outline/outline.rb
|
365
|
-
- manual/outline/sections_and_pages.rb
|
366
|
-
- manual/repeatable_content/alternate_page_numbering.rb
|
367
|
-
- manual/repeatable_content/page_numbering.rb
|
368
|
-
- manual/repeatable_content/repeatable_content.rb
|
369
|
-
- manual/repeatable_content/repeater.rb
|
370
|
-
- manual/repeatable_content/stamp.rb
|
371
|
-
- manual/security/encryption.rb
|
372
|
-
- manual/security/permissions.rb
|
373
|
-
- manual/security/security.rb
|
374
|
-
- manual/table.rb
|
375
|
-
- manual/text/alignment.rb
|
376
|
-
- manual/text/color.rb
|
377
|
-
- manual/text/column_box.rb
|
378
|
-
- manual/text/fallback_fonts.rb
|
379
|
-
- manual/text/font.rb
|
380
|
-
- manual/text/font_size.rb
|
381
|
-
- manual/text/font_style.rb
|
382
|
-
- manual/text/formatted_callbacks.rb
|
383
|
-
- manual/text/formatted_text.rb
|
384
|
-
- manual/text/free_flowing_text.rb
|
385
|
-
- manual/text/inline.rb
|
386
|
-
- manual/text/kerning_and_character_spacing.rb
|
387
|
-
- manual/text/leading.rb
|
388
|
-
- manual/text/line_wrapping.rb
|
389
|
-
- manual/text/paragraph_indentation.rb
|
390
|
-
- manual/text/positioned_text.rb
|
391
|
-
- manual/text/registering_families.rb
|
392
|
-
- manual/text/rendering_and_color.rb
|
393
|
-
- manual/text/right_to_left_text.rb
|
394
|
-
- manual/text/rotation.rb
|
395
|
-
- manual/text/single_usage.rb
|
396
|
-
- manual/text/text.rb
|
397
|
-
- manual/text/text_box_excess.rb
|
398
|
-
- manual/text/text_box_extensions.rb
|
399
|
-
- manual/text/text_box_overflow.rb
|
400
|
-
- manual/text/utf8.rb
|
401
|
-
- manual/text/win_ansi_charset.rb
|
402
|
-
- prawn.gemspec
|
403
|
-
- spec/data/curves.pdf
|
404
|
-
- spec/extensions/encoding_helpers.rb
|
405
|
-
- spec/prawn/document/bounding_box_spec.rb
|
406
|
-
- spec/prawn/document/column_box_spec.rb
|
407
|
-
- spec/prawn/document/security_spec.rb
|
408
|
-
- spec/prawn/document_annotations_spec.rb
|
409
|
-
- spec/prawn/document_destinations_spec.rb
|
410
|
-
- spec/prawn/document_grid_spec.rb
|
411
|
-
- spec/prawn/document_reference_spec.rb
|
412
|
-
- spec/prawn/document_span_spec.rb
|
413
|
-
- spec/prawn/document_spec.rb
|
414
|
-
- spec/prawn/font_metric_cache_spec.rb
|
415
|
-
- spec/prawn/font_spec.rb
|
416
|
-
- spec/prawn/graphics/blend_mode_spec.rb
|
417
|
-
- spec/prawn/graphics/transparency_spec.rb
|
418
|
-
- spec/prawn/graphics_spec.rb
|
419
|
-
- spec/prawn/graphics_stroke_styles_spec.rb
|
420
|
-
- spec/prawn/image_handler_spec.rb
|
421
|
-
- spec/prawn/images/jpg_spec.rb
|
422
|
-
- spec/prawn/images/png_spec.rb
|
423
|
-
- spec/prawn/images_spec.rb
|
424
|
-
- spec/prawn/measurements_extensions_spec.rb
|
425
|
-
- spec/prawn/outline_spec.rb
|
426
|
-
- spec/prawn/repeater_spec.rb
|
427
|
-
- spec/prawn/soft_mask_spec.rb
|
428
|
-
- spec/prawn/stamp_spec.rb
|
429
|
-
- spec/prawn/text/box_spec.rb
|
430
|
-
- spec/prawn/text/formatted/arranger_spec.rb
|
431
|
-
- spec/prawn/text/formatted/box_spec.rb
|
432
|
-
- spec/prawn/text/formatted/fragment_spec.rb
|
433
|
-
- spec/prawn/text/formatted/line_wrap_spec.rb
|
434
|
-
- spec/prawn/text/formatted/parser_spec.rb
|
435
|
-
- spec/prawn/text_draw_text_spec.rb
|
436
|
-
- spec/prawn/text_rendering_mode_spec.rb
|
437
|
-
- spec/prawn/text_spacing_spec.rb
|
438
|
-
- spec/prawn/text_spec.rb
|
439
|
-
- spec/prawn/text_with_inline_formatting_spec.rb
|
440
|
-
- spec/prawn/transformation_stack_spec.rb
|
441
|
-
- spec/prawn/view_spec.rb
|
442
|
-
- spec/prawn_manual_spec.rb
|
443
|
-
- spec/spec_helper.rb
|
444
|
-
homepage: http://prawnpdf.org
|
231
|
+
homepage: http://prawnpdf.org/
|
445
232
|
licenses:
|
446
|
-
-
|
447
|
-
- GPL-2.0
|
448
|
-
- GPL-3.0
|
449
|
-
metadata:
|
233
|
+
- Nonstandard
|
234
|
+
- GPL-2.0-only
|
235
|
+
- GPL-3.0-only
|
236
|
+
metadata:
|
237
|
+
rubygems_mfa_required: 'true'
|
238
|
+
homepage_uri: http://prawnpdf.org/
|
239
|
+
changelog_uri: https://github.com/prawnpdf/prawn/blob/2.5.0/CHANGELOG.md
|
240
|
+
source_code_uri: https://github.com/prawnpdf/prawn
|
241
|
+
documentation_uri: https://prawnpdf.org/docs/prawn/2.5.0/
|
242
|
+
bug_tracker_uri: https://github.com/prawnpdf/prawn/issues
|
450
243
|
post_install_message:
|
451
244
|
rdoc_options: []
|
452
245
|
require_paths:
|
453
246
|
- lib
|
454
247
|
required_ruby_version: !ruby/object:Gem::Requirement
|
455
248
|
requirements:
|
456
|
-
- - "
|
249
|
+
- - ">="
|
457
250
|
- !ruby/object:Gem::Version
|
458
|
-
version: '2.
|
251
|
+
version: '2.7'
|
459
252
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
460
253
|
requirements:
|
461
254
|
- - ">="
|
462
255
|
- !ruby/object:Gem::Version
|
463
256
|
version: 1.3.6
|
464
257
|
requirements: []
|
465
|
-
rubygems_version: 3.
|
258
|
+
rubygems_version: 3.5.3
|
466
259
|
signing_key:
|
467
260
|
specification_version: 4
|
468
261
|
summary: A fast and nimble PDF generator for Ruby
|
metadata.gz.sig
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
��
|
1
|
+
.��/熂�-tڨ�9��~&6����{�]|�o�$�w�����t
|
2
|
+
\fL�ܾ�C����s_��|!�Lf-sC�C����
|
3
|
+
��ܯ���8���oP:@�f����!�?��́���
|
data/.yardopts
DELETED
data/Gemfile
DELETED
data/Rakefile
DELETED
@@ -1,54 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'rake'
|
4
|
-
require 'rspec/core/rake_task'
|
5
|
-
require 'yard'
|
6
|
-
require 'rubygems/package_task'
|
7
|
-
require 'rubocop/rake_task'
|
8
|
-
|
9
|
-
task default: %i[spec rubocop]
|
10
|
-
|
11
|
-
desc 'Run all rspec files'
|
12
|
-
RSpec::Core::RakeTask.new('spec') do |c|
|
13
|
-
c.rspec_opts = '-t ~unresolved'
|
14
|
-
end
|
15
|
-
|
16
|
-
YARD::Rake::YardocTask.new do |t|
|
17
|
-
t.options = ['--output-dir', 'doc/html']
|
18
|
-
end
|
19
|
-
task docs: :yard
|
20
|
-
|
21
|
-
desc "Generate the 'Prawn by Example' manual"
|
22
|
-
task :manual do
|
23
|
-
puts 'Building manual...'
|
24
|
-
require File.expand_path(File.join(__dir__, %w[manual contents]))
|
25
|
-
prawn_manual_document.render_file('manual.pdf')
|
26
|
-
puts 'The Prawn manual is available at manual.pdf. Happy Prawning!'
|
27
|
-
end
|
28
|
-
|
29
|
-
spec = Gem::Specification.load 'prawn.gemspec'
|
30
|
-
Gem::PackageTask.new(spec) do |pkg|
|
31
|
-
pkg.need_zip = true
|
32
|
-
pkg.need_tar = true
|
33
|
-
end
|
34
|
-
|
35
|
-
desc 'Run a console with Prawn loaded'
|
36
|
-
task :console do
|
37
|
-
require 'irb'
|
38
|
-
require 'irb/completion'
|
39
|
-
require_relative 'lib/prawn'
|
40
|
-
Prawn.debug = true
|
41
|
-
|
42
|
-
ARGV.clear
|
43
|
-
IRB.start
|
44
|
-
end
|
45
|
-
|
46
|
-
RuboCop::RakeTask.new
|
47
|
-
|
48
|
-
task :checksum do
|
49
|
-
require 'digest/sha2'
|
50
|
-
built_gem_path = "prawn-#{Prawn::VERSION}.gem"
|
51
|
-
checksum = Digest::SHA512.new.hexdigest(File.read(built_gem_path))
|
52
|
-
checksum_path = "checksums/#{built_gem_path}.sha512"
|
53
|
-
File.write(checksum_path, checksum)
|
54
|
-
end
|
Binary file
|
@@ -1,26 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
# A PDF document is a collection of pages. When we create a new document be it
|
4
|
-
# with <code>Document.new</code> or on a <code>Document.generate</code> block
|
5
|
-
# one initial page is created for us.
|
6
|
-
#
|
7
|
-
# Some methods might create new pages automatically like <code>text</code> which
|
8
|
-
# will create a new page whenever the text string cannot fit on the current
|
9
|
-
# page.
|
10
|
-
#
|
11
|
-
# But what if you want to go to the next page by yourself? That is easy.
|
12
|
-
#
|
13
|
-
# Just use the <code>start_new_page</code> method and a shiny new page will be
|
14
|
-
# created for you just like in the following snippet.
|
15
|
-
|
16
|
-
require_relative '../example_helper'
|
17
|
-
|
18
|
-
filename = File.basename(__FILE__).gsub('.rb', '.pdf')
|
19
|
-
Prawn::ManualBuilder::Example.generate(filename) do
|
20
|
-
text "We are still on the initial page for this example. Now I'll ask " \
|
21
|
-
'Prawn to gently start a new page. Please follow me to the next page.'
|
22
|
-
|
23
|
-
start_new_page
|
24
|
-
|
25
|
-
text "See. We've left the previous page behind."
|
26
|
-
end
|
@@ -1,43 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
# Examples for Prawn basic concepts.
|
4
|
-
#
|
5
|
-
|
6
|
-
require_relative '../example_helper'
|
7
|
-
|
8
|
-
filename = File.basename(__FILE__).gsub('.rb', '.pdf')
|
9
|
-
Prawn::ManualBuilder::Example.generate(filename, page_size: 'FOLIO') do
|
10
|
-
package 'basic_concepts' do |p|
|
11
|
-
p.example 'creation', eval_source: false, full_source: true
|
12
|
-
p.example 'origin'
|
13
|
-
p.example 'cursor'
|
14
|
-
p.example 'other_cursor_helpers'
|
15
|
-
p.example 'adding_pages'
|
16
|
-
p.example 'measurement'
|
17
|
-
p.example 'view', eval_source: false, full_source: true
|
18
|
-
|
19
|
-
p.intro do
|
20
|
-
prose <<-TEXT
|
21
|
-
This chapter covers the minimum amount of functionality you'll need to
|
22
|
-
start using Prawn.
|
23
|
-
|
24
|
-
If you are new to Prawn this is the first chapter to read. Once you are
|
25
|
-
comfortable with the concepts shown here you might want to check the
|
26
|
-
Basics section of the Graphics, Bounding Box and Text sections.
|
27
|
-
|
28
|
-
The examples show:
|
29
|
-
TEXT
|
30
|
-
|
31
|
-
list(
|
32
|
-
'How to create new pdf documents in every possible way',
|
33
|
-
'Where the origin for the document coordinates is. What are Bounding '\
|
34
|
-
'Boxes and how they interact with the origin',
|
35
|
-
'How the cursor behaves',
|
36
|
-
'How to start new pages',
|
37
|
-
'What the base unit for measurement and coordinates is and how to use '\
|
38
|
-
'other convenient measures',
|
39
|
-
"How to build custom view objects that use Prawn's DSL"
|
40
|
-
)
|
41
|
-
end
|
42
|
-
end
|
43
|
-
end
|
@@ -1,38 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
# There are three ways to create a PDF Document in Prawn: creating a new
|
4
|
-
# <code>Prawn::Document</code> instance, or using the
|
5
|
-
# <code>Prawn::Document.generate</code> method with and without block arguments.
|
6
|
-
#
|
7
|
-
# The following snippet showcase each way by creating a simple document with
|
8
|
-
# some text drawn.
|
9
|
-
#
|
10
|
-
# When we instantiate the <code>Prawn::Document</code> object the actual pdf
|
11
|
-
# document will only be created after we call <code>render_file</code>.
|
12
|
-
#
|
13
|
-
# The generate method will render the actual pdf object after exiting the block.
|
14
|
-
# When we use it without a block argument the provided block is evaluated in the
|
15
|
-
# context of a newly created <code>Prawn::Document</code> instance. When we use
|
16
|
-
# it with a block argument a <code>Prawn::Document</code> instance is created
|
17
|
-
# and passed to the block.
|
18
|
-
#
|
19
|
-
# The generate method without block arguments requires
|
20
|
-
# less typing and defines and renders the pdf document in one shot.
|
21
|
-
# Almost all of the examples are coded this way.
|
22
|
-
|
23
|
-
require_relative '../example_helper'
|
24
|
-
|
25
|
-
# Assignment
|
26
|
-
pdf = Prawn::Document.new
|
27
|
-
pdf.text 'Hello World'
|
28
|
-
pdf.render_file 'assignment.pdf'
|
29
|
-
|
30
|
-
# Implicit Block
|
31
|
-
Prawn::Document.generate('implicit.pdf') do
|
32
|
-
text 'Hello World'
|
33
|
-
end
|
34
|
-
|
35
|
-
# Explicit Block
|
36
|
-
Prawn::Document.generate('explicit.pdf') do |pdf|
|
37
|
-
pdf.text 'Hello World'
|
38
|
-
end
|
@@ -1,32 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
# We normally write our documents from top to bottom and it is no different with
|
4
|
-
# Prawn. Even if the origin is on the bottom left corner we still fill the page
|
5
|
-
# from the top to the bottom. In other words the cursor for inserting content
|
6
|
-
# starts on the top of the page.
|
7
|
-
#
|
8
|
-
# Most of the functions that insert content on the page will start at the
|
9
|
-
# current cursor position and proceed to the bottom of the page.
|
10
|
-
#
|
11
|
-
# The following snippet shows how the cursor behaves when we add some text to
|
12
|
-
# the page and demonstrates some of the helpers to manage the cursor position.
|
13
|
-
# The <code>cursor</code> method returns the current cursor position.
|
14
|
-
|
15
|
-
require_relative '../example_helper'
|
16
|
-
|
17
|
-
filename = File.basename(__FILE__).gsub('.rb', '.pdf')
|
18
|
-
Prawn::ManualBuilder::Example.generate(filename) do
|
19
|
-
stroke_axis
|
20
|
-
|
21
|
-
text "the cursor is here: #{cursor}"
|
22
|
-
text "now it is here: #{cursor}"
|
23
|
-
|
24
|
-
move_down 200
|
25
|
-
text "on the first move the cursor went down to: #{cursor}"
|
26
|
-
|
27
|
-
move_up 100
|
28
|
-
text "on the second move the cursor went up to: #{cursor}"
|
29
|
-
|
30
|
-
move_cursor_to 50
|
31
|
-
text "on the last move the cursor went directly to: #{cursor}"
|
32
|
-
end
|
@@ -1,24 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
# The base unit in Prawn is the PDF Point. One PDF Point is equal to 1/72 of
|
4
|
-
# an inch.
|
5
|
-
#
|
6
|
-
# There is no need to waste time converting this measure. Prawn provides
|
7
|
-
# helpers for converting from other measurements
|
8
|
-
# to PDF Points.
|
9
|
-
#
|
10
|
-
# Just <code>require "prawn/measurement_extensions"</code> and it will mix some
|
11
|
-
# helpers onto <code>Numeric</code> for converting common measurement units to
|
12
|
-
# PDF Points.
|
13
|
-
|
14
|
-
require_relative '../example_helper'
|
15
|
-
|
16
|
-
filename = File.basename(__FILE__).gsub('.rb', '.pdf')
|
17
|
-
Prawn::ManualBuilder::Example.generate(filename) do
|
18
|
-
require 'prawn/measurement_extensions'
|
19
|
-
|
20
|
-
%i[mm cm dm m in yd ft].each do |measurement|
|
21
|
-
text "1 #{measurement} in PDF Points: #{1.send(measurement)} pt"
|
22
|
-
move_down 5.mm
|
23
|
-
end
|
24
|
-
end
|