pdf-wrapper 0.0.7 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +11 -0
- data/Rakefile +4 -4
- data/examples/cell.rb +1 -1
- data/examples/image.rb +3 -3
- data/examples/markup.rb +12 -0
- data/examples/repeating.rb +1 -1
- data/examples/scaled.rb +38 -0
- data/examples/scaled_cells.rb +30 -0
- data/examples/scaled_image.rb +14 -0
- data/examples/shapes.rb +1 -1
- data/examples/table.rb +25 -4
- data/examples/translate.rb +21 -0
- data/examples/utf8-long.rb +1 -2
- data/examples/utf8.rb +1 -2
- data/lib/pdf/core.rb +23 -0
- data/lib/pdf/wrapper.rb +136 -760
- data/lib/pdf/wrapper/graphics.rb +116 -0
- data/lib/pdf/wrapper/images.rb +206 -0
- data/lib/pdf/wrapper/loading.rb +52 -0
- data/lib/pdf/wrapper/table.rb +473 -0
- data/lib/pdf/wrapper/text.rb +337 -0
- data/specs/data/windmill.jpg +0 -0
- data/specs/{shapes_spec.rb → graphics_spec.rb} +3 -3
- data/specs/spec_helper.rb +6 -1
- data/specs/tables_spec.rb +111 -0
- data/specs/text_spec.rb +63 -2
- data/specs/wrapper_spec.rb +145 -72
- metadata +20 -9
- data/examples/padded_image.rb +0 -12
- data/examples/template.rb +0 -13
data/examples/padded_image.rb
DELETED
@@ -1,12 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
# coding: utf-8
|
3
|
-
|
4
|
-
$:.unshift(File.dirname(__FILE__) + "/../lib")
|
5
|
-
|
6
|
-
require 'pdf/wrapper'
|
7
|
-
|
8
|
-
pdf = PDF::Wrapper.new(:paper => :A4)
|
9
|
-
pdf.rectangle(100, 100, 200, 200)
|
10
|
-
pdf.image(File.dirname(__FILE__) + "/../specs/data/zits.gif", :left => 100, :top => 100, :width => 200, :height => 200, :padding => 25, :proportional => true)
|
11
|
-
|
12
|
-
pdf.render_to_file("image.pdf")
|
data/examples/template.rb
DELETED
@@ -1,13 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
# coding: utf-8
|
3
|
-
|
4
|
-
$:.unshift(File.dirname(__FILE__) + "/../lib")
|
5
|
-
|
6
|
-
require 'pdf/wrapper'
|
7
|
-
|
8
|
-
pdf = PDF::Wrapper.new(:paper => :A4)
|
9
|
-
pdf.default_font("Sans Serif")
|
10
|
-
pdf.default_color(:black)
|
11
|
-
pdf.text "James", :font => "Monospace", :font_size => 8, :alignment => :left
|
12
|
-
#pdf.start_new_page()
|
13
|
-
pdf.render_to_file("template.pdf")
|