def trailer
            #
            # First look for a standard trailer dictionary
            #
            if @revisions.last.trailer.dictionary?
                trl = @revisions.last.trailer

            #
            # Otherwise look for a xref stream.
            #
            else
                trl = @revisions.last.xrefstm
            end

            raise InvalidPDFError, "No trailer found" if trl.nil?

            trl
        end
def trailer
            #
            # First look for a standard trailer dictionary
            #
            if @revisions.last.trailer.dictionary?
                trl = @revisions.last.trailer

            #
            # Otherwise look for a xref stream.
            #
            else
                trl = @revisions.last.xrefstm
            end

            raise InvalidPDFError, "No trailer found" if trl.nil?

            trl
        end
Returns the current trailer.
 This might be either a Trailer or XRefStream.