Method: MuPDF::Document#draw
- Defined in:
- lib/mupdf/document.rb
#draw(path:, page:, format: 'png', width: nil, height: nil, resolution: nil) ⇒ Object
60 61 62 63 64 65 66 67 68 |
# File 'lib/mupdf/document.rb', line 60 def draw(path:, page:, format: 'png', width: nil, height: nil, resolution: nil) args = ['draw', '-o', path, '-F', format, String(@pathname), String(page)] args << '-w' << width if width args << '-h' << height if height args << '-r' << resolution if resolution MuPDF.mutool(*args) end |