Sha256: a5b9814af126ef743bdff90b44ca778a9d9ac1df477233c999a3d3aa54b5a9cb
Contents?: true
Size: 541 Bytes
Versions: 27
Compression:
Stored size: 541 Bytes
Contents
module BrDanfe module CceLib class Barcode def initialize(pdf, xml) @pdf = pdf @xml = Nokogiri::XML(xml) end def render @pdf.box(height: 50) do @pdf.move_down 40 barcode = Barby::Code128C.new(nfe_key) barcode.annotate_pdf(@pdf, x: @pdf.cursor, y: @pdf.cursor, height: 40) end end private def nfe_key node = @xml.css("procEventoNFe > evento > infEvento > chNFe") return node ? node.text : "" end end end end
Version data entries
27 entries across 27 versions & 1 rubygems