fix page preview open

This commit is contained in:
Pete Matsyburka
2026-08-16 09:45:04 +03:00
parent cbbc75b485
commit eec08266c9
+9 -1
View File
@@ -640,7 +640,15 @@ class Pdfium
end
end
def self.open_io(io, password = nil)
def self.open_io(io, password = nil, &)
path = io.path if io.respond_to?(:path)
if path
io.flush
return open_file(path, password, &)
end
io.binmode
get_block = FFI::Function.new(:int, %i[pointer ulong pointer ulong]) do |_param, position, out, size|