lib/hexapdf/parser.rb in hexapdf-0.23.0 vs lib/hexapdf/parser.rb in hexapdf-0.24.0
- old
+ new
@@ -2,11 +2,11 @@
#
#--
# This file is part of HexaPDF.
#
# HexaPDF - A Versatile PDF Creation and Manipulation Library For Ruby
-# Copyright (C) 2014-2021 Thomas Leitner
+# Copyright (C) 2014-2022 Thomas Leitner
#
# HexaPDF is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License version 3 as
# published by the Free Software Foundation with the addition of the
# following permission added to Section 15 as permitted in Section 7(a):
@@ -60,19 +60,13 @@
@tokenizer = Tokenizer.new(io, on_correctable_error: on_correctable_error)
@document = document
@object_stream_data = {}
@reconstructed_revision = nil
@in_reconstruct_revision = false
- @contains_xref_streams = false
retrieve_pdf_header_offset_and_version
end
- # Returns +true+ if the PDF file contains cross-reference streams.
- def contains_xref_streams?
- @contains_xref_streams
- end
-
# Returns +true+ if the PDF file was damaged and could be reconstructed.
def reconstructed?
!@reconstructed_revision.nil?
end
@@ -239,10 +233,9 @@
trailer = obj.trailer
unless xref_section.entry?(obj.oid, obj.gen)
maybe_raise("Cross-reference stream doesn't contain entry for itself", pos: pos)
xref_section.add_in_use_entry(obj.oid, obj.gen, pos)
end
- @contains_xref_streams = true
end
xref_section.delete(0)
[xref_section, trailer]
end