Top Banner
Prawn Create PDFs with Ruby
18
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Prawn

PrawnCreate PDFs with Ruby

Page 2: Prawn

Tom Klaasen

• Co-founder of (http://10to1.be)

• @tomklaasen

• http://tomklaasen.net

Page 3: Prawn

Prawn

• Prawn takes the pain out of generating beautiful printable documents, while still remaining fast, tiny and nimble.

Page 4: Prawn

History

• Gregory Brown: “What if I could just do open source for a while, non-commercially?”

• http://www.oreillynet.com/ruby/blog/2008/03/id_love_to_quit_my_job_sort_of.html

Page 5: Prawn

Goals

• The features you need, without all the complexity

• Built in support for UTF-8

• Easy image embedding

• Flexible table drawing

• Simplified content positioning

Page 6: Prawn

Code Examples

Page 7: Prawn

“Hello, World”

Page 8: Prawn

Render a book

Page 9: Prawn

Render a book (2)

Page 10: Prawn

Render a book (3)

• PDF: 84 pages

• “Took 6.582318 to generate.”

Page 11: Prawn

Tables

Page 12: Prawn

Tables (2)

Page 13: Prawn

Bounding boxes

Page 14: Prawn

Bounding boxes (2)

Page 15: Prawn

The Future

• Now: alpha

• Project is gaining traction quickly

• First stable production release: June 2009

Page 16: Prawn

How to get it

• gem install prawn

Page 18: Prawn

Thank You

[email protected]

• @tomklaasen

• http://tomklaasen.net