Browse files

removed reference_pdfs and examples rake task. restored indent_paragr…

…aphs.rb example as a visual regression test
  • Loading branch information...
1 parent 6dcba1f commit 9cfce94633da5091c3aacc35c56e5cf0e4fcf8c0 @Bluejade Bluejade committed Apr 7, 2011
Showing with 24 additions and 12 deletions.
  1. +0 −12 Rakefile
  2. +24 −0 examples/text/indent_paragraphs.rb
  3. BIN reference_pdfs/alignment.pdf
  4. BIN reference_pdfs/background.pdf
  5. BIN reference_pdfs/basic_images.pdf
  6. BIN reference_pdfs/bill.pdf
  7. BIN reference_pdfs/bounding_box_grid.pdf
  8. BIN reference_pdfs/bounding_boxes.pdf
  9. BIN reference_pdfs/canvas.pdf
  10. BIN reference_pdfs/cell.pdf
  11. BIN reference_pdfs/checkerboard.pdf
  12. BIN reference_pdfs/chinese_flow.pdf
  13. BIN reference_pdfs/cmyk.pdf
  14. BIN reference_pdfs/column_box.pdf
  15. BIN reference_pdfs/column_gutter_grid.pdf
  16. BIN reference_pdfs/context_sensitive_headers.pdf
  17. BIN reference_pdfs/curves.pdf
  18. BIN reference_pdfs/dfont.pdf
  19. BIN reference_pdfs/euro.pdf
  20. BIN reference_pdfs/family_style.pdf
  21. BIN reference_pdfs/float.pdf
  22. BIN reference_pdfs/flow.pdf
  23. BIN reference_pdfs/font_calculations.pdf
  24. BIN reference_pdfs/font_size.pdf
  25. BIN reference_pdfs/header.pdf
  26. BIN reference_pdfs/hexagon.pdf
  27. BIN reference_pdfs/image-flow.pdf
  28. BIN reference_pdfs/image_fit.pdf
  29. BIN reference_pdfs/image_position.pdf
  30. BIN reference_pdfs/indent_paragraphs.pdf
  31. BIN reference_pdfs/indentation.pdf
  32. BIN reference_pdfs/inline_format_table.pdf
  33. BIN reference_pdfs/kerning.pdf
  34. BIN reference_pdfs/landscape_a4.pdf
  35. BIN reference_pdfs/landscape_legal.pdf
  36. BIN reference_pdfs/landscape_letter.pdf
  37. BIN reference_pdfs/lazy_bounding_boxes.pdf
  38. BIN reference_pdfs/lines.pdf
  39. BIN reference_pdfs/margin.pdf
  40. BIN reference_pdfs/measurement_units.pdf
  41. BIN reference_pdfs/metadata-info.pdf
  42. BIN reference_pdfs/multi-layout.pdf
  43. BIN reference_pdfs/multi_boxes.pdf
  44. BIN reference_pdfs/multi_page_table.pdf
  45. BIN reference_pdfs/outlines.pdf
  46. BIN reference_pdfs/padded_box.pdf
  47. BIN reference_pdfs/page_with_numbering.pdf
  48. BIN reference_pdfs/png_types.pdf
  49. BIN reference_pdfs/portrait_a4.pdf
  50. BIN reference_pdfs/portrait_legal.pdf
  51. BIN reference_pdfs/portrait_letter.pdf
  52. BIN reference_pdfs/pretty_polygons.pdf
  53. BIN reference_pdfs/remote_images.pdf
  54. BIN reference_pdfs/repeat.pdf
  55. BIN reference_pdfs/rotated_text.pdf
  56. BIN reference_pdfs/rounded_polygon.pdf
  57. BIN reference_pdfs/rounded_rectangle.pdf
  58. BIN reference_pdfs/ruport.pdf
  59. BIN reference_pdfs/russian_boxes.pdf
  60. BIN reference_pdfs/security_hello_foo.pdf
  61. BIN reference_pdfs/show_grid.pdf
  62. BIN reference_pdfs/simple_grid.pdf
  63. BIN reference_pdfs/simple_table.pdf
  64. BIN reference_pdfs/simple_text.pdf
  65. BIN reference_pdfs/simple_text_ttf.pdf
  66. BIN reference_pdfs/sjis.pdf
  67. BIN reference_pdfs/span.pdf
  68. BIN reference_pdfs/stamp.pdf
  69. BIN reference_pdfs/stretched_nesting.pdf
  70. BIN reference_pdfs/stroke_bounds.pdf
  71. BIN reference_pdfs/stroke_cap_and_join.pdf
  72. BIN reference_pdfs/stroke_dash.pdf
  73. BIN reference_pdfs/subtable.pdf
  74. BIN reference_pdfs/text_box.pdf
  75. BIN reference_pdfs/text_box_returning_excess.pdf
  76. BIN reference_pdfs/transformations.pdf
  77. BIN reference_pdfs/transparency.pdf
  78. BIN reference_pdfs/utf8.pdf
  79. BIN reference_pdfs/widths.pdf
  80. BIN reference_pdfs/win-ansi.pdf
