lib/libis/format/converter/pdf_converter.rb in libis-format-0.9.41 vs lib/libis/format/converter/pdf_converter.rb in libis-format-0.9.44
- old
+ new
@@ -1,13 +1,13 @@
# encoding: utf-8
require_relative 'base'
require 'libis/tools/extend/hash'
-require 'libis/format/pdf_copy'
-require 'libis/format/pdf_to_pdfa'
-require 'libis/format/pdf_optimizer'
+require 'libis/format/tool/pdf_copy'
+require 'libis/format/tool/pdf_to_pdfa'
+require 'libis/format/tool/pdf_optimizer'
module Libis
module Format
module Converter
@@ -124,11 +124,11 @@
end
def optimize_pdf(source, target, quality)
using_temp(target) do |tmpname|
- result = Libis::Format::PdfOptimizer.run(source, tmpname, quality)
+ result = Libis::Format::Tool::PdfOptimizer.run(source, tmpname, quality)
unless result[:status] == 0
error("Pdf optimization encountered errors:\n%s", (result[:err] + result[:out]).join('\n'))
next nil
end
tmpname
@@ -136,11 +136,11 @@
end
def convert_pdf(source, target)
using_temp(target) do |tmpname|
- result = Libis::Format::PdfCopy.run(
+ result = Libis::Format::Tool::PdfCopy.run(
source, tmpname,
@options.map { |k, v|
if v.nil?
nil
else
@@ -157,10 +157,10 @@
end
def pdf_to_pdfa(source, target)
using_temp(target) do |tmpname|
- result = Libis::Format::PdfToPdfa.run source, tmpname
+ result = Libis::Format::Tool::PdfToPdfa.run source, tmpname
unless result[:status] == 0
error("Pdf/A conversion encountered errors:\n%s", result[:err].join('\n'))
next nil
end
tmpname