Archive

Archive for December, 2008

Dashed Lines In Prawn

December 26th, 2008 Patrick No comments

For a recent project, I’ve been using Prawn, a pretty robust PDF generation utility for Ruby. Generating PDFs is never fun, but Prawn (with the help of Ruby) makes it pretty easy.

One thing lacking in the Prawn library is the ability to make dashed lines. However, the logic of actually creating the dashed line isn’t that complex. You simply draw a solid line, but “pick up” the stroke every few pixels and allow some whitespace. Below is my code for creating multiple dashed lines on a page. It’s pretty simple to see how I’m creating a 2 pixel dash and then skipping 5 pixels forward (leaving 3 pixels of white.)

You can see the output here: dashed_lines.pdf

Dashed Lines In Prawn
Categories: ruby Tags:

Nice Shot

December 20th, 2008 Patrick No comments
Categories: General Tags:

The Shoessassin

December 15th, 2008 Patrick No comments
Categories: General Tags:

Hitler's Mad About The Browns 2008 Season

December 11th, 2008 Patrick No comments
Categories: General Tags:

Santa's Email

December 6th, 2008 Patrick No comments

Finally, an email forward that’s funny.


Click to enlarge

Santa's Email
Categories: General Tags:

One Man Band Thriller

December 1st, 2008 Patrick No comments
Categories: General Tags:

lowest common denominator is Digg proof thanks to caching by WP Super Cache