class

PDF::Objects::Reference

Inherits PDF::Objects::Base < Reference < Object

Represents a PDF indirect object reference.

An indirect reference consists of an object number, a generation number, and the keyword R. It refers to an indirect object defined elsewhere in the PDF file.

ref = PDF::Objects::Reference.new(5, 0)
ref.to_pdf # => "5 0 R"

Object numbers are positive integers. Generation numbers start at 0 and are incremented when an object is deleted and reused.

Constructors

new(object_number : Int32, generation : Int32 = 0)
Source

Instance methods

==(other : self)

Returns true if this reference is the same as other. Invokes same?.

generation
Source
hash(hasher)

See Object#hash(hasher)

object_number
Source
to_pdf

Serializes this object to PDF syntax.

Returns the PDF representation as a string.

Source