This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
commit 29ff7a2b4c495964fff7bd0f5fa138de12878dc1
tree 7c88acdcec8d5926eb4ed0b03f9a67602ca0dae6
parent f67b351a490fe61a0e8c0ab243922e2f2b8a01a0
tree 7c88acdcec8d5926eb4ed0b03f9a67602ca0dae6
parent f67b351a490fe61a0e8c0ab243922e2f2b8a01a0
prawn /
| name | age | message | |
|---|---|---|---|
| |
.gitignore | Wed Nov 26 10:05:02 -0800 2008 | |
| |
.gitmodules | Sun Nov 30 20:19:02 -0800 2008 | |
| |
COPYING | Wed Apr 30 08:43:32 -0700 2008 | |
| |
HACKING | Tue Dec 16 00:31:35 -0800 2008 | |
| |
LICENSE | Wed Apr 30 08:43:32 -0700 2008 | |
| |
README | Sun Apr 19 09:22:47 -0700 2009 | |
| |
Rakefile | Sat Jun 20 06:31:18 -0700 2009 | |
| |
bench/ | Mon Dec 15 23:46:00 -0800 2008 | |
| |
bugs/ | Sun Apr 19 09:15:09 -0700 2009 | |
| |
data/ | Mon May 25 10:41:07 -0700 2009 | |
| |
examples/ | ||
| |
lib/ | ||
| |
manual/ | Sun Jan 04 19:26:40 -0800 2009 | |
| |
meta/ | Sat Jun 20 06:52:55 -0700 2009 | |
| |
reference_pdfs/ | Fri Sep 12 13:09:56 -0700 2008 | |
| |
spec/ | Sat Jun 20 06:52:55 -0700 2009 | |
| |
vendor/ | Fri Jan 23 13:56:03 -0800 2009 | |
| |
www/ | Thu Jan 29 09:34:27 -0800 2009 |
README
= Prawn: Fast, Nimble PDF Generation For Ruby Prawn is a PDF writing library for Ruby designed to be tiny, fast, and nimble, just like the majestic sea creature. Development on this library is made possible thanks to the many people who donated to the Ruby Mendicant project, http://rubymendicant.wikidot.com and continues today with the dedicated work of the Prawn pack. == Quick Start Getting started with Prawn can be as simple as: require 'prawn' pdf = Prawn::Document.new pdf.text("Prawn Rocks") pdf.render_file('prawn.pdf') But prawn can do a lot more: ===Any page size you can think of Prawn::Document.new('A0') ...gives you an _really_ big page. Prawn::Document.new(:size => [11.32, 8.49], :page_orientation => :portrait) ...giving you a postage stamp. {Learn more}[link:classes/Prawn/Document.html] ===Multiple Font Handling with UTF-8 Support pdf.text("Prawn Rocks") pdf.font("/myfont.ttf") pdf.text("Prawn still rocks in a different font") ...allowing you to use any font you want. {Learn more}[link:classes/Prawn/Font.html] ===Drawing graphics directly into the page Simple shapes: pdf.stroke do pdf.circle_at [100,100], :radius => 25 pdf.rectangle [300,300], 100, 200 end (note, you need to stroke the path to put "ink" there) {Learn more}[link:classes/Prawn/Graphics.html] ===Embedding JPEG and PNG Images Natively Reading an image directly from a file: prawn_logo = "#{Prawn::BASEDIR}/data/images/prawn_logo.png" pdf.image prawn_logo, :at => [50,450], :width => 450 Or reading it from an IO stream: require "open-uri" pdf.image open("http://prawn.majesticseacreature.com/media/prawn_logo.png") {Learn more}[link:classes/Prawn/Images.html] ===Measurement Conversion Tools for Your Sanity Prawn deals exclusively in PDF points... which work out to about 2.83464567mm... don't try and do it in your head, instead, let Prawn help you: require "prawn/measurement_extensions" Prawn::Document.generate(:page_layout => :portrait, :left_margin => 10.mm, # different :right_margin => 1.cm, # units :top_margin => 0.1.dm, # work :bottom_margin => 0.01.m, # well :page_size => 'A4') do text "Prawn Rocks" end {Learn more}[link:classes/Prawn/Measurements.html] == Resources === Website: http://prawn.majesticseacreature.com === Examples: http://github.com/sandal/prawn/tree/master/examples (or gem unpack prawn, if you want to run them locally) === Bug Tracker / Wiki: http://github.com/sandal/prawn/issues === GitHub: http://github.com/sandal/prawn === Mailing List: http://groups.google.com/group/prawn-ruby === IRC: Find us in #prawn on irc.freenode.net Gregory Brown: <sandal> James Healy: <yob> == Notes to Developers: See HACKING file for details on getting set up with a local build.








