lib/hexapdf/cli/optimize.rb in hexapdf-0.8.0 vs lib/hexapdf/cli/optimize.rb in hexapdf-0.9.0
- old
+ new
@@ -85,10 +85,10 @@
page_tree.add_page(page)
retained[page.data] = true
end
doc.catalog[:Pages] = page_tree
- doc.each(current: false) do |obj, revision|
+ doc.each(only_current: false) do |obj, revision|
next unless obj.kind_of?(HexaPDF::Dictionary)
if (obj.type == :Pages || obj.type == :Page) && !retained.key?(obj.data)
revision.delete(obj)
end
end