Class: Ucode::Glyphs::MutoolRenderer
- Inherits:
-
PageRenderer
- Object
- PageRenderer
- Ucode::Glyphs::MutoolRenderer
- Defined in:
- lib/ucode/glyphs/mutool_renderer.rb
Overview
‘mutool draw` from MuPDF — typically the fastest and cleanest. Emits one `<svg>` per page with `<path>` vector data.
Command: ‘mutool draw -F svg -o <out.svg> <in.pdf> <page>`
Constant Summary
Constants inherited from PageRenderer
PageRenderer::DEFAULT_SMOKE_FIXTURE, PageRenderer::OUTPUT_FORMAT
Class Method Summary collapse
Methods inherited from PageRenderer
all, available, available?, default, find, output_format, render, reset_working_cache!, working, works?
Class Method Details
.binary_name ⇒ Object
17 18 19 |
# File 'lib/ucode/glyphs/mutool_renderer.rb', line 17 def binary_name :mutool end |
.build_command(pdf_path, page_num, out_path) ⇒ Object
21 22 23 24 |
# File 'lib/ucode/glyphs/mutool_renderer.rb', line 21 def build_command(pdf_path, page_num, out_path) ["mutool", "draw", "-F", "svg", "-o", out_path.to_s, pdf_path.to_s, page_num.to_s] end |
.renderer_name ⇒ Object
13 14 15 |
# File 'lib/ucode/glyphs/mutool_renderer.rb', line 13 def renderer_name :mutool end |