Parent

Methods

Class/Module Index [+]

Quicksearch

Origami::PDF::Header

Class representing a PDF Header.

Attributes

majorversion[RW]
minorversion[RW]

Public Class Methods

new(majorversion = 1, minorversion = 4) click to toggle source

Creates a file header, with the given major and minor versions.

majorversion

Major PDF version, must be 1.

minorversion

Minor PDF version, must be between 0 and 7.

# File lib/origami/header.rb, line 50
def initialize(majorversion = 1, minorversion = 4)

  #if majorversion.to_i != 1 || ! ((MINVERSION..MAXVERSION) === minorversion.to_i)
  #  Console.colorprint("[info ] Warning: Invalid file version : #{majorversion}.#{minorversion}\n", Console::Colors::YELLOW, false, STDERR) 
  #end

  @majorversion, @minorversion = majorversion, minorversion
end

Public Instance Methods

to_s() click to toggle source

Outputs self into PDF code.

# File lib/origami/header.rb, line 74
def to_s
  "%PDF-#{@majorversion}.#{@minorversion}" + EOL
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.