asciidoctor-pdf
asciidoctor-pdf copied to clipboard
Allow optimizer to be pluggable
Currently, it's only possible to override the optimizer by implementing (or patching) the built-in Asciidoctor::PDF::Optimizer class (see README). Instead, it should be possible to pass a custom class or object to the API using the :pdf_optimizer
option.
The interface for the Optimizer is:
class Optimizer
def initialize quality, compliance_level; end
def optimize_file path; end
end
An alternative would be to allow the class to self register, similar to how the syntax highlighter adapters or converter work in core.