View
12 Rakefile
@@ -34,17 +34,6 @@ Rake::RDocTask.new do |rdoc|
rdoc.main = "README"
rdoc.rdoc_dir = "doc/html"
rdoc.title = "Prawn Documentation"
-end
-
-desc "run all examples"
-task :examples do
- mkdir_p "output"
- examples = Dir["examples/**/*.rb"]
- t = Time.now
- puts "Running Examples"
- examples.each { |file| `ruby -Ilib #{file}` }
- puts "Ran in #{Time.now - t} s"
- `mv *.pdf output`
end
desc "Generate the 'Prawn by Example' manual"
@@ -60,4 +49,3 @@ Rake::GemPackageTask.new(spec) do |pkg|
pkg.need_zip = true
pkg.need_tar = true
end
-
View
24 examples/text/indent_paragraphs.rb
@@ -0,0 +1,24 @@
+# encoding: utf-8
+#
+# Example of two ways of indenting paragraphs
+#
+#
+require File.expand_path(File.join(File.dirname(__FILE__),
+ %w[.. example_helper]))
+
+Prawn::Document.generate "indent_paragraphs.pdf" do |pdf|
+ hello = "hello " * 50
+ world = "world " * 50
+ string = hello + "©\n" + world + "©"
+ pdf.text(string, :indent_paragraphs => 60, :align => :justify)
+
+ pdf.move_cursor_to(pdf.font.height)
+ pdf.text(string, :indent_paragraphs => 60, :align => :justify)
+
+ pdf.move_cursor_to(pdf.font.height * 3)
+ pdf.text(string, :indent_paragraphs => 60, :align => :justify)
+
+ # can also indent using a non-breaking space
+ nbsp = Prawn::Text::NBSP
+ pdf.text("\n\n\n\n#{nbsp * 10}" + hello + "\n#{nbsp * 10}" + world, :align => :justify)
+end
View
BIN reference_pdfs/alignment.pdf
Binary file not shown.
View
BIN reference_pdfs/background.pdf
Binary file not shown.
View
BIN reference_pdfs/basic_images.pdf
Binary file not shown.
View
BIN reference_pdfs/bill.pdf
Binary file not shown.
View
BIN reference_pdfs/bounding_box_grid.pdf
Binary file not shown.
View
BIN reference_pdfs/bounding_boxes.pdf
Binary file not shown.
View
BIN reference_pdfs/canvas.pdf
Binary file not shown.
View
BIN reference_pdfs/cell.pdf
Binary file not shown.
View
BIN reference_pdfs/checkerboard.pdf
Binary file not shown.
View
BIN reference_pdfs/chinese_flow.pdf
Binary file not shown.
View
BIN reference_pdfs/cmyk.pdf
Binary file not shown.
View
BIN reference_pdfs/column_box.pdf
Binary file not shown.
View
BIN reference_pdfs/column_gutter_grid.pdf
Binary file not shown.
View
BIN reference_pdfs/context_sensitive_headers.pdf
Binary file not shown.
View
BIN reference_pdfs/curves.pdf
Binary file not shown.
View
BIN reference_pdfs/dfont.pdf
Binary file not shown.
View
BIN reference_pdfs/euro.pdf
Binary file not shown.
View
BIN reference_pdfs/family_style.pdf
Binary file not shown.
View
BIN reference_pdfs/float.pdf
Binary file not shown.
View
BIN reference_pdfs/flow.pdf
Binary file not shown.
View
BIN reference_pdfs/font_calculations.pdf
Binary file not shown.
View
BIN reference_pdfs/font_size.pdf
Binary file not shown.
View
BIN reference_pdfs/header.pdf
Binary file not shown.
View
BIN reference_pdfs/hexagon.pdf
Binary file not shown.
View
BIN reference_pdfs/image-flow.pdf
Binary file not shown.
View
BIN reference_pdfs/image_fit.pdf
Binary file not shown.
View
BIN reference_pdfs/image_position.pdf
Binary file not shown.
View
BIN reference_pdfs/indent_paragraphs.pdf
Binary file not shown.
View
BIN reference_pdfs/indentation.pdf
Binary file not shown.
View
BIN reference_pdfs/inline_format_table.pdf
Binary file not shown.
View
BIN reference_pdfs/kerning.pdf
Binary file not shown.
View
BIN reference_pdfs/landscape_a4.pdf
Binary file not shown.
View
BIN reference_pdfs/landscape_legal.pdf
Binary file not shown.
View
BIN reference_pdfs/landscape_letter.pdf
Binary file not shown.
View
BIN reference_pdfs/lazy_bounding_boxes.pdf
Binary file not shown.
View
BIN reference_pdfs/lines.pdf
Binary file not shown.
View
BIN reference_pdfs/margin.pdf
Binary file not shown.
View
BIN reference_pdfs/measurement_units.pdf
Binary file not shown.
View
BIN reference_pdfs/metadata-info.pdf
Binary file not shown.
View
BIN reference_pdfs/multi-layout.pdf
Binary file not shown.
View
BIN reference_pdfs/multi_boxes.pdf
Binary file not shown.
View
BIN reference_pdfs/multi_page_table.pdf
Binary file not shown.
View
BIN reference_pdfs/outlines.pdf
Binary file not shown.
View
BIN reference_pdfs/padded_box.pdf
Binary file not shown.
View
BIN reference_pdfs/page_with_numbering.pdf
Binary file not shown.
View
BIN reference_pdfs/png_types.pdf
Binary file not shown.
View
BIN reference_pdfs/portrait_a4.pdf
Binary file not shown.
View
BIN reference_pdfs/portrait_legal.pdf
Binary file not shown.
View
BIN reference_pdfs/portrait_letter.pdf
Binary file not shown.
View
BIN reference_pdfs/pretty_polygons.pdf
Binary file not shown.
View
BIN reference_pdfs/remote_images.pdf
Binary file not shown.
View
BIN reference_pdfs/repeat.pdf
Binary file not shown.
View
BIN reference_pdfs/rotated_text.pdf
Binary file not shown.
View
BIN reference_pdfs/rounded_polygon.pdf
Binary file not shown.
View
BIN reference_pdfs/rounded_rectangle.pdf
Binary file not shown.
View
BIN reference_pdfs/ruport.pdf
Binary file not shown.
View
BIN reference_pdfs/russian_boxes.pdf
Binary file not shown.
View
BIN reference_pdfs/security_hello_foo.pdf
Binary file not shown.
View
BIN reference_pdfs/show_grid.pdf
Binary file not shown.
View
BIN reference_pdfs/simple_grid.pdf
Binary file not shown.
View
BIN reference_pdfs/simple_table.pdf
Binary file not shown.
View
BIN reference_pdfs/simple_text.pdf
Binary file not shown.
View
BIN reference_pdfs/simple_text_ttf.pdf
Binary file not shown.
View
BIN reference_pdfs/sjis.pdf
Binary file not shown.
View
BIN reference_pdfs/span.pdf
Binary file not shown.
View
BIN reference_pdfs/stamp.pdf
Binary file not shown.
View
BIN reference_pdfs/stretched_nesting.pdf
Binary file not shown.
View
BIN reference_pdfs/stroke_bounds.pdf
Binary file not shown.
View
BIN reference_pdfs/stroke_cap_and_join.pdf
Binary file not shown.
View
BIN reference_pdfs/stroke_dash.pdf
Binary file not shown.
View
BIN reference_pdfs/subtable.pdf
Binary file not shown.
View
BIN reference_pdfs/text_box.pdf
Binary file not shown.
View
BIN reference_pdfs/text_box_returning_excess.pdf
Binary file not shown.
View
BIN reference_pdfs/transformations.pdf
Binary file not shown.
View
BIN reference_pdfs/transparency.pdf
Binary file not shown.
View
BIN reference_pdfs/utf8.pdf
Binary file not shown.
View
BIN reference_pdfs/widths.pdf
Binary file not shown.
View
BIN reference_pdfs/win-ansi.pdf
Binary file not shown.

0 comments on commit 9cfce94

Please sign in to comment.