class PDF::Reader::Buffer

def ready_token (with_strip=true, skip_blanks=true)

This prepares the buffer for use by reading the next line of tokens into memory.
PDF files are processed by tokenising the content into a series of objects and commands.
###############################################################################
def ready_token (with_strip=true, skip_blanks=true)
  while @buffer.nil? or @buffer.empty?
    @buffer = @io.readline
    @buffer.force_encoding("BINARY") if @buffer.respond_to?(:force_encoding)
    #@buffer.sub!(/%.*$/, '') if strip_comments
    @buffer.chomp!
    break unless skip_blanks
  end
  @buffer.lstrip! if with_strip
end