Class: Ucode::Glyphs::EmbeddedFonts::Mutool::Draw
- Inherits:
-
Object
- Object
- Ucode::Glyphs::EmbeddedFonts::Mutool::Draw
- Defined in:
- lib/ucode/glyphs/embedded_fonts/mutool/draw.rb
Instance Method Summary collapse
-
#initialize(runner: SystemRunner.new) ⇒ Draw
constructor
A new instance of Draw.
- #svg(pdf, *pages) ⇒ Object
Constructor Details
#initialize(runner: SystemRunner.new) ⇒ Draw
Returns a new instance of Draw.
12 13 14 |
# File 'lib/ucode/glyphs/embedded_fonts/mutool/draw.rb', line 12 def initialize(runner: SystemRunner.new) @runner = runner end |
Instance Method Details
#svg(pdf, *pages) ⇒ Object
16 17 18 19 20 21 |
# File 'lib/ucode/glyphs/embedded_fonts/mutool/draw.rb', line 16 def svg(pdf, *pages) return "" if pages.empty? @runner.run("mutool", "draw", "-F", "svg", pdf.to_s, *pages.map(&:to_s)) end |