Sha256: 9d039e6abf54156b5b4673237af2fe76af90266bef3d4ce74e382beff0721c8b

Contents?: true

Size: 561 Bytes

Versions: 27

Compression:

Stored size: 561 Bytes

Contents

module BrDanfe
  class Cce
    def initialize(xml)
      @xml = xml
      @pdf = CceLib::Document.new
    end

    def save_pdf(filename)
      generate
      @pdf.render_file filename
    end

    def render_pdf
      generate
      @pdf.render
    end

    private
    def generate
      CceLib::Header.new(@pdf).render
      CceLib::Barcode.new(@pdf, @xml).render
      CceLib::NfeKey.new(@pdf, @xml).render
      CceLib::Protocol.new(@pdf, @xml).render
      CceLib::Correction.new(@pdf, @xml).render
      CceLib::Footer.new(@pdf).render
    end
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
br_danfe-0.11.1 lib/br_danfe/cce.rb
br_danfe-0.11.0 lib/br_danfe/cce.rb
br_danfe-0.10.1 lib/br_danfe/cce.rb
br_danfe-0.10.0 lib/br_danfe/cce.rb
br_danfe-0.8.0 lib/br_danfe/cce.rb
br_danfe-0.7.7 lib/br_danfe/cce.rb
br_danfe-0.7.6 lib/br_danfe/cce.rb
br_danfe-0.7.5 lib/br_danfe/cce.rb
br_danfe-0.7.4 lib/br_danfe/cce.rb
br_danfe-0.7.3 lib/br_danfe/cce.rb
br_danfe-0.7.2 lib/br_danfe/cce.rb
br_danfe-0.7.1 lib/br_danfe/cce.rb
br_danfe-0.7.0 lib/br_danfe/cce.rb
br_danfe-0.6.1 lib/br_danfe/cce.rb
br_danfe-0.6.0 lib/br_danfe/cce.rb
br_danfe-0.5.2 lib/br_danfe/cce.rb
br_danfe-0.5.1 lib/br_danfe/cce.rb
br_danfe-0.5.0 lib/br_danfe/cce.rb
br_danfe-0.4.3 lib/br_danfe/cce.rb
br_danfe-0.4.2 lib/br_danfe/cce.rb