Demo Programs
The demo programs are also available for download separately from the main PDF::Writer distribution. This is primarily of interest to users who install PDF::Writer with RubyGems, because the demo programs are not easily accessible. This package includes:
manual.pwd: The text version of the manual that can be used with thetechbookcommand to generate the full 95-page PDF manual, which is also included with the demo package.chunkybacon.rb: A simple program to insert three images and two lines of text. (source) (PDF)code.rb: An example of a custom text formatting tag. Note that this tag doesn’t quite work as it should because of an as-yet unidentified bug in PDF::Writer’s tag handling code. (source) (PDF)colornames.rb: A program to generate colour names known to the color-tools package. (source) (PDF)demo.rb: Generates gradients and coloured text. (source) (PDF)gettysburg.rb: Creates a PDF with the Gettysburg Address wrapped in a rounded rectangle. (source) (PDF)hello.rb: A simple “Hello, Ruby” application for PDF::Writer. (source) (PDF)individual-i.rb: An example of drawing a vector graphic with PDF::Writer, translated from the Individual I website’s EPS version of the logo. (source) (PDF)pac.rb: A vector graphics image based on a famous video game. (source) (PDF)pagenumber.rb: An example for showing PDF::Writer’s page numbering. (source) (PDF)qr-language.rb: Generates a quick reference sheet for the Ruby language. Based on Ryan Davis’s quick reference sheet. (source) (PDF)qr-library.rb: Generates a quick reference sheet for the Ruby standard library. Based on Ryan Davis’s quick reference sheet. (source) (PDF)
If PDF::Writer has been installed with RubyGems, then the demos will need to be run explicitly referencing RubyGems:
% ruby -rubygems chunkybacon.rb