prawn 1.0.0.rc1 → 1.0.0.rc2
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +18 -0
- data/README.md +5 -3
- data/Rakefile +8 -14
- data/data/pdfs/nested_pages.pdf +13 -13
- data/lib/prawn.rb +3 -1
- data/lib/prawn/compatibility.rb +46 -10
- data/lib/prawn/core.rb +3 -1
- data/lib/prawn/core/document_state.rb +2 -1
- data/lib/prawn/core/object_store.rb +61 -5
- data/lib/prawn/core/page.rb +3 -6
- data/lib/prawn/core/pdf_object.rb +21 -4
- data/lib/prawn/core/reference.rb +6 -2
- data/lib/prawn/core/text.rb +4 -4
- data/lib/prawn/core/text/formatted/line_wrap.rb +23 -8
- data/lib/prawn/document.rb +21 -15
- data/lib/prawn/document/bounding_box.rb +3 -3
- data/lib/prawn/document/column_box.rb +22 -4
- data/lib/prawn/document/snapshot.rb +1 -1
- data/lib/prawn/encoding.rb +1 -1
- data/lib/prawn/errors.rb +4 -0
- data/lib/prawn/font.rb +1 -1
- data/lib/prawn/font/afm.rb +30 -72
- data/lib/prawn/font/ttf.rb +6 -33
- data/lib/prawn/graphics.rb +148 -23
- data/lib/prawn/graphics/color.rb +8 -1
- data/lib/prawn/graphics/patterns.rb +137 -0
- data/lib/prawn/images.rb +25 -19
- data/lib/prawn/images/jpg.rb +4 -4
- data/lib/prawn/images/png.rb +18 -12
- data/lib/prawn/security.rb +6 -4
- data/lib/prawn/soft_mask.rb +94 -0
- data/lib/prawn/table.rb +136 -31
- data/lib/prawn/table/cell.rb +260 -29
- data/lib/prawn/table/cell/span_dummy.rb +88 -0
- data/lib/prawn/table/cell/text.rb +36 -14
- data/lib/prawn/table/cells.rb +91 -41
- data/lib/prawn/text.rb +3 -2
- data/lib/prawn/text/formatted/box.rb +14 -5
- data/lib/prawn/text/formatted/fragment.rb +33 -22
- data/lib/prawn/text/formatted/parser.rb +5 -2
- data/lib/prawn/utilities.rb +44 -0
- data/manual/basic_concepts/adding_pages.rb +27 -0
- data/manual/basic_concepts/basic_concepts.rb +34 -0
- data/manual/basic_concepts/creation.rb +39 -0
- data/manual/basic_concepts/cursor.rb +33 -0
- data/manual/basic_concepts/measurement.rb +25 -0
- data/manual/basic_concepts/origin.rb +38 -0
- data/manual/basic_concepts/other_cursor_helpers.rb +40 -0
- data/manual/bounding_box/bounding_box.rb +39 -0
- data/manual/bounding_box/bounds.rb +49 -0
- data/manual/bounding_box/canvas.rb +24 -0
- data/manual/bounding_box/creation.rb +23 -0
- data/manual/bounding_box/indentation.rb +46 -0
- data/manual/bounding_box/nesting.rb +45 -0
- data/manual/bounding_box/russian_boxes.rb +40 -0
- data/manual/bounding_box/stretchy.rb +31 -0
- data/manual/document_and_page_options/background.rb +27 -0
- data/manual/document_and_page_options/document_and_page_options.rb +31 -0
- data/manual/document_and_page_options/metadata.rb +23 -0
- data/manual/document_and_page_options/page_margins.rb +38 -0
- data/manual/document_and_page_options/page_size.rb +34 -0
- data/manual/example_file.rb +116 -0
- data/manual/example_helper.rb +430 -0
- data/manual/example_package.rb +53 -0
- data/manual/example_section.rb +46 -0
- data/manual/graphics/circle_and_ellipse.rb +22 -0
- data/manual/graphics/color.rb +24 -0
- data/manual/graphics/common_lines.rb +28 -0
- data/manual/graphics/fill_and_stroke.rb +42 -0
- data/manual/graphics/fill_rules.rb +37 -0
- data/manual/graphics/gradients.rb +37 -0
- data/manual/graphics/graphics.rb +58 -0
- data/manual/graphics/helper.rb +17 -0
- data/manual/graphics/line_width.rb +35 -0
- data/manual/graphics/lines_and_curves.rb +41 -0
- data/manual/graphics/polygon.rb +29 -0
- data/manual/graphics/rectangle.rb +21 -0
- data/manual/graphics/rotate.rb +28 -0
- data/manual/graphics/scale.rb +41 -0
- data/manual/graphics/soft_masks.rb +46 -0
- data/manual/graphics/stroke_cap.rb +31 -0
- data/manual/graphics/stroke_dash.rb +43 -0
- data/manual/graphics/stroke_join.rb +30 -0
- data/manual/graphics/translate.rb +29 -0
- data/manual/graphics/transparency.rb +35 -0
- data/manual/images/absolute_position.rb +23 -0
- data/manual/images/fit.rb +21 -0
- data/manual/images/horizontal.rb +25 -0
- data/manual/images/images.rb +40 -0
- data/manual/images/plain_image.rb +18 -0
- data/manual/images/scale.rb +22 -0
- data/manual/images/vertical.rb +28 -0
- data/manual/images/width_and_height.rb +25 -0
- data/manual/layout/boxes.rb +27 -0
- data/manual/layout/content.rb +25 -0
- data/manual/layout/layout.rb +28 -0
- data/manual/layout/simple_grid.rb +23 -0
- data/manual/manual/cover.rb +26 -0
- data/manual/manual/foreword.rb +13 -0
- data/manual/manual/how_to_read_this_manual.rb +41 -0
- data/manual/manual/manual.rb +36 -0
- data/manual/outline/add_subsection_to.rb +61 -0
- data/manual/outline/insert_section_after.rb +47 -0
- data/manual/outline/outline.rb +32 -0
- data/manual/outline/sections_and_pages.rb +67 -0
- data/manual/repeatable_content/page_numbering.rb +54 -0
- data/manual/repeatable_content/repeatable_content.rb +31 -0
- data/manual/repeatable_content/repeater.rb +55 -0
- data/manual/repeatable_content/stamp.rb +41 -0
- data/manual/security/encryption.rb +31 -0
- data/manual/security/permissions.rb +38 -0
- data/manual/security/security.rb +28 -0
- data/manual/syntax_highlight.rb +52 -0
- data/manual/table/basic_block.rb +53 -0
- data/manual/table/before_rendering_page.rb +26 -0
- data/manual/table/cell_border_lines.rb +24 -0
- data/manual/table/cell_borders_and_bg.rb +31 -0
- data/manual/table/cell_dimensions.rb +30 -0
- data/manual/table/cell_text.rb +38 -0
- data/manual/table/column_widths.rb +30 -0
- data/manual/table/content_and_subtables.rb +39 -0
- data/manual/table/creation.rb +27 -0
- data/manual/table/filtering.rb +36 -0
- data/manual/table/flow_and_header.rb +17 -0
- data/manual/table/image_cells.rb +33 -0
- data/manual/table/position.rb +29 -0
- data/manual/table/row_colors.rb +20 -0
- data/manual/table/span.rb +30 -0
- data/manual/table/style.rb +22 -0
- data/manual/table/table.rb +52 -0
- data/manual/table/width.rb +27 -0
- data/manual/templates/full_template.rb +23 -0
- data/manual/templates/page_template.rb +47 -0
- data/manual/templates/templates.rb +26 -0
- data/manual/text/alignment.rb +44 -0
- data/manual/text/color.rb +24 -0
- data/manual/text/column_box.rb +32 -0
- data/manual/text/fallback_fonts.rb +37 -0
- data/manual/text/font.rb +41 -0
- data/manual/text/font_size.rb +45 -0
- data/manual/text/font_style.rb +23 -0
- data/manual/text/formatted_callbacks.rb +60 -0
- data/manual/text/formatted_text.rb +50 -0
- data/manual/text/free_flowing_text.rb +51 -0
- data/manual/text/group.rb +29 -0
- data/manual/text/inline.rb +43 -0
- data/manual/text/kerning_and_character_spacing.rb +39 -0
- data/manual/text/leading.rb +25 -0
- data/manual/text/line_wrapping.rb +41 -0
- data/manual/text/paragraph_indentation.rb +26 -0
- data/manual/text/positioned_text.rb +38 -0
- data/manual/text/registering_families.rb +48 -0
- data/manual/text/rendering_and_color.rb +37 -0
- data/manual/text/right_to_left_text.rb +43 -0
- data/manual/text/rotation.rb +43 -0
- data/manual/text/single_usage.rb +37 -0
- data/manual/text/text.rb +75 -0
- data/manual/text/text_box_excess.rb +32 -0
- data/manual/text/text_box_extensions.rb +45 -0
- data/manual/text/text_box_overflow.rb +44 -0
- data/manual/text/utf8.rb +28 -0
- data/manual/text/win_ansi_charset.rb +59 -0
- data/prawn.gemspec +10 -7
- data/spec/bounding_box_spec.rb +107 -17
- data/spec/cell_spec.rb +66 -40
- data/spec/column_box_spec.rb +33 -0
- data/spec/document_spec.rb +45 -24
- data/spec/extensions/encoding_helpers.rb +6 -0
- data/spec/extensions/mocha.rb +1 -0
- data/spec/font_spec.rb +71 -53
- data/spec/formatted_text_arranger_spec.rb +19 -19
- data/spec/formatted_text_box_spec.rb +16 -16
- data/spec/formatted_text_fragment_spec.rb +6 -6
- data/spec/graphics_spec.rb +96 -31
- data/spec/grid_spec.rb +2 -2
- data/spec/images_spec.rb +18 -10
- data/spec/jpg_spec.rb +1 -1
- data/spec/line_wrap_spec.rb +14 -14
- data/spec/measurement_units_spec.rb +2 -2
- data/spec/name_tree_spec.rb +6 -6
- data/spec/object_store_spec.rb +17 -17
- data/spec/outline_spec.rb +35 -17
- data/spec/pdf_object_spec.rb +3 -1
- data/spec/png_spec.rb +22 -19
- data/spec/reference_spec.rb +24 -1
- data/spec/repeater_spec.rb +9 -9
- data/spec/security_spec.rb +3 -3
- data/spec/snapshot_spec.rb +3 -3
- data/spec/soft_mask_spec.rb +117 -0
- data/spec/span_spec.rb +4 -4
- data/spec/spec_helper.rb +12 -6
- data/spec/stamp_spec.rb +12 -12
- data/spec/stroke_styles_spec.rb +5 -5
- data/spec/table_spec.rb +458 -88
- data/spec/template_spec.rb +108 -54
- data/spec/text_at_spec.rb +17 -17
- data/spec/text_box_spec.rb +76 -45
- data/spec/text_rendering_mode_spec.rb +5 -5
- data/spec/text_spacing_spec.rb +4 -4
- data/spec/text_spec.rb +44 -40
- metadata +419 -250
- data/lib/prawn/graphics/gradient.rb +0 -84
- data/lib/prawn/security/arcfour.rb +0 -51
@@ -18,7 +18,7 @@ describe "#text_rendering_mode" do
|
|
18
18
|
@pdf.text("hello world")
|
19
19
|
end
|
20
20
|
contents = PDF::Inspector::Text.analyze(@pdf.render)
|
21
|
-
contents.text_rendering_mode.should
|
21
|
+
contents.text_rendering_mode.should be_empty
|
22
22
|
end
|
23
23
|
it "should restore character spacing to 0" do
|
24
24
|
create_pdf
|
@@ -36,10 +36,10 @@ describe "#text_rendering_mode" do
|
|
36
36
|
end
|
37
37
|
@pdf.text_rendering_mode.should == :fill
|
38
38
|
end
|
39
|
-
it "should
|
39
|
+
it "should raise_error an exception when passed an invalid mode" do
|
40
40
|
create_pdf
|
41
|
-
lambda { @pdf.text_rendering_mode(-1) }.should
|
42
|
-
lambda { @pdf.text_rendering_mode(8) }.should
|
43
|
-
lambda { @pdf.text_rendering_mode(:flil) }.should
|
41
|
+
lambda { @pdf.text_rendering_mode(-1) }.should raise_error(ArgumentError)
|
42
|
+
lambda { @pdf.text_rendering_mode(8) }.should raise_error(ArgumentError)
|
43
|
+
lambda { @pdf.text_rendering_mode(:flil) }.should raise_error(ArgumentError)
|
44
44
|
end
|
45
45
|
end
|
data/spec/text_spacing_spec.rb
CHANGED
@@ -18,7 +18,7 @@ describe "#character_spacing" do
|
|
18
18
|
@pdf.text("hello world")
|
19
19
|
end
|
20
20
|
contents = PDF::Inspector::Text.analyze(@pdf.render)
|
21
|
-
contents.character_spacing.should
|
21
|
+
contents.character_spacing.should be_empty
|
22
22
|
end
|
23
23
|
it "should restore character spacing to 0" do
|
24
24
|
create_pdf
|
@@ -42,7 +42,7 @@ describe "#character_spacing" do
|
|
42
42
|
#
|
43
43
|
it "should calculate character spacing widths by characters, not bytes" do
|
44
44
|
create_pdf
|
45
|
-
@pdf.font("#{Prawn::
|
45
|
+
@pdf.font("#{Prawn::DATADIR}/fonts/gkai00mp.ttf")
|
46
46
|
|
47
47
|
str = "こんにちは世界"
|
48
48
|
@pdf.character_spacing(0) do
|
@@ -51,7 +51,7 @@ describe "#character_spacing" do
|
|
51
51
|
|
52
52
|
@pdf.character_spacing(10) do
|
53
53
|
# the new width should include seven 10-pt character spaces.
|
54
|
-
@pdf.width_of(str).should.
|
54
|
+
@pdf.width_of(str).should be_within(0.001).of(@raw_width + (10 * 7))
|
55
55
|
end
|
56
56
|
end
|
57
57
|
end
|
@@ -72,7 +72,7 @@ describe "#word_spacing" do
|
|
72
72
|
@pdf.text("hello world")
|
73
73
|
end
|
74
74
|
contents = PDF::Inspector::Text.analyze(@pdf.render)
|
75
|
-
contents.word_spacing.should
|
75
|
+
contents.word_spacing.should be_empty
|
76
76
|
end
|
77
77
|
it "should restore word spacing to 0" do
|
78
78
|
create_pdf
|
data/spec/text_spec.rb
CHANGED
@@ -16,7 +16,7 @@ describe "#height_of" do
|
|
16
16
|
original_y = @pdf.y
|
17
17
|
@pdf.text("Foo")
|
18
18
|
new_y = @pdf.y
|
19
|
-
@pdf.height_of("Foo").should.
|
19
|
+
@pdf.height_of("Foo").should be_within(0.0001).of(original_y - new_y)
|
20
20
|
end
|
21
21
|
|
22
22
|
it "should omit the gap below the last descender if :final_gap => false " +
|
@@ -24,27 +24,27 @@ describe "#height_of" do
|
|
24
24
|
original_y = @pdf.y
|
25
25
|
@pdf.text("Foo", :final_gap => false)
|
26
26
|
new_y = @pdf.y
|
27
|
-
@pdf.height_of("Foo", :final_gap => false).should.
|
27
|
+
@pdf.height_of("Foo", :final_gap => false).should be_within(0.0001).of(original_y - new_y)
|
28
28
|
end
|
29
29
|
|
30
|
-
it "should
|
30
|
+
it "should raise_error CannotFit if a too-small width is given" do
|
31
31
|
lambda do
|
32
32
|
@pdf.height_of("text", :width => 1)
|
33
|
-
end.should
|
33
|
+
end.should raise_error(Prawn::Errors::CannotFit)
|
34
34
|
end
|
35
35
|
|
36
|
-
it "should
|
36
|
+
it "should raise_error NotImplementedError if :indent_paragraphs option is provided" do
|
37
37
|
lambda {
|
38
38
|
@pdf.height_of("hai", :width => 300,
|
39
39
|
:indent_paragraphs => 60)
|
40
|
-
}.should
|
40
|
+
}.should raise_error(NotImplementedError)
|
41
41
|
end
|
42
42
|
|
43
|
-
it "
|
43
|
+
it "should_not raise_error Prawn::Errors::UnknownOption if :final_gap option is provided" do
|
44
44
|
lambda {
|
45
45
|
@pdf.height_of("hai", :width => 300,
|
46
46
|
:final_gap => true)
|
47
|
-
}.
|
47
|
+
}.should_not raise_error(Prawn::Errors::UnknownOption)
|
48
48
|
end
|
49
49
|
end
|
50
50
|
|
@@ -57,7 +57,7 @@ describe "#text" do
|
|
57
57
|
pdf = Prawn::Document.new
|
58
58
|
lambda {
|
59
59
|
pdf.text "transparency " * 150, :size => 18
|
60
|
-
}.
|
60
|
+
}.should_not raise_error(TypeError)
|
61
61
|
end
|
62
62
|
|
63
63
|
it "should allow drawing empty strings to the page" do
|
@@ -66,6 +66,10 @@ describe "#text" do
|
|
66
66
|
# If anything is rendered to the page, it should be whitespace.
|
67
67
|
text.strings.each { |str| str.should =~ /\A\s*\z/ }
|
68
68
|
end
|
69
|
+
|
70
|
+
it "should ignore call when string is nil" do
|
71
|
+
@pdf.text(nil).should be_false
|
72
|
+
end
|
69
73
|
|
70
74
|
it "should correctly render empty paragraphs" do
|
71
75
|
@pdf.text "text\n\ntext"
|
@@ -92,13 +96,13 @@ describe "#text" do
|
|
92
96
|
it "should default to use kerning information" do
|
93
97
|
@pdf.text "hello world"
|
94
98
|
text = PDF::Inspector::Text.analyze(@pdf.render)
|
95
|
-
text.kerned[0].should
|
99
|
+
text.kerned[0].should be_true
|
96
100
|
end
|
97
101
|
|
98
102
|
it "should be able to disable kerning with an option" do
|
99
103
|
@pdf.text "hello world", :kerning => false
|
100
104
|
text = PDF::Inspector::Text.analyze(@pdf.render)
|
101
|
-
text.kerned[0].should
|
105
|
+
text.kerned[0].should be_false
|
102
106
|
end
|
103
107
|
|
104
108
|
it "should be able to disable kerning document-wide" do
|
@@ -106,29 +110,29 @@ describe "#text" do
|
|
106
110
|
@pdf.default_kerning = false
|
107
111
|
@pdf.text "hello world"
|
108
112
|
text = PDF::Inspector::Text.analyze(@pdf.render)
|
109
|
-
text.kerned[0].should
|
113
|
+
text.kerned[0].should be_false
|
110
114
|
end
|
111
115
|
|
112
116
|
it "option should be able to override document-wide kerning disabling" do
|
113
117
|
@pdf.default_kerning = false
|
114
118
|
@pdf.text "hello world", :kerning => true
|
115
119
|
text = PDF::Inspector::Text.analyze(@pdf.render)
|
116
|
-
text.kerned[0].should
|
120
|
+
text.kerned[0].should be_true
|
117
121
|
end
|
118
122
|
|
119
|
-
it "should
|
120
|
-
lambda { @pdf.text("hai", :at => [0, 0]) }.should
|
123
|
+
it "should raise_error ArgumentError if :at option included" do
|
124
|
+
lambda { @pdf.text("hai", :at => [0, 0]) }.should raise_error(ArgumentError)
|
121
125
|
end
|
122
126
|
|
123
127
|
it "should advance down the document based on font_height" do
|
124
128
|
position = @pdf.y
|
125
129
|
@pdf.text "Foo"
|
126
130
|
|
127
|
-
@pdf.y.should.
|
131
|
+
@pdf.y.should be_within(0.0001).of(position - @pdf.font.height)
|
128
132
|
|
129
133
|
position = @pdf.y
|
130
134
|
@pdf.text "Foo\nBar\nBaz"
|
131
|
-
@pdf.y.should.
|
135
|
+
@pdf.y.should be_within(0.0001).of(position - 3*@pdf.font.height)
|
132
136
|
end
|
133
137
|
|
134
138
|
it "should advance down the document based on font_height" +
|
@@ -137,11 +141,11 @@ describe "#text" do
|
|
137
141
|
@pdf.text "Foo", :size => 15
|
138
142
|
|
139
143
|
@pdf.font_size = 15
|
140
|
-
@pdf.y.should.
|
144
|
+
@pdf.y.should be_within(0.0001).of(position - @pdf.font.height)
|
141
145
|
|
142
146
|
position = @pdf.y
|
143
147
|
@pdf.text "Foo\nBar\nBaz"
|
144
|
-
@pdf.y.should.
|
148
|
+
@pdf.y.should be_within(0.0001).of(position - 3 * @pdf.font.height)
|
145
149
|
end
|
146
150
|
|
147
151
|
it "should advance down the document based on font_height" +
|
@@ -150,11 +154,11 @@ describe "#text" do
|
|
150
154
|
leading = 2
|
151
155
|
@pdf.text "Foo", :leading => leading
|
152
156
|
|
153
|
-
@pdf.y.should.
|
157
|
+
@pdf.y.should be_within(0.0001).of(position - @pdf.font.height - leading)
|
154
158
|
|
155
159
|
position = @pdf.y
|
156
160
|
@pdf.text "Foo\nBar\nBaz"
|
157
|
-
@pdf.y.should.
|
161
|
+
@pdf.y.should be_within(0.0001).of(position - 3*@pdf.font.height)
|
158
162
|
end
|
159
163
|
|
160
164
|
it "should advance only to the bottom of the final descender "+
|
@@ -162,11 +166,11 @@ describe "#text" do
|
|
162
166
|
position = @pdf.y
|
163
167
|
@pdf.text "Foo", :final_gap => false
|
164
168
|
|
165
|
-
@pdf.y.should.
|
169
|
+
@pdf.y.should be_within(0.0001).of(position - @pdf.font.ascender - @pdf.font.descender)
|
166
170
|
|
167
171
|
position = @pdf.y
|
168
172
|
@pdf.text "Foo\nBar\nBaz", :final_gap => false
|
169
|
-
@pdf.y.should.
|
173
|
+
@pdf.y.should be_within(0.0001).of(position - 2*@pdf.font.height - @pdf.font.ascender - @pdf.font.descender)
|
170
174
|
end
|
171
175
|
|
172
176
|
it "should be able to print text starting at the last line of a page" do
|
@@ -253,14 +257,14 @@ describe "#text" do
|
|
253
257
|
text.font_settings[1][:name].should == :Helvetica
|
254
258
|
end
|
255
259
|
|
256
|
-
it "should
|
257
|
-
lambda { @pdf.font "Pao bu" }.should
|
260
|
+
it "should raise_error an exception when an unknown font is used" do
|
261
|
+
lambda { @pdf.font "Pao bu" }.should raise_error(Prawn::Errors::UnknownFont)
|
258
262
|
end
|
259
263
|
|
260
|
-
it "
|
264
|
+
it "should_not raise_error an exception when providing Pathname instance as font" do
|
261
265
|
lambda {
|
262
|
-
@pdf.font Pathname.new("#{Prawn::
|
263
|
-
}.
|
266
|
+
@pdf.font Pathname.new("#{Prawn::DATADIR}/fonts/comicsans.ttf")
|
267
|
+
}.should_not raise_error(Prawn::Errors::UnknownFont)
|
264
268
|
end
|
265
269
|
|
266
270
|
it "should correctly render a utf-8 string when using a built-in font" do
|
@@ -274,7 +278,7 @@ describe "#text" do
|
|
274
278
|
|
275
279
|
it "should correctly render a utf-8 string when using a TTF font" do
|
276
280
|
str = "©" # copyright symbol
|
277
|
-
@pdf.font "#{Prawn::
|
281
|
+
@pdf.font "#{Prawn::DATADIR}/fonts/DejaVuSans.ttf"
|
278
282
|
@pdf.text str
|
279
283
|
|
280
284
|
# grab the text from the rendered PDF and ensure it matches
|
@@ -308,29 +312,29 @@ describe "#text" do
|
|
308
312
|
|
309
313
|
if "spec".respond_to?(:encode!)
|
310
314
|
# Handle non utf-8 string encodings in a sane way on M17N aware VMs
|
311
|
-
it "should
|
315
|
+
it "should raise_error an exception when a utf-8 incompatible string is rendered" do
|
312
316
|
str = "Blah \xDD"
|
313
317
|
str.force_encoding("ASCII-8BIT")
|
314
|
-
lambda { @pdf.text str }.should
|
318
|
+
lambda { @pdf.text str }.should raise_error(
|
315
319
|
Prawn::Errors::IncompatibleStringEncoding)
|
316
320
|
end
|
317
|
-
it "
|
318
|
-
datafile = "#{Prawn::
|
321
|
+
it "should_not raise_error an exception when a shift-jis string is rendered" do
|
322
|
+
datafile = "#{Prawn::DATADIR}/shift_jis_text.txt"
|
319
323
|
sjis_str = File.open(datafile, "r:shift_jis") { |f| f.gets }
|
320
|
-
@pdf.font("#{Prawn::
|
321
|
-
lambda { @pdf.text sjis_str }.
|
324
|
+
@pdf.font("#{Prawn::DATADIR}/fonts/gkai00mp.ttf")
|
325
|
+
lambda { @pdf.text sjis_str }.should_not raise_error(
|
322
326
|
Prawn::Errors::IncompatibleStringEncoding)
|
323
327
|
end
|
324
328
|
else
|
325
329
|
# Handle non utf-8 string encodings in a sane way on non-M17N aware VMs
|
326
|
-
it "should
|
330
|
+
it "should raise_error an exception when a corrupt utf-8 string is rendered" do
|
327
331
|
str = "Blah \xDD"
|
328
|
-
lambda { @pdf.text str }.should
|
332
|
+
lambda { @pdf.text str }.should raise_error(
|
329
333
|
Prawn::Errors::IncompatibleStringEncoding)
|
330
334
|
end
|
331
|
-
it "should
|
332
|
-
sjis_str = File.read("#{Prawn::
|
333
|
-
lambda { @pdf.text sjis_str }.should
|
335
|
+
it "should raise_error an exception when a shift-jis string is rendered" do
|
336
|
+
sjis_str = File.read("#{Prawn::DATADIR}/shift_jis_text.txt")
|
337
|
+
lambda { @pdf.text sjis_str }.should raise_error(
|
334
338
|
Prawn::Errors::IncompatibleStringEncoding)
|
335
339
|
end
|
336
340
|
end
|
metadata
CHANGED
@@ -1,17 +1,10 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: prawn
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0.rc2
|
5
5
|
prerelease: 6
|
6
|
-
segments:
|
7
|
-
- 1
|
8
|
-
- 0
|
9
|
-
- 0
|
10
|
-
- rc
|
11
|
-
- 1
|
12
|
-
version: 1.0.0.rc1
|
13
6
|
platform: ruby
|
14
|
-
authors:
|
7
|
+
authors:
|
15
8
|
- Gregory Brown
|
16
9
|
- Brad Ediger
|
17
10
|
- Daniel Nelson
|
@@ -20,339 +13,515 @@ authors:
|
|
20
13
|
autorequire:
|
21
14
|
bindir: bin
|
22
15
|
cert_chain: []
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
- !ruby/object:Gem::Dependency
|
16
|
+
date: 2013-03-01 00:00:00.000000000 Z
|
17
|
+
dependencies:
|
18
|
+
- !ruby/object:Gem::Dependency
|
27
19
|
name: pdf-reader
|
28
|
-
|
29
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
20
|
+
requirement: !ruby/object:Gem::Requirement
|
30
21
|
none: false
|
31
|
-
requirements:
|
32
|
-
- -
|
33
|
-
- !ruby/object:Gem::Version
|
34
|
-
hash: 59
|
35
|
-
segments:
|
36
|
-
- 0
|
37
|
-
- 9
|
38
|
-
- 0
|
22
|
+
requirements:
|
23
|
+
- - ! '>='
|
24
|
+
- !ruby/object:Gem::Version
|
39
25
|
version: 0.9.0
|
26
|
+
- - <
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
version: '2.0'
|
40
29
|
type: :runtime
|
41
|
-
|
42
|
-
|
30
|
+
prerelease: false
|
31
|
+
version_requirements: !ruby/object:Gem::Requirement
|
32
|
+
none: false
|
33
|
+
requirements:
|
34
|
+
- - ! '>='
|
35
|
+
- !ruby/object:Gem::Version
|
36
|
+
version: 0.9.0
|
37
|
+
- - <
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '2.0'
|
40
|
+
- !ruby/object:Gem::Dependency
|
43
41
|
name: ttfunk
|
42
|
+
requirement: !ruby/object:Gem::Requirement
|
43
|
+
none: false
|
44
|
+
requirements:
|
45
|
+
- - ~>
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 1.0.3
|
48
|
+
type: :runtime
|
44
49
|
prerelease: false
|
45
|
-
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
46
51
|
none: false
|
47
|
-
requirements:
|
52
|
+
requirements:
|
48
53
|
- - ~>
|
49
|
-
- !ruby/object:Gem::Version
|
50
|
-
hash: 17
|
51
|
-
segments:
|
52
|
-
- 1
|
53
|
-
- 0
|
54
|
-
- 3
|
54
|
+
- !ruby/object:Gem::Version
|
55
55
|
version: 1.0.3
|
56
|
+
- !ruby/object:Gem::Dependency
|
57
|
+
name: ruby-rc4
|
58
|
+
requirement: !ruby/object:Gem::Requirement
|
59
|
+
none: false
|
60
|
+
requirements:
|
61
|
+
- - ! '>='
|
62
|
+
- !ruby/object:Gem::Version
|
63
|
+
version: '0'
|
64
|
+
type: :runtime
|
65
|
+
prerelease: false
|
66
|
+
version_requirements: !ruby/object:Gem::Requirement
|
67
|
+
none: false
|
68
|
+
requirements:
|
69
|
+
- - ! '>='
|
70
|
+
- !ruby/object:Gem::Version
|
71
|
+
version: '0'
|
72
|
+
- !ruby/object:Gem::Dependency
|
73
|
+
name: afm
|
74
|
+
requirement: !ruby/object:Gem::Requirement
|
75
|
+
none: false
|
76
|
+
requirements:
|
77
|
+
- - ! '>='
|
78
|
+
- !ruby/object:Gem::Version
|
79
|
+
version: '0'
|
56
80
|
type: :runtime
|
57
|
-
|
58
|
-
|
81
|
+
prerelease: false
|
82
|
+
version_requirements: !ruby/object:Gem::Requirement
|
83
|
+
none: false
|
84
|
+
requirements:
|
85
|
+
- - ! '>='
|
86
|
+
- !ruby/object:Gem::Version
|
87
|
+
version: '0'
|
88
|
+
- !ruby/object:Gem::Dependency
|
59
89
|
name: pdf-inspector
|
90
|
+
requirement: !ruby/object:Gem::Requirement
|
91
|
+
none: false
|
92
|
+
requirements:
|
93
|
+
- - ~>
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: 1.0.1
|
96
|
+
type: :development
|
60
97
|
prerelease: false
|
61
|
-
|
98
|
+
version_requirements: !ruby/object:Gem::Requirement
|
62
99
|
none: false
|
63
|
-
requirements:
|
100
|
+
requirements:
|
64
101
|
- - ~>
|
65
|
-
- !ruby/object:Gem::Version
|
66
|
-
hash: 21
|
67
|
-
segments:
|
68
|
-
- 1
|
69
|
-
- 0
|
70
|
-
- 1
|
102
|
+
- !ruby/object:Gem::Version
|
71
103
|
version: 1.0.1
|
104
|
+
- !ruby/object:Gem::Dependency
|
105
|
+
name: coderay
|
106
|
+
requirement: !ruby/object:Gem::Requirement
|
107
|
+
none: false
|
108
|
+
requirements:
|
109
|
+
- - ~>
|
110
|
+
- !ruby/object:Gem::Version
|
111
|
+
version: 1.0.7
|
72
112
|
type: :development
|
73
|
-
|
74
|
-
|
75
|
-
|
113
|
+
prerelease: false
|
114
|
+
version_requirements: !ruby/object:Gem::Requirement
|
115
|
+
none: false
|
116
|
+
requirements:
|
117
|
+
- - ~>
|
118
|
+
- !ruby/object:Gem::Version
|
119
|
+
version: 1.0.7
|
120
|
+
- !ruby/object:Gem::Dependency
|
121
|
+
name: rdoc
|
122
|
+
requirement: !ruby/object:Gem::Requirement
|
123
|
+
none: false
|
124
|
+
requirements:
|
125
|
+
- - ! '>='
|
126
|
+
- !ruby/object:Gem::Version
|
127
|
+
version: '0'
|
128
|
+
type: :development
|
129
|
+
prerelease: false
|
130
|
+
version_requirements: !ruby/object:Gem::Requirement
|
131
|
+
none: false
|
132
|
+
requirements:
|
133
|
+
- - ! '>='
|
134
|
+
- !ruby/object:Gem::Version
|
135
|
+
version: '0'
|
136
|
+
description: ! ' Prawn is a fast, tiny, and nimble PDF generator for Ruby
|
137
|
+
|
138
|
+
'
|
139
|
+
email:
|
76
140
|
- gregory.t.brown@gmail.com
|
77
141
|
- brad@bradediger.com
|
78
142
|
- dnelson@bluejade.com
|
79
143
|
- greenberg@entryway.net
|
80
144
|
- jimmy@deefa.com
|
81
145
|
executables: []
|
82
|
-
|
83
146
|
extensions: []
|
84
|
-
|
85
|
-
extra_rdoc_files:
|
147
|
+
extra_rdoc_files:
|
86
148
|
- README.md
|
87
149
|
- LICENSE
|
88
150
|
- COPYING
|
89
151
|
- GPLv2
|
90
152
|
- GPLv3
|
91
|
-
files:
|
92
|
-
- lib/prawn.rb
|
93
|
-
- lib/prawn/
|
94
|
-
- lib/prawn/
|
95
|
-
- lib/prawn/
|
96
|
-
- lib/prawn/
|
97
|
-
- lib/prawn/
|
98
|
-
- lib/prawn/
|
99
|
-
- lib/prawn/
|
100
|
-
- lib/prawn/
|
101
|
-
- lib/prawn/font/ttf.rb
|
102
|
-
- lib/prawn/font/afm.rb
|
103
|
-
- lib/prawn/font/dfont.rb
|
104
|
-
- lib/prawn/graphics/transparency.rb
|
105
|
-
- lib/prawn/graphics/gradient.rb
|
106
|
-
- lib/prawn/graphics/join_style.rb
|
107
|
-
- lib/prawn/graphics/transformation.rb
|
108
|
-
- lib/prawn/graphics/color.rb
|
109
|
-
- lib/prawn/graphics/dash.rb
|
110
|
-
- lib/prawn/graphics/cap_style.rb
|
153
|
+
files:
|
154
|
+
- lib/prawn/compatibility.rb
|
155
|
+
- lib/prawn/core/annotations.rb
|
156
|
+
- lib/prawn/core/byte_string.rb
|
157
|
+
- lib/prawn/core/destinations.rb
|
158
|
+
- lib/prawn/core/document_state.rb
|
159
|
+
- lib/prawn/core/literal_string.rb
|
160
|
+
- lib/prawn/core/name_tree.rb
|
161
|
+
- lib/prawn/core/object_store.rb
|
162
|
+
- lib/prawn/core/page.rb
|
111
163
|
- lib/prawn/core/pdf_object.rb
|
164
|
+
- lib/prawn/core/reference.rb
|
112
165
|
- lib/prawn/core/text/formatted/arranger.rb
|
113
166
|
- lib/prawn/core/text/formatted/line_wrap.rb
|
114
167
|
- lib/prawn/core/text/formatted/wrap.rb
|
115
|
-
- lib/prawn/core/reference.rb
|
116
|
-
- lib/prawn/core/object_store.rb
|
117
|
-
- lib/prawn/core/name_tree.rb
|
118
|
-
- lib/prawn/core/destinations.rb
|
119
|
-
- lib/prawn/core/byte_string.rb
|
120
|
-
- lib/prawn/core/annotations.rb
|
121
|
-
- lib/prawn/core/page.rb
|
122
|
-
- lib/prawn/core/document_state.rb
|
123
168
|
- lib/prawn/core/text.rb
|
124
|
-
- lib/prawn/core/literal_string.rb
|
125
|
-
- lib/prawn/errors.rb
|
126
|
-
- lib/prawn/compatibility.rb
|
127
|
-
- lib/prawn/table/cells.rb
|
128
|
-
- lib/prawn/table/cell.rb
|
129
|
-
- lib/prawn/table/cell/subtable.rb
|
130
|
-
- lib/prawn/table/cell/image.rb
|
131
|
-
- lib/prawn/table/cell/in_table.rb
|
132
|
-
- lib/prawn/table/cell/text.rb
|
133
169
|
- lib/prawn/core.rb
|
134
|
-
- lib/prawn/font.rb
|
135
|
-
- lib/prawn/measurements.rb
|
136
|
-
- lib/prawn/images.rb
|
137
|
-
- lib/prawn/layout/grid.rb
|
138
|
-
- lib/prawn/security/arcfour.rb
|
139
|
-
- lib/prawn/stamp.rb
|
140
|
-
- lib/prawn/encoding.rb
|
141
|
-
- lib/prawn/graphics.rb
|
142
|
-
- lib/prawn/document/snapshot.rb
|
143
170
|
- lib/prawn/document/bounding_box.rb
|
171
|
+
- lib/prawn/document/column_box.rb
|
144
172
|
- lib/prawn/document/graphics_state.rb
|
145
|
-
- lib/prawn/document/span.rb
|
146
|
-
- lib/prawn/document/page_geometry.rb
|
147
173
|
- lib/prawn/document/internals.rb
|
148
|
-
- lib/prawn/document/
|
174
|
+
- lib/prawn/document/page_geometry.rb
|
175
|
+
- lib/prawn/document/snapshot.rb
|
176
|
+
- lib/prawn/document/span.rb
|
177
|
+
- lib/prawn/document.rb
|
178
|
+
- lib/prawn/encoding.rb
|
179
|
+
- lib/prawn/errors.rb
|
180
|
+
- lib/prawn/font/afm.rb
|
181
|
+
- lib/prawn/font/dfont.rb
|
182
|
+
- lib/prawn/font/ttf.rb
|
183
|
+
- lib/prawn/font.rb
|
184
|
+
- lib/prawn/graphics/cap_style.rb
|
185
|
+
- lib/prawn/graphics/color.rb
|
186
|
+
- lib/prawn/graphics/dash.rb
|
187
|
+
- lib/prawn/graphics/join_style.rb
|
188
|
+
- lib/prawn/graphics/patterns.rb
|
189
|
+
- lib/prawn/graphics/transformation.rb
|
190
|
+
- lib/prawn/graphics/transparency.rb
|
191
|
+
- lib/prawn/graphics.rb
|
192
|
+
- lib/prawn/images/image.rb
|
193
|
+
- lib/prawn/images/jpg.rb
|
194
|
+
- lib/prawn/images/png.rb
|
195
|
+
- lib/prawn/images.rb
|
196
|
+
- lib/prawn/layout/grid.rb
|
149
197
|
- lib/prawn/layout.rb
|
150
|
-
- lib/prawn/
|
198
|
+
- lib/prawn/measurement_extensions.rb
|
199
|
+
- lib/prawn/measurements.rb
|
200
|
+
- lib/prawn/outline.rb
|
201
|
+
- lib/prawn/repeater.rb
|
151
202
|
- lib/prawn/security.rb
|
203
|
+
- lib/prawn/soft_mask.rb
|
204
|
+
- lib/prawn/stamp.rb
|
205
|
+
- lib/prawn/table/cell/image.rb
|
206
|
+
- lib/prawn/table/cell/in_table.rb
|
207
|
+
- lib/prawn/table/cell/span_dummy.rb
|
208
|
+
- lib/prawn/table/cell/subtable.rb
|
209
|
+
- lib/prawn/table/cell/text.rb
|
210
|
+
- lib/prawn/table/cell.rb
|
211
|
+
- lib/prawn/table/cells.rb
|
212
|
+
- lib/prawn/table.rb
|
213
|
+
- lib/prawn/text/box.rb
|
214
|
+
- lib/prawn/text/formatted/box.rb
|
215
|
+
- lib/prawn/text/formatted/fragment.rb
|
216
|
+
- lib/prawn/text/formatted/parser.rb
|
217
|
+
- lib/prawn/text/formatted.rb
|
152
218
|
- lib/prawn/text.rb
|
153
|
-
- lib/prawn/
|
154
|
-
- lib/prawn
|
155
|
-
-
|
156
|
-
-
|
219
|
+
- lib/prawn/utilities.rb
|
220
|
+
- lib/prawn.rb
|
221
|
+
- spec/annotations_spec.rb
|
222
|
+
- spec/bounding_box_spec.rb
|
223
|
+
- spec/cell_spec.rb
|
224
|
+
- spec/column_box_spec.rb
|
157
225
|
- spec/data/curves.pdf
|
158
|
-
- spec/
|
159
|
-
- spec/
|
160
|
-
- spec/
|
161
|
-
- spec/
|
162
|
-
- spec/
|
163
|
-
- spec/
|
164
|
-
- spec/span_spec.rb
|
165
|
-
- spec/security_spec.rb
|
166
|
-
- spec/name_tree_spec.rb
|
226
|
+
- spec/destinations_spec.rb
|
227
|
+
- spec/document_spec.rb
|
228
|
+
- spec/extensions/encoding_helpers.rb
|
229
|
+
- spec/extensions/mocha.rb
|
230
|
+
- spec/font_spec.rb
|
231
|
+
- spec/formatted_text_arranger_spec.rb
|
167
232
|
- spec/formatted_text_box_spec.rb
|
168
|
-
- spec/
|
169
|
-
- spec/stamp_spec.rb
|
233
|
+
- spec/formatted_text_fragment_spec.rb
|
170
234
|
- spec/graphics_spec.rb
|
171
|
-
- spec/text_with_inline_formatting_spec.rb
|
172
|
-
- spec/jpg_spec.rb
|
173
|
-
- spec/stroke_styles_spec.rb
|
174
|
-
- spec/annotations_spec.rb
|
175
|
-
- spec/text_rendering_mode_spec.rb
|
176
|
-
- spec/cell_spec.rb
|
177
235
|
- spec/grid_spec.rb
|
178
|
-
- spec/font_spec.rb
|
179
|
-
- spec/line_wrap_spec.rb
|
180
|
-
- spec/repeater_spec.rb
|
181
|
-
- spec/document_spec.rb
|
182
236
|
- spec/images_spec.rb
|
183
|
-
- spec/destinations_spec.rb
|
184
|
-
- spec/text_box_spec.rb
|
185
|
-
- spec/formatted_text_fragment_spec.rb
|
186
|
-
- spec/bounding_box_spec.rb
|
187
|
-
- spec/template_spec.rb
|
188
|
-
- spec/extensions/mocha.rb
|
189
|
-
- spec/measurement_units_spec.rb
|
190
237
|
- spec/inline_formatted_text_parser_spec.rb
|
238
|
+
- spec/jpg_spec.rb
|
239
|
+
- spec/line_wrap_spec.rb
|
240
|
+
- spec/measurement_units_spec.rb
|
241
|
+
- spec/name_tree_spec.rb
|
242
|
+
- spec/object_store_spec.rb
|
243
|
+
- spec/outline_spec.rb
|
244
|
+
- spec/pdf_object_spec.rb
|
245
|
+
- spec/png_spec.rb
|
191
246
|
- spec/reference_spec.rb
|
192
|
-
- spec/
|
193
|
-
- spec/
|
247
|
+
- spec/repeater_spec.rb
|
248
|
+
- spec/security_spec.rb
|
249
|
+
- spec/snapshot_spec.rb
|
250
|
+
- spec/soft_mask_spec.rb
|
251
|
+
- spec/span_spec.rb
|
252
|
+
- spec/spec_helper.rb
|
253
|
+
- spec/stamp_spec.rb
|
254
|
+
- spec/stroke_styles_spec.rb
|
194
255
|
- spec/table_spec.rb
|
195
|
-
- spec/
|
256
|
+
- spec/template_spec.rb
|
257
|
+
- spec/text_at_spec.rb
|
258
|
+
- spec/text_box_spec.rb
|
259
|
+
- spec/text_rendering_mode_spec.rb
|
196
260
|
- spec/text_spacing_spec.rb
|
261
|
+
- spec/text_spec.rb
|
262
|
+
- spec/text_with_inline_formatting_spec.rb
|
263
|
+
- spec/transparency_spec.rb
|
197
264
|
- data/encodings/win_ansi.txt
|
265
|
+
- data/fonts/Action Man.dfont
|
266
|
+
- data/fonts/Activa.ttf
|
267
|
+
- data/fonts/Chalkboard.ttf
|
268
|
+
- data/fonts/comicsans.ttf
|
198
269
|
- data/fonts/Courier-Bold.afm
|
199
|
-
- data/fonts/
|
270
|
+
- data/fonts/Courier-BoldOblique.afm
|
200
271
|
- data/fonts/Courier-Oblique.afm
|
201
272
|
- data/fonts/Courier.afm
|
202
|
-
- data/fonts/
|
203
|
-
- data/fonts/
|
273
|
+
- data/fonts/DejaVuSans.ttf
|
274
|
+
- data/fonts/Dustismo_Roman.ttf
|
275
|
+
- data/fonts/gkai00mp.ttf
|
276
|
+
- data/fonts/Helvetica-Bold.afm
|
204
277
|
- data/fonts/Helvetica-BoldOblique.afm
|
205
|
-
- data/fonts/
|
206
|
-
- data/fonts/
|
278
|
+
- data/fonts/Helvetica-Oblique.afm
|
279
|
+
- data/fonts/Helvetica.afm
|
207
280
|
- data/fonts/MustRead.html
|
208
|
-
- data/fonts/
|
281
|
+
- data/fonts/Symbol.afm
|
282
|
+
- data/fonts/Times-Bold.afm
|
209
283
|
- data/fonts/Times-BoldItalic.afm
|
284
|
+
- data/fonts/Times-Italic.afm
|
210
285
|
- data/fonts/Times-Roman.afm
|
211
|
-
- data/fonts/Chalkboard.ttf
|
212
|
-
- data/fonts/Dustismo_Roman.ttf
|
213
|
-
- data/fonts/comicsans.ttf
|
214
|
-
- data/fonts/Activa.ttf
|
215
286
|
- data/fonts/ZapfDingbats.afm
|
216
|
-
- data/
|
217
|
-
- data/
|
218
|
-
- data/
|
219
|
-
- data/
|
220
|
-
- data/
|
221
|
-
- data/pdfs/nested_pages.pdf
|
222
|
-
- data/pdfs/page_without_mediabox.pdf
|
223
|
-
- data/pdfs/two_hexagons.pdf
|
224
|
-
- data/pdfs/indirect_reference.pdf
|
225
|
-
- data/pdfs/multipage_template.pdf
|
226
|
-
- data/pdfs/resources_as_indirect_object.pdf
|
227
|
-
- data/pdfs/complex_template.pdf
|
228
|
-
- data/pdfs/hexagon.pdf
|
229
|
-
- data/pdfs/version_1_6.pdf
|
230
|
-
- data/pdfs/contains_ttf_font.pdf
|
231
|
-
- data/pdfs/encrypted.pdf
|
232
|
-
- data/pdfs/form.pdf
|
233
|
-
- data/images/stef.jpg
|
234
|
-
- data/images/web-links.dat
|
235
|
-
- data/images/ruport_transparent.png
|
236
|
-
- data/images/ruport_data.dat
|
287
|
+
- data/images/16bit.alpha
|
288
|
+
- data/images/16bit.dat
|
289
|
+
- data/images/16bit.png
|
290
|
+
- data/images/arrow.png
|
291
|
+
- data/images/arrow2.png
|
237
292
|
- data/images/barcode_issue.png
|
238
|
-
- data/images/
|
293
|
+
- data/images/dice.alpha
|
239
294
|
- data/images/dice.dat
|
240
|
-
- data/images/arrow2.png
|
241
295
|
- data/images/dice.png
|
242
|
-
- data/images/
|
243
|
-
- data/images/rails.dat
|
244
|
-
- data/images/page_white_text.alpha
|
245
|
-
- data/images/ruport.png
|
246
|
-
- data/images/16bit.alpha
|
296
|
+
- data/images/dice_interlaced.png
|
247
297
|
- data/images/fractal.jpg
|
248
|
-
- data/images/
|
249
|
-
- data/images/
|
298
|
+
- data/images/letterhead.jpg
|
299
|
+
- data/images/page_white_text.alpha
|
300
|
+
- data/images/page_white_text.dat
|
250
301
|
- data/images/page_white_text.png
|
302
|
+
- data/images/pigs.jpg
|
251
303
|
- data/images/prawn.png
|
252
|
-
- data/images/
|
253
|
-
- data/images/dice_interlaced.png
|
254
|
-
- data/images/arrow.png
|
255
|
-
- data/images/tru256.bmp
|
256
|
-
- data/images/dice.alpha
|
257
|
-
- data/images/ruport_type0.png
|
304
|
+
- data/images/rails.dat
|
258
305
|
- data/images/rails.png
|
259
|
-
- data/images/
|
306
|
+
- data/images/ruport.png
|
307
|
+
- data/images/ruport_data.dat
|
308
|
+
- data/images/ruport_transparent.png
|
309
|
+
- data/images/ruport_type0.png
|
310
|
+
- data/images/stef.jpg
|
311
|
+
- data/images/tru256.bmp
|
312
|
+
- data/images/web-links.dat
|
313
|
+
- data/images/web-links.png
|
314
|
+
- data/pdfs/complex_template.pdf
|
315
|
+
- data/pdfs/contains_ttf_font.pdf
|
316
|
+
- data/pdfs/encrypted.pdf
|
317
|
+
- data/pdfs/form.pdf
|
318
|
+
- data/pdfs/hexagon.pdf
|
319
|
+
- data/pdfs/indirect_reference.pdf
|
320
|
+
- data/pdfs/multipage_template.pdf
|
321
|
+
- data/pdfs/nested_pages.pdf
|
322
|
+
- data/pdfs/page_without_mediabox.pdf
|
323
|
+
- data/pdfs/resources_as_indirect_object.pdf
|
324
|
+
- data/pdfs/two_hexagons.pdf
|
325
|
+
- data/pdfs/version_1_6.pdf
|
326
|
+
- data/shift_jis_text.txt
|
327
|
+
- manual/basic_concepts/adding_pages.rb
|
328
|
+
- manual/basic_concepts/basic_concepts.rb
|
329
|
+
- manual/basic_concepts/creation.rb
|
330
|
+
- manual/basic_concepts/cursor.rb
|
331
|
+
- manual/basic_concepts/measurement.rb
|
332
|
+
- manual/basic_concepts/origin.rb
|
333
|
+
- manual/basic_concepts/other_cursor_helpers.rb
|
334
|
+
- manual/bounding_box/bounding_box.rb
|
335
|
+
- manual/bounding_box/bounds.rb
|
336
|
+
- manual/bounding_box/canvas.rb
|
337
|
+
- manual/bounding_box/creation.rb
|
338
|
+
- manual/bounding_box/indentation.rb
|
339
|
+
- manual/bounding_box/nesting.rb
|
340
|
+
- manual/bounding_box/russian_boxes.rb
|
341
|
+
- manual/bounding_box/stretchy.rb
|
342
|
+
- manual/document_and_page_options/background.rb
|
343
|
+
- manual/document_and_page_options/document_and_page_options.rb
|
344
|
+
- manual/document_and_page_options/metadata.rb
|
345
|
+
- manual/document_and_page_options/page_margins.rb
|
346
|
+
- manual/document_and_page_options/page_size.rb
|
347
|
+
- manual/example_file.rb
|
348
|
+
- manual/example_helper.rb
|
349
|
+
- manual/example_package.rb
|
350
|
+
- manual/example_section.rb
|
351
|
+
- manual/graphics/circle_and_ellipse.rb
|
352
|
+
- manual/graphics/color.rb
|
353
|
+
- manual/graphics/common_lines.rb
|
354
|
+
- manual/graphics/fill_and_stroke.rb
|
355
|
+
- manual/graphics/fill_rules.rb
|
356
|
+
- manual/graphics/gradients.rb
|
357
|
+
- manual/graphics/graphics.rb
|
358
|
+
- manual/graphics/helper.rb
|
359
|
+
- manual/graphics/line_width.rb
|
360
|
+
- manual/graphics/lines_and_curves.rb
|
361
|
+
- manual/graphics/polygon.rb
|
362
|
+
- manual/graphics/rectangle.rb
|
363
|
+
- manual/graphics/rotate.rb
|
364
|
+
- manual/graphics/scale.rb
|
365
|
+
- manual/graphics/soft_masks.rb
|
366
|
+
- manual/graphics/stroke_cap.rb
|
367
|
+
- manual/graphics/stroke_dash.rb
|
368
|
+
- manual/graphics/stroke_join.rb
|
369
|
+
- manual/graphics/translate.rb
|
370
|
+
- manual/graphics/transparency.rb
|
371
|
+
- manual/images/absolute_position.rb
|
372
|
+
- manual/images/fit.rb
|
373
|
+
- manual/images/horizontal.rb
|
374
|
+
- manual/images/images.rb
|
375
|
+
- manual/images/plain_image.rb
|
376
|
+
- manual/images/scale.rb
|
377
|
+
- manual/images/vertical.rb
|
378
|
+
- manual/images/width_and_height.rb
|
379
|
+
- manual/layout/boxes.rb
|
380
|
+
- manual/layout/content.rb
|
381
|
+
- manual/layout/layout.rb
|
382
|
+
- manual/layout/simple_grid.rb
|
383
|
+
- manual/manual/cover.rb
|
384
|
+
- manual/manual/foreword.rb
|
385
|
+
- manual/manual/how_to_read_this_manual.rb
|
386
|
+
- manual/manual/manual.rb
|
387
|
+
- manual/outline/add_subsection_to.rb
|
388
|
+
- manual/outline/insert_section_after.rb
|
389
|
+
- manual/outline/outline.rb
|
390
|
+
- manual/outline/sections_and_pages.rb
|
391
|
+
- manual/repeatable_content/page_numbering.rb
|
392
|
+
- manual/repeatable_content/repeatable_content.rb
|
393
|
+
- manual/repeatable_content/repeater.rb
|
394
|
+
- manual/repeatable_content/stamp.rb
|
395
|
+
- manual/security/encryption.rb
|
396
|
+
- manual/security/permissions.rb
|
397
|
+
- manual/security/security.rb
|
398
|
+
- manual/syntax_highlight.rb
|
399
|
+
- manual/table/basic_block.rb
|
400
|
+
- manual/table/before_rendering_page.rb
|
401
|
+
- manual/table/cell_border_lines.rb
|
402
|
+
- manual/table/cell_borders_and_bg.rb
|
403
|
+
- manual/table/cell_dimensions.rb
|
404
|
+
- manual/table/cell_text.rb
|
405
|
+
- manual/table/column_widths.rb
|
406
|
+
- manual/table/content_and_subtables.rb
|
407
|
+
- manual/table/creation.rb
|
408
|
+
- manual/table/filtering.rb
|
409
|
+
- manual/table/flow_and_header.rb
|
410
|
+
- manual/table/image_cells.rb
|
411
|
+
- manual/table/position.rb
|
412
|
+
- manual/table/row_colors.rb
|
413
|
+
- manual/table/span.rb
|
414
|
+
- manual/table/style.rb
|
415
|
+
- manual/table/table.rb
|
416
|
+
- manual/table/width.rb
|
417
|
+
- manual/templates/full_template.rb
|
418
|
+
- manual/templates/page_template.rb
|
419
|
+
- manual/templates/templates.rb
|
420
|
+
- manual/text/alignment.rb
|
421
|
+
- manual/text/color.rb
|
422
|
+
- manual/text/column_box.rb
|
423
|
+
- manual/text/fallback_fonts.rb
|
424
|
+
- manual/text/font.rb
|
425
|
+
- manual/text/font_size.rb
|
426
|
+
- manual/text/font_style.rb
|
427
|
+
- manual/text/formatted_callbacks.rb
|
428
|
+
- manual/text/formatted_text.rb
|
429
|
+
- manual/text/free_flowing_text.rb
|
430
|
+
- manual/text/group.rb
|
431
|
+
- manual/text/inline.rb
|
432
|
+
- manual/text/kerning_and_character_spacing.rb
|
433
|
+
- manual/text/leading.rb
|
434
|
+
- manual/text/line_wrapping.rb
|
435
|
+
- manual/text/paragraph_indentation.rb
|
436
|
+
- manual/text/positioned_text.rb
|
437
|
+
- manual/text/registering_families.rb
|
438
|
+
- manual/text/rendering_and_color.rb
|
439
|
+
- manual/text/right_to_left_text.rb
|
440
|
+
- manual/text/rotation.rb
|
441
|
+
- manual/text/single_usage.rb
|
442
|
+
- manual/text/text.rb
|
443
|
+
- manual/text/text_box_excess.rb
|
444
|
+
- manual/text/text_box_extensions.rb
|
445
|
+
- manual/text/text_box_overflow.rb
|
446
|
+
- manual/text/utf8.rb
|
447
|
+
- manual/text/win_ansi_charset.rb
|
260
448
|
- Rakefile
|
261
449
|
- prawn.gemspec
|
262
450
|
- COPYING
|
263
451
|
- LICENSE
|
264
452
|
- GPLv2
|
265
453
|
- GPLv3
|
454
|
+
- Gemfile
|
266
455
|
- README.md
|
267
456
|
homepage: http://prawn.majesticseacreature.com
|
268
457
|
licenses: []
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
A lot has changed recently in Prawn.
|
276
|
-
|
277
|
-
Please read the changelog for details:
|
278
|
-
|
279
|
-
https://github.com/sandal/prawn/wiki/CHANGELOG
|
280
|
-
|
281
|
-
|
282
|
-
********************************************
|
283
|
-
|
284
|
-
rdoc_options:
|
458
|
+
post_install_message: ! "\n ********************************************\n\n\n A
|
459
|
+
lot has changed recently in Prawn.\n\n Please read the changelog for details:\n\n
|
460
|
+
\ https://github.com/prawnpdf/prawn/wiki/CHANGELOG\n\n\n ********************************************\n\n"
|
461
|
+
rdoc_options:
|
285
462
|
- --title
|
286
463
|
- Prawn Documentation
|
287
464
|
- --main
|
288
465
|
- README.md
|
289
466
|
- -q
|
290
|
-
require_paths:
|
467
|
+
require_paths:
|
291
468
|
- lib
|
292
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
469
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
293
470
|
none: false
|
294
|
-
requirements:
|
295
|
-
- -
|
296
|
-
- !ruby/object:Gem::Version
|
297
|
-
hash: 57
|
298
|
-
segments:
|
299
|
-
- 1
|
300
|
-
- 8
|
301
|
-
- 7
|
471
|
+
requirements:
|
472
|
+
- - ! '>='
|
473
|
+
- !ruby/object:Gem::Version
|
302
474
|
version: 1.8.7
|
303
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
475
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
304
476
|
none: false
|
305
|
-
requirements:
|
306
|
-
- -
|
307
|
-
- !ruby/object:Gem::Version
|
308
|
-
hash: 23
|
309
|
-
segments:
|
310
|
-
- 1
|
311
|
-
- 3
|
312
|
-
- 6
|
477
|
+
requirements:
|
478
|
+
- - ! '>='
|
479
|
+
- !ruby/object:Gem::Version
|
313
480
|
version: 1.3.6
|
314
481
|
requirements: []
|
315
|
-
|
316
482
|
rubyforge_project: prawn
|
317
|
-
rubygems_version: 1.8.
|
483
|
+
rubygems_version: 1.8.23
|
318
484
|
signing_key:
|
319
485
|
specification_version: 3
|
320
486
|
summary: A fast and nimble PDF generator for Ruby
|
321
|
-
test_files:
|
322
|
-
- spec/text_spec.rb
|
323
|
-
- spec/snapshot_spec.rb
|
324
|
-
- spec/png_spec.rb
|
325
|
-
- spec/pdf_object_spec.rb
|
326
|
-
- spec/object_store_spec.rb
|
327
|
-
- spec/transparency_spec.rb
|
328
|
-
- spec/span_spec.rb
|
329
|
-
- spec/security_spec.rb
|
330
|
-
- spec/name_tree_spec.rb
|
331
|
-
- spec/formatted_text_box_spec.rb
|
332
|
-
- spec/stamp_spec.rb
|
333
|
-
- spec/graphics_spec.rb
|
334
|
-
- spec/text_with_inline_formatting_spec.rb
|
335
|
-
- spec/jpg_spec.rb
|
336
|
-
- spec/stroke_styles_spec.rb
|
487
|
+
test_files:
|
337
488
|
- spec/annotations_spec.rb
|
338
|
-
- spec/
|
489
|
+
- spec/bounding_box_spec.rb
|
339
490
|
- spec/cell_spec.rb
|
340
|
-
- spec/
|
341
|
-
- spec/font_spec.rb
|
342
|
-
- spec/line_wrap_spec.rb
|
343
|
-
- spec/repeater_spec.rb
|
344
|
-
- spec/document_spec.rb
|
345
|
-
- spec/images_spec.rb
|
491
|
+
- spec/column_box_spec.rb
|
346
492
|
- spec/destinations_spec.rb
|
347
|
-
- spec/
|
493
|
+
- spec/document_spec.rb
|
494
|
+
- spec/font_spec.rb
|
495
|
+
- spec/formatted_text_arranger_spec.rb
|
496
|
+
- spec/formatted_text_box_spec.rb
|
348
497
|
- spec/formatted_text_fragment_spec.rb
|
349
|
-
- spec/
|
350
|
-
- spec/
|
351
|
-
- spec/
|
498
|
+
- spec/graphics_spec.rb
|
499
|
+
- spec/grid_spec.rb
|
500
|
+
- spec/images_spec.rb
|
352
501
|
- spec/inline_formatted_text_parser_spec.rb
|
502
|
+
- spec/jpg_spec.rb
|
503
|
+
- spec/line_wrap_spec.rb
|
504
|
+
- spec/measurement_units_spec.rb
|
505
|
+
- spec/name_tree_spec.rb
|
506
|
+
- spec/object_store_spec.rb
|
507
|
+
- spec/outline_spec.rb
|
508
|
+
- spec/pdf_object_spec.rb
|
509
|
+
- spec/png_spec.rb
|
353
510
|
- spec/reference_spec.rb
|
354
|
-
- spec/
|
355
|
-
- spec/
|
511
|
+
- spec/repeater_spec.rb
|
512
|
+
- spec/security_spec.rb
|
513
|
+
- spec/snapshot_spec.rb
|
514
|
+
- spec/soft_mask_spec.rb
|
515
|
+
- spec/span_spec.rb
|
516
|
+
- spec/stamp_spec.rb
|
517
|
+
- spec/stroke_styles_spec.rb
|
356
518
|
- spec/table_spec.rb
|
357
|
-
- spec/
|
519
|
+
- spec/template_spec.rb
|
520
|
+
- spec/text_at_spec.rb
|
521
|
+
- spec/text_box_spec.rb
|
522
|
+
- spec/text_rendering_mode_spec.rb
|
358
523
|
- spec/text_spacing_spec.rb
|
524
|
+
- spec/text_spec.rb
|
525
|
+
- spec/text_with_inline_formatting_spec.rb
|
526
|
+
- spec/transparency_spec.rb
|
527
|
+
has_rdoc:
|