Prawn::Document::Destinations

Public Instance Methods

add_dest(name, reference) click to toggle source

Adds a new destination to the dests name tree (see #). The reference parameter will be converted into a Prawn::Reference if it is not already one.

    # File lib/prawn/document/destinations.rb, line 30
30:       def add_dest(name, reference)
31:         reference = ref!(reference) unless reference.is_a?(Prawn::Reference)
32:         dests.data.add(name, reference)
33:       end
dest_fit(page=current_page) click to toggle source

Return a Dest specification that will fit the given page into the viewport.

    # File lib/prawn/document/destinations.rb, line 45
45:       def dest_fit(page=current_page)
46:         [page, :Fit]
47:       end
dest_fit_bounds(page=current_page) click to toggle source

Return a Dest specfication that will fit the given page’s bounding box into the viewport.

    # File lib/prawn/document/destinations.rb, line 73
73:       def dest_fit_bounds(page=current_page)
74:         [page, :FitB]
75:       end
dest_fit_bounds_horizontally(top, page=current_page) click to toggle source

Same as #, but works on the page’s bounding box instead of the entire page.

    # File lib/prawn/document/destinations.rb, line 80
80:       def dest_fit_bounds_horizontally(top, page=current_page)
81:         [page, :FitBH, top]
82:       end
dest_fit_bounds_vertically(left, page=current_page) click to toggle source

Same as #, but works on the page’s bounding box instead of the entire page.

    # File lib/prawn/document/destinations.rb, line 87
87:       def dest_fit_bounds_vertically(left, page=current_page)
88:         [page, :FitBV, left]
89:       end
dest_fit_horizontally(top, page=current_page) click to toggle source

Return a Dest specification that will fit the given page horizontally into the viewport, aligned vertically at the given top coordinate.

    # File lib/prawn/document/destinations.rb, line 52
52:       def dest_fit_horizontally(top, page=current_page)
53:         [page, :FitH, top]
54:       end
dest_fit_rect(left, bottom, right, top, page=current_page) click to toggle source

Return a Dest specification that will fit the given rectangle into the viewport, for the given page.

    # File lib/prawn/document/destinations.rb, line 66
66:       def dest_fit_rect(left, bottom, right, top, page=current_page)
67:         [page, :FitR, left, bottom, right, top]
68:       end
dest_fit_vertically(left, page=current_page) click to toggle source

Return a Dest specification that will fit the given page vertically into the viewport, aligned horizontally at the given left coordinate.

    # File lib/prawn/document/destinations.rb, line 59
59:       def dest_fit_vertically(left, page=current_page)
60:         [page, :FitV, left]
61:       end
dest_xyz(left, top, zoom=nil, page=current_page) click to toggle source

Return a Dest specification for a specific location (and optional zoom level).

    # File lib/prawn/document/destinations.rb, line 38
38:       def dest_xyz(left, top, zoom=nil, page=current_page)
39:         [page, :XYZ, left, top, zoom]
40:       end
dests() click to toggle source

The Dests name tree in the Name dictionary (see Prawn::Document::Internal#names). This name tree is used to store named destinations (PDF spec 8.2.1). (For more on name trees, see section 3.8.4 in the PDF spec.)

    # File lib/prawn/document/destinations.rb, line 22
22:       def dests
23:         names.data[:Dests] ||= ref!(Prawn::NameTree::Node.new(self, NAME_TREE_CHILDREN_LIMIT))
24:       end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.