Prawn

font_metric_cache.rb : The Prawn font class

Copyright Dec 2012, Kenneth Kalmer. All Rights Reserved.

This is free software. Please see the LICENSE and COPYING files for details.


Copyright September 2008, Gregory Brown, James Healy All Rights Reserved.

This is free software. Please see the LICENSE and COPYING files for details.


grid.rb: Provides a basic grid layout system for Prawn

Contributed by Andrew O’Brien in March 2009

This is free software. Please see the LICENSE and COPYING files for details.


ImageHandler provides a way to register image processors with Prawn

Contributed by Evan Sharp in November 2013.

This is free software. Please see the LICENSE and COPYING files for details.


measurements.rb: Conversions from other measurements to PDF points

Copyright December 2008, Florian Witteler. All Rights Reserved.


repeater.rb : Implements repeated page elements. Heavy inspired by repeating_element() in PDF::Wrapper

http://pdf-wrapper.rubyforge.org/

Copyright November 2009, Gregory Brown. All Rights Reserved.

This is free software. Please see the LICENSE and COPYING files for details.


bounding_box.rb : Implements a mechanism for shifting the coordinate space

Copyright May 2008, Gregory Brown. All Rights Reserved.

This is free software. Please see the LICENSE and COPYING files for details.


internals.rb : Implements document internals for Prawn

Copyright August 2008, Gregory Brown. All Rights Reserved.

This is free software. Please see the LICENSE and COPYING files for details.


graphics_state.rb: Implements graphics state saving and restoring

Copyright January 2010, Michael Witrant. All Rights Reserved.

This is free software. Please see the LICENSE and COPYING files for details.


span.rb : Implements text columns

Copyright September 2008, Gregory Brown. All Rights Reserved.

This is free software. Please see the LICENSE and COPYING files for details.


transformation.rb: Implements rotate, translate, skew, scale and a generic

transformation_matrix

Copyright January 2010, Michael Witrant. All Rights Reserved.

This is free software. Please see the LICENSE and COPYING files for details.


join_style.rb : Implements stroke join styling

Contributed by Daniel Nelson. October, 2009

This is free software. Please see the LICENSE and COPYING files for details.


patterns.rb : Implements axial & radial gradients

Originally implemented by Wojciech Piekutowski. November, 2009 Copyright September 2012, Alexander Mankuta. All Rights Reserved.

This is free software. Please see the LICENSE and COPYING files for details.


dash.rb : Implements stroke dashing

Contributed by Daniel Nelson. October, 2009

This is free software. Please see the LICENSE and COPYING files for details.


color.rb : Implements color handling

Copyright June 2008, Gregory Brown. All Rights Reserved.

This is free software. Please see the LICENSE and COPYING files for details.


transparency.rb : Implements transparency

Copyright October 2009, Daniel Nelson. All Rights Reserved.

This is free software. Please see the LICENSE and COPYING files for details.


cap_style.rb : Implements stroke cap styling

Contributed by Daniel Nelson. October, 2009

This is free software. Please see the LICENSE and COPYING files for details.


soft_mask.rb : Implements soft-masking

Copyright September 2012, Alexander Mankuta. All Rights Reserved.

This is free software. Please see the LICENSE and COPYING files for details.


stamp.rb : Implements a repeatable stamp

Copyright October 2009, Daniel Nelson. All Rights Reserved.

This is free software. Please see the LICENSE and COPYING files for details.


errors.rb : Implements custom error classes for Prawn

Copyright April 2008, Gregory Brown. All Rights Reserved.

This is free software. Please see the LICENSE and COPYING files for details.


cells.rb: Methods for accessing rows, columns, and cells of a Prawn::Table.

Copyright December 2009, Brad Ediger. All Rights Reserved.

This is free software. Please see the LICENSE and COPYING files for details.


image.rb: Table image cells.

Copyright September 2010, Brad Ediger. All Rights Reserved.

This is free software. Please see the LICENSE and COPYING files for details.


subtable.rb: Yo dawg.

Copyright January 2010, Brad Ediger. All Rights Reserved.

This is free software. Please see the LICENSE and COPYING files for details.


text.rb: Text table cells.

Copyright December 2009, Gregory Brown and Brad Ediger. All Rights Reserved.

This is free software. Please see the LICENSE and COPYING files for details.


Accessors for using a Cell inside a Table.

Contributed by Brad Ediger.

This is free software. Please see the LICENSE and COPYING files for details.


span_dummy.rb: Placeholder for non-master spanned cells.

Copyright December 2011, Brad Ediger. All Rights Reserved.

This is free software. Please see the LICENSE and COPYING files for details.


core/text/formatted/line_wrap.rb : Implements individual line wrapping of

formatted text

Copyright February 2010, Daniel Nelson. All Rights Reserved.

This is free software. Please see the LICENSE and COPYING files for details.


core/text/formatted/arranger.rb : Implements a data structure for 2-stage

processing of lines of formatted text

Copyright February 2010, Daniel Nelson. All Rights Reserved.

This is free software. Please see the LICENSE and COPYING files for details.


text/formatted/parser.rb : Implements a bi-directional parser between a subset

of html and formatted text arrays

Copyright February 2010, Daniel Nelson. All Rights Reserved.

This is free software. Please see the LICENSE and COPYING files for details.


text/formatted/fragment.rb : Implements information about a formatted fragment

Copyright March 2010, Daniel Nelson. All Rights Reserved.

This is free software. Please see the LICENSE and COPYING files for details.


text/formatted/rectangle.rb : Implements text boxes with formatted text

Copyright February 2010, Daniel Nelson. All Rights Reserved.

This is free software. Please see the LICENSE and COPYING files for details.

Constants

BASEDIR

The base source directory for Prawn as installed on the system

DATADIR
FLOAT_PRECISION
VERSION

Attributes

debug[RW]

Whe set to true, Prawn will verify hash options to ensure only valid keys are used. Off by default.

Example:

>> Prawn::Document.new(:tomato => "Juicy")
Prawn::Errors::UnknownOption:
Detected unknown option(s): [:tomato]
Accepted options are: [:page_size, :page_layout, :left_margin, ...]

Public Class Methods

image_handler() click to toggle source

@group Extension API

# File lib/prawn/image_handler.rb, line 10
def self.image_handler
  @image_handler ||= ImageHandler.new
end

Public Instance Methods

verify_options(accepted, actual) click to toggle source
# File lib/prawn.rb, line 37
def verify_options(accepted, actual) # @private
  return unless debug || $DEBUG
  unless (act=Set[*actual.keys]).subset?(acc=Set[*accepted])
    raise Prawn::Errors::UnknownOption,
      "\nDetected unknown option(s): #{(act - acc).to_a.inspect}\n" <<
      "Accepted options are: #{accepted.inspect}"
  end
  yield if block_given?
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.