Sha256: a75edde898c93fe16a505dba0a39e642f62bcbc3d777b105674823f93272c2d4
Contents?: true
Size: 399 Bytes
Versions: 16
Compression:
Stored size: 399 Bytes
Contents
module BrInvoicesPdf class Generator PDF_OPTIONS = { page_size: 'A4', margin: [40, 75] }.freeze def initialize(renderer, parser) @renderer = renderer @parser = parser end def generate(xml, options) parsed_xml = Ox.parse(xml) data = @parser.parse(parsed_xml) opts = PDF_OPTIONS.merge(options) @renderer.pdf(data, opts).render end end end
Version data entries
16 entries across 16 versions & 1 rubygems