Sha256: 290270b8bebbe8adffe0eae27a5341f0fbc9dd75d81953539117e11c4c34c2d2

Contents?: true

Size: 583 Bytes

Versions: 9

Compression:

Stored size: 583 Bytes

Contents

require 'rails_connector/fop_on_rails/document/dom_tree'
require 'rails_connector/fop_on_rails/document/images'
require 'rails_connector/fop_on_rails/document/tables'

module RailsConnector
  module FopOnRails
    module Document
      def self.repair(path, xml_uri = nil)
        xml = DomTree.repair(File.read(path))

        if xml_uri
          Images.absolutize_src_attrs(xml, xml_uri)
        else
          Images.dump_images(xml)
        end

        Tables.repair(xml)

        File.open(path, 'w') do |f|
          f.write(xml.to_s)
        end
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
infopark_rails_connector-6.8.0.515.34928522 lib/rails_connector/fop_on_rails/document.rb
infopark_rails_connector-6.8.0.498.46559598 lib/rails_connector/fop_on_rails/document.rb
infopark_rails_connector-6.8.0.480.261594408 lib/rails_connector/fop_on_rails/document.rb
infopark_rails_connector-6.8.0.444.171626367 lib/rails_connector/fop_on_rails/document.rb
infopark_rails_connector-6.8.0.406.131718077 lib/rails_connector/fop_on_rails/document.rb
infopark_rails_connector-6.8.0.356.19698103 lib/rails_connector/fop_on_rails/document.rb
infopark_rails_connector-6.8.0.348.160665197 lib/rails_connector/fop_on_rails/document.rb
infopark_rails_connector-6.8.0.328.4a753fc lib/rails_connector/fop_on_rails/document.rb
infopark_rails_connector-6.8.0.322.c003f11 lib/rails_connector/fop_on_rails/document.rb