Skip to content

Instantly share code, notes, and snippets.

@moro
Created September 5, 2008 06:49
Show Gist options
  • Save moro/8934 to your computer and use it in GitHub Desktop.
Save moro/8934 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
=begin
- clone current source before execute this.
$ git clone --depth=1 git://github.com/sandal/prawn.git
- fix font in line 14
=end
$KCODE = "u"
$: << "./prawn/lib"
require 'prawn'
Prawn::Document.generate("test.pdf") do
font File.expand_path("~/Library/Fonts/M+2P+IPAG.ttf")
text("昔むかしあるところにおじいさんとおばあさんが住んでいました。おじいさんは" * 50,
:wrap=>:character)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment