fix page preview open
This commit is contained in:
+9
-1
@@ -640,7 +640,15 @@ class Pdfium
|
|||||||
end
|
end
|
||||||
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
|
io.binmode
|
||||||
|
|
||||||
get_block = FFI::Function.new(:int, %i[pointer ulong pointer ulong]) do |_param, position, out, size|
|
get_block = FFI::Function.new(:int, %i[pointer ulong pointer ulong]) do |_param, position, out, size|
|
||||||
|
|||||||
Reference in New Issue
Block a user