def rebuild_xrefs
            size = 0
            startxref = @header.to_s.size

            @revisions.each do |revision|
                revision.each_object do |object|
                    startxref += object.to_s.size
                end

                size += revision.body.size
                revision.xreftable = build_xrefs(revision.objects)

                revision.trailer ||= Trailer.new
                revision.trailer.Size = size + 1
                revision.trailer.startxref = startxref

                startxref += revision.xreftable.to_s.size + revision.trailer.to_s.size
            end

            self
        end
def rebuild_xrefs
            size = 0
            startxref = @header.to_s.size

            @revisions.each do |revision|
                revision.each_object do |object|
                    startxref += object.to_s.size
                end

                size += revision.body.size
                revision.xreftable = build_xrefs(revision.objects)

                revision.trailer ||= Trailer.new
                revision.trailer.Size = size + 1
                revision.trailer.startxref = startxref

                startxref += revision.xreftable.to_s.size + revision.trailer.to_s.size
            end

            self
        end
Compute and update XRef::Section for each Revision.