#!/usr/bin/env ruby
# coding: utf-8

# List all callbacks generated by a single PDF
#
# WARNING: this will generate a *lot* of output, so you probably want to pipe
#          it through less or to a text file.

require 'rubygems'
require 'pdf/reader'

receiver = PDF::Reader::RegisterReceiver.new
pdf = PDF::Reader.file("somefile.pdf", receiver)
receiver.callbacks.each do |cb|
  puts cb
end
