libis-format 1.0.4 → 2.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (232) hide show
  1. checksums.yaml +5 -5
  2. data/.gitignore +5 -1
  3. data/.travis.yml +43 -25
  4. data/README.md +2 -2
  5. data/base/Dockerfile +35 -0
  6. data/base/Dockerfile.alpine +20 -0
  7. data/base/Dockerfile.rvm +56 -0
  8. data/base/rework_path +20 -0
  9. data/docker_cfg.yml +1 -0
  10. data/lib/libis/format.rb +12 -3
  11. data/lib/libis/format/cli/convert.rb +4 -4
  12. data/lib/libis/format/config.rb +15 -10
  13. data/lib/libis/format/converter/audio_converter.rb +3 -37
  14. data/lib/libis/format/converter/base.rb +22 -8
  15. data/lib/libis/format/converter/chain.rb +3 -3
  16. data/lib/libis/format/converter/image_assembler.rb +82 -0
  17. data/lib/libis/format/converter/image_converter.rb +20 -138
  18. data/lib/libis/format/converter/image_splitter.rb +84 -0
  19. data/lib/libis/format/converter/image_watermarker.rb +261 -0
  20. data/lib/libis/format/converter/jp2_converter.rb +2 -2
  21. data/lib/libis/format/converter/office_converter.rb +2 -2
  22. data/lib/libis/format/converter/pdf_assembler.rb +66 -0
  23. data/lib/libis/format/converter/pdf_converter.rb +10 -134
  24. data/lib/libis/format/converter/pdf_metadata.rb +82 -0
  25. data/lib/libis/format/converter/pdf_optimizer.rb +67 -0
  26. data/lib/libis/format/converter/pdf_protecter.rb +147 -0
  27. data/lib/libis/format/converter/pdf_selecter.rb +83 -0
  28. data/lib/libis/format/converter/pdf_splitter.rb +70 -0
  29. data/lib/libis/format/converter/pdf_watermarker_header.rb +71 -0
  30. data/lib/libis/format/converter/pdf_watermarker_image.rb +76 -0
  31. data/lib/libis/format/converter/pdf_watermarker_text.rb +93 -0
  32. data/lib/libis/format/converter/spreadsheet_converter.rb +2 -2
  33. data/lib/libis/format/converter/video_converter.rb +1 -1
  34. data/lib/libis/format/identifier.rb +3 -3
  35. data/lib/libis/format/info.rb +27 -0
  36. data/lib/libis/format/library.rb +147 -0
  37. data/lib/libis/format/tool.rb +4 -1
  38. data/lib/libis/format/tool/droid.rb +2 -2
  39. data/lib/libis/format/tool/extension_identification.rb +4 -4
  40. data/lib/libis/format/tool/ffmpeg.rb +1 -1
  41. data/lib/libis/format/tool/fido.rb +1 -1
  42. data/lib/libis/format/tool/fop_pdf.rb +1 -1
  43. data/lib/libis/format/tool/identification_tool.rb +6 -6
  44. data/lib/libis/format/tool/office_to_pdf.rb +1 -1
  45. data/lib/libis/format/tool/pdf_merge.rb +4 -4
  46. data/lib/libis/format/tool/{pdf_copy.rb → pdf_metadata.rb} +6 -6
  47. data/lib/libis/format/tool/pdf_protect.rb +47 -0
  48. data/lib/libis/format/tool/pdf_select.rb +47 -0
  49. data/lib/libis/format/tool/pdf_split.rb +5 -5
  50. data/lib/libis/format/tool/pdf_to_pdfa.rb +1 -2
  51. data/lib/libis/format/tool/pdf_watermark.rb +47 -0
  52. data/lib/libis/format/tool/pdfa_validator.rb +3 -4
  53. data/lib/libis/format/tool/spreadsheet_to_ods.rb +2 -1
  54. data/lib/libis/format/version.rb +1 -1
  55. data/lib/libis/format/yaml_loader.rb +71 -0
  56. data/libis-format.gemspec +5 -4
  57. data/tools/PdfTool.jar +0 -0
  58. data/tools/bcpkix-jdk15on-167.jar +0 -0
  59. data/tools/bcprov-jdk15on-167.jar +0 -0
  60. data/tools/fop/build/fop.jar +0 -0
  61. data/tools/fop/conf/fop.xconf +466 -0
  62. data/tools/fop/fop +258 -0
  63. data/tools/fop/fop.bat +75 -0
  64. data/tools/fop/fop.cmd +31 -0
  65. data/tools/fop/fop.js +341 -0
  66. data/tools/fop/lib/README.txt +243 -0
  67. data/tools/fop/lib/avalon-framework-api-4.3.1.jar +0 -0
  68. data/tools/fop/lib/avalon-framework-impl-4.3.1.jar +0 -0
  69. data/tools/fop/lib/avalon-framework.LICENSE.txt +175 -0
  70. data/tools/fop/lib/avalon-framework.NOTICE.TXT +11 -0
  71. data/tools/fop/lib/batik-all-1.10.jar +0 -0
  72. data/tools/fop/lib/batik.LICENSE.txt +201 -0
  73. data/tools/fop/lib/batik.NOTICE.txt +18 -0
  74. data/tools/fop/lib/commons-io-1.3.1.jar +0 -0
  75. data/tools/fop/lib/commons-io.LICENSE.txt +203 -0
  76. data/tools/fop/lib/commons-io.NOTICE.txt +6 -0
  77. data/tools/fop/lib/commons-logging-1.0.4.jar +0 -0
  78. data/tools/fop/lib/commons-logging.LICENSE.txt +202 -0
  79. data/tools/fop/lib/commons-logging.NOTICE.txt +3 -0
  80. data/tools/fop/lib/fontbox-2.0.7.jar +0 -0
  81. data/tools/fop/lib/serializer-2.7.2.jar +0 -0
  82. data/tools/fop/lib/serializer.LICENSE.txt +201 -0
  83. data/tools/fop/lib/serializer.NOTICE.txt +15 -0
  84. data/tools/fop/lib/xalan-2.7.2.jar +0 -0
  85. data/tools/fop/lib/xalan.BCEL.LICENSE.txt +52 -0
  86. data/tools/fop/lib/xalan.LICENSE.txt +202 -0
  87. data/tools/fop/lib/xalan.NOTICE.txt +44 -0
  88. data/tools/fop/lib/xalan.regexp.LICENSE.txt +52 -0
  89. data/tools/fop/lib/xalan.runtime.LICENSE.txt +20 -0
  90. data/tools/fop/lib/xerces.LICENSE.txt +56 -0
  91. data/tools/fop/lib/xercesImpl-2.9.1.jar +0 -0
  92. data/tools/fop/lib/xercesImpl.LICENSE.txt +201 -0
  93. data/tools/fop/lib/xercesImpl.NOTICE.txt +14 -0
  94. data/tools/fop/lib/xml-apis-1.3.04.jar +0 -0
  95. data/tools/fop/lib/xml-apis-ext-1.3.04.jar +0 -0
  96. data/tools/fop/lib/xml-apis-ext.LICENSE.dom-documentation.txt +73 -0
  97. data/tools/fop/lib/xml-apis-ext.LICENSE.dom-software.txt +61 -0
  98. data/tools/fop/lib/xml-apis-ext.LICENSE.sac.html +75 -0
  99. data/tools/fop/lib/xml-apis-ext.LICENSE.txt +202 -0
  100. data/tools/fop/lib/xml-apis-ext.NOTICE.txt +16 -0
  101. data/tools/fop/lib/xml-apis-ext.README.dom.txt +56 -0
  102. data/tools/fop/lib/xml-apis.LICENSE-SAX.html +17 -0
  103. data/tools/fop/lib/xml-apis.LICENSE.DOM-documentation.html +74 -0
  104. data/tools/fop/lib/xml-apis.LICENSE.DOM-software.html +66 -0
  105. data/tools/fop/lib/xml-apis.LICENSE.txt +201 -0
  106. data/tools/fop/lib/xml-apis.NOTICE.txt +13 -0
  107. data/tools/fop/lib/xmlgraphics-commons-2.3.jar +0 -0
  108. data/tools/fop/lib/xmlgraphics-commons.LICENSE.txt +202 -0
  109. data/tools/fop/lib/xmlgraphics-commons.NOTICE.txt +5 -0
  110. data/tools/pdfbox/pdfbox-app-2.0.13.jar +0 -0
  111. data/tools/pdfbox/{pdfbox-app-1.8.10.jar → preflight-app-2.0.13.jar} +0 -0
  112. metadata +86 -246
  113. data/lib/libis/format/type_database.rb +0 -134
  114. data/lib/libis/format/type_database_impl.rb +0 -120
  115. data/spec/converter_audio_spec.rb +0 -66
  116. data/spec/converter_fop_spec.rb +0 -37
  117. data/spec/converter_image_spec.rb +0 -166
  118. data/spec/converter_office_spec.rb +0 -84
  119. data/spec/converter_pdf_spec.rb +0 -30
  120. data/spec/converter_repository_spec.rb +0 -97
  121. data/spec/converter_spreadsheet_spec.rb +0 -39
  122. data/spec/converter_video_spec.rb +0 -97
  123. data/spec/converter_xsl_spec.rb +0 -56
  124. data/spec/data/Cevennes2.bmp +0 -0
  125. data/spec/data/Cevennes2.jp2 +0 -0
  126. data/spec/data/Cevennes2.ppm +0 -22492
  127. data/spec/data/NikonRaw-CameraRaw.TIF +0 -0
  128. data/spec/data/NikonRaw-CaptureOne.tif +0 -0
  129. data/spec/data/audio/carlin_disappointed.aac +0 -0
  130. data/spec/data/audio/carlin_disappointed.ac3 +0 -0
  131. data/spec/data/audio/carlin_disappointed.aiff +0 -0
  132. data/spec/data/audio/carlin_disappointed.au +0 -0
  133. data/spec/data/audio/carlin_disappointed.flac +0 -0
  134. data/spec/data/audio/carlin_disappointed.m4a +0 -0
  135. data/spec/data/audio/carlin_disappointed.mka +0 -0
  136. data/spec/data/audio/carlin_disappointed.mp3 +0 -0
  137. data/spec/data/audio/carlin_disappointed.ogg +0 -0
  138. data/spec/data/audio/carlin_disappointed.ra +0 -0
  139. data/spec/data/audio/carlin_disappointed.voc +0 -0
  140. data/spec/data/audio/carlin_disappointed.wav +0 -0
  141. data/spec/data/audio/carlin_disappointed.wma +0 -0
  142. data/spec/data/audio/greensleeves.aac +0 -0
  143. data/spec/data/audio/greensleeves.ac3 +0 -0
  144. data/spec/data/audio/greensleeves.aiff +0 -0
  145. data/spec/data/audio/greensleeves.au +0 -0
  146. data/spec/data/audio/greensleeves.flac +0 -0
  147. data/spec/data/audio/greensleeves.m4a +0 -0
  148. data/spec/data/audio/greensleeves.mka +0 -0
  149. data/spec/data/audio/greensleeves.mp3 +0 -0
  150. data/spec/data/audio/greensleeves.ogg +0 -0
  151. data/spec/data/audio/greensleeves.ra +0 -0
  152. data/spec/data/audio/greensleeves.voc +0 -0
  153. data/spec/data/audio/greensleeves.wav +0 -0
  154. data/spec/data/audio/greensleeves.wma +0 -0
  155. data/spec/data/audio/king_nonviolence.aac +0 -0
  156. data/spec/data/audio/king_nonviolence.ac3 +0 -0
  157. data/spec/data/audio/king_nonviolence.aiff +0 -0
  158. data/spec/data/audio/king_nonviolence.au +0 -0
  159. data/spec/data/audio/king_nonviolence.flac +0 -0
  160. data/spec/data/audio/king_nonviolence.m4a +0 -0
  161. data/spec/data/audio/king_nonviolence.mka +0 -0
  162. data/spec/data/audio/king_nonviolence.mp3 +0 -0
  163. data/spec/data/audio/king_nonviolence.ogg +0 -0
  164. data/spec/data/audio/king_nonviolence.ra +0 -0
  165. data/spec/data/audio/king_nonviolence.voc +0 -0
  166. data/spec/data/audio/king_nonviolence.wav +0 -0
  167. data/spec/data/audio/king_nonviolence.wma +0 -0
  168. data/spec/data/audio/top_gun_secret.aac +0 -0
  169. data/spec/data/audio/top_gun_secret.ac3 +0 -0
  170. data/spec/data/audio/top_gun_secret.aiff +0 -0
  171. data/spec/data/audio/top_gun_secret.au +0 -0
  172. data/spec/data/audio/top_gun_secret.flac +0 -0
  173. data/spec/data/audio/top_gun_secret.m4a +0 -0
  174. data/spec/data/audio/top_gun_secret.mka +0 -0
  175. data/spec/data/audio/top_gun_secret.mp3 +0 -0
  176. data/spec/data/audio/top_gun_secret.ogg +0 -0
  177. data/spec/data/audio/top_gun_secret.ra +0 -0
  178. data/spec/data/audio/top_gun_secret.voc +0 -0
  179. data/spec/data/audio/top_gun_secret.wav +0 -0
  180. data/spec/data/audio/top_gun_secret.wma +0 -0
  181. data/spec/data/multipage.tif +0 -0
  182. data/spec/data/multipage.tif.jp2 +0 -0
  183. data/spec/data/test-ead.xml +0 -392
  184. data/spec/data/test-jpg.tif +0 -0
  185. data/spec/data/test-lzw.tif +0 -0
  186. data/spec/data/test-options.jpg +0 -0
  187. data/spec/data/test-options.png +0 -0
  188. data/spec/data/test.bmp +0 -0
  189. data/spec/data/test.doc +0 -0
  190. data/spec/data/test.docx +0 -0
  191. data/spec/data/test.gif +0 -0
  192. data/spec/data/test.jpg +0 -0
  193. data/spec/data/test.ods +0 -0
  194. data/spec/data/test.odt +0 -0
  195. data/spec/data/test.pdf +0 -0
  196. data/spec/data/test.pdf.tif +0 -0
  197. data/spec/data/test.png +0 -0
  198. data/spec/data/test.ps +0 -8631
  199. data/spec/data/test.psd +0 -0
  200. data/spec/data/test.rtf +0 -1455
  201. data/spec/data/test.tif +0 -0
  202. data/spec/data/test.txt +0 -12
  203. data/spec/data/test.xcf +0 -0
  204. data/spec/data/test.xls +0 -0
  205. data/spec/data/test.xlsx +0 -0
  206. data/spec/data/test.xml +0 -4
  207. data/spec/data/test_pdfa.pdf +0 -0
  208. data/spec/data/video/SampleVideo_1080x720_2mb.flv +0 -0
  209. data/spec/data/video/SampleVideo_1080x720_2mb.mkv +0 -0
  210. data/spec/data/video/SampleVideo_1080x720_2mb.mp4 +0 -0
  211. data/spec/data/video/SampleVideo_176x144_2mb.3gp +0 -0
  212. data/spec/data/video/SampleVideo_320x240_2mb.3gp +0 -0
  213. data/spec/data/video/SampleVideo_360x240_2mb.flv +0 -0
  214. data/spec/data/video/SampleVideo_360x240_2mb.mkv +0 -0
  215. data/spec/data/video/SampleVideo_360x240_2mb.mp4 +0 -0
  216. data/spec/data/video/copyright.png +0 -0
  217. data/spec/data/xml/134476_ead.XML +0 -1
  218. data/spec/data/xml/134476_ead.pdf +0 -0
  219. data/spec/data/xml/134476_fo.XML +0 -383
  220. data/spec/data/xml/134476_raw.XML +0 -141
  221. data/spec/data/xml/ead2fo_pdf.xsl +0 -1453
  222. data/spec/data/xml/header_nolink_pdf.xsl +0 -120
  223. data/spec/data/xml/lookupLists.xsl +0 -488
  224. data/spec/data/xml/scope_eadToHTML.xsl +0 -2376
  225. data/spec/data/xml/scope_xmlToEAD_dom.xsl +0 -952
  226. data/spec/identifier_spec.rb +0 -161
  227. data/spec/spec_helper.rb +0 -58
  228. data/spec/test_types.yml +0 -12
  229. data/spec/type_database_spec.rb +0 -140
  230. data/tools/bcpkix-jdk15on-1.49.jar +0 -0
  231. data/tools/bcprov-jdk15on-1.49.jar +0 -0
  232. data/tools/pdfbox/preflight-app-1.8.10.jar +0 -0
@@ -25,11 +25,11 @@ module Libis
25
25
 
26
26
  timeout = Libis::Format::Config[:timeouts][:pdf_split]
27
27
  result = Libis::Tools::Command.run(
28
- Libis::Format::Config[:java_path],
29
- '-cp', Libis::Format::Config[:pdf_tool],
30
- 'SplitPdf',
31
- '--file_input', source,
32
- '--file_output', target,
28
+ Libis::Format::Config[:java_cmd],
29
+ '-jar', Libis::Format::Config[:pdf_tool],
30
+ 'split',
31
+ '-i', source,
32
+ '-o', target,
33
33
  *options,
34
34
  timeout: timeout,
35
35
  kill_after: timeout * 2
@@ -39,7 +39,7 @@ module Libis
39
39
 
40
40
  timeout = Libis::Format::Config[:timeouts][:pdf_to_pdfa]
41
41
  result = Libis::Tools::Command.run(
42
- Libis::Format::Config[:ghostscript_path],
42
+ Libis::Format::Config[:ghostscript_cmd],
43
43
  '-dBATCH', '-dNOPAUSE', '-dNOOUTERSAVE',
44
44
  '-sColorConversionStrategy=/UseDeviceIndependentColor',
45
45
  "-sProcessColorModel=#{icc_info[:device]}",
@@ -53,7 +53,6 @@ module Libis
53
53
  )
54
54
 
55
55
  raise RuntimeError, "#{self.class} took too long (> #{timeout} seconds) to complete" if result[:timeout]
56
- raise RuntimeError, "#{self.class} errors: #{result[:err].join("\n")}" unless result[:status] == 0 && result[:err].empty?
57
56
 
58
57
  FileUtils.rm [icc_file, def_filename].compact, force: true
59
58
 
@@ -0,0 +1,47 @@
1
+ require 'os'
2
+
3
+ require 'libis/tools/extend/string'
4
+ require 'libis/tools/logger'
5
+ require 'libis/tools/command'
6
+
7
+ require 'libis/format/config'
8
+
9
+ module Libis
10
+ module Format
11
+ module Tool
12
+
13
+ class PdfWatermark
14
+ include ::Libis::Tools::Logger
15
+
16
+ def self.run(source, target, wm_type, options = [])
17
+ self.new.run source, target, wm_type, options
18
+ end
19
+
20
+ def run(source, target, wm_type, options = [])
21
+
22
+ if OS.java?
23
+ # TODO: import library and execute in current VM. For now do exactly as in MRI.
24
+ end
25
+
26
+ timeout = Libis::Format::Config[:timeouts][:pdf_watermark]
27
+ result = Libis::Tools::Command.run(
28
+ Libis::Format::Config[:java_cmd],
29
+ '-jar', Libis::Format::Config[:pdf_tool],
30
+ 'watermark', wm_type,
31
+ '-i', source,
32
+ '-o', target,
33
+ *options,
34
+ timeout: timeout,
35
+ kill_after: timeout * 2
36
+ )
37
+
38
+ raise RuntimeError, "#{self.class} took too long (> #{timeout} seconds) to complete" if result[:timeout]
39
+ raise RuntimeError, "#{self.class} errors: #{result[:err].join("\n")}" unless result[:status] == 0 && result[:err].empty?
40
+
41
+ result
42
+ end
43
+ end
44
+
45
+ end
46
+ end
47
+ end
@@ -22,7 +22,7 @@ module Libis
22
22
  src_file = File.absolute_path(source)
23
23
 
24
24
  timeout = Libis::Format::Config[:timeouts][:pdfa_validator]
25
- if (pdfa = Libis::Format::Config[:pdfa_path])
25
+ if (pdfa = Libis::Format::Config[:pdfa_cmd])
26
26
  # Keep it clean: tool generates fontconfig/ cache dir in current working dir
27
27
  previous_wd = Dir.getwd
28
28
  Dir.chdir(Dir.tmpdir)
@@ -48,16 +48,15 @@ module Libis
48
48
  return false
49
49
  end
50
50
  else
51
- jar = File.join(Libis::Format::TOOL_DIR, 'pdfbox', 'preflight-app-1.8.10.jar')
51
+ jar = Libis::Format::Config[:preflight_jar]
52
52
  result = Libis::Tools::Command.run(
53
- Libis::Format::Config[:java_path],
53
+ Libis::Format::Config[:java_cmd],
54
54
  '-jar', jar,
55
55
  src_file,
56
56
  timeout: timeout,
57
57
  kill_after: timeout * 2
58
58
  )
59
59
  raise RuntimeError, "#{self.class} took too long (> #{timeout} seconds) to complete" if result[:timeout]
60
- raise RuntimeError, "#{self.class} errors: #{result[:err].join("\n")}" unless result[:err].empty?
61
60
 
62
61
  unless result[:status] == 0
63
62
  warn "Validator failed to validate the PDF file '%s' against PDF/A-1B constraints:\n%s", source,
@@ -1,3 +1,4 @@
1
+ # noinspection RubyResolve
1
2
  require 'fileutils'
2
3
 
3
4
  require 'libis/tools/extend/string'
@@ -34,7 +35,7 @@ module Libis
34
35
  timeout = Libis::Format::Config[:timeouts][:spreadsheet_to_ods] ||
35
36
  Libis::Format::Config[:timeouts][:office_to_pdf]
36
37
  result = Libis::Tools::Command.run(
37
- Libis::Format::Config[:soffice_path], '--headless',
38
+ Libis::Format::Config[:soffice_cmd], '--headless',
38
39
  "-env:UserInstallation=file://#{workdir}",
39
40
  '--convert-to', export_filter,
40
41
  '--outdir', workdir, src_file,
@@ -1,5 +1,5 @@
1
1
  module Libis
2
2
  module Format
3
- VERSION = '1.0.4'
3
+ VERSION = '2.0.2'
4
4
  end
5
5
  end
@@ -0,0 +1,71 @@
1
+ # frozen_string_literal: true
2
+ require 'yaml'
3
+ require 'singleton'
4
+
5
+ module Libis
6
+ module Format
7
+ class YamlLoader
8
+ # noinspection RubyResolve
9
+ include Singleton
10
+
11
+ def query(key, value)
12
+ case key.to_s.downcase.to_sym
13
+ when :name
14
+ return [database[value.to_s.upcase.to_sym]]
15
+ when :category
16
+ database.find_all { |_, info| info.category == value.to_s.upcase.to_sym }
17
+ when :puid
18
+ database.find_all { |_, info| info.puids.include?(value) }
19
+ when :mimetype
20
+ database.find_all { |_, info| info.mimetypes.include?(value) }
21
+ when :extension
22
+ database.find_all { |_, info| info.extensions.include?(value) }
23
+ else
24
+ return []
25
+ end.map(&:last)
26
+ end
27
+
28
+ def load_formats(file_or_hash)
29
+ hash = file_or_hash.is_a?(Hash) ? file_or_hash : YAML::load_file(file_or_hash)
30
+ hash.each do |category, format_list|
31
+ format_list.each do |format_name, format_info|
32
+ format_info.symbolize_keys!
33
+ format_name = format_name.to_sym
34
+ new_info = Libis::Format::Info.new(
35
+ name: format_name,
36
+ category: category.to_sym,
37
+ description: format_info[:NAME],
38
+ puids: format_info[:PUID]&.strip&.split(/[\s,]+/)&.map { |v| v.strip } || [],
39
+ mimetypes: format_info[:MIME]&.strip&.split(/[\s,]+/)&.map(&:strip) || [],
40
+ extensions: format_info[:EXTENSIONS]&.strip&.split(/[\s,]+/)&.map { |v| v.strip } || []
41
+ )
42
+ if (old_info = database[format_name])
43
+ new_info = Libis::Format::Info.new(
44
+ name: format_name,
45
+ category: category.to_sym,
46
+ description: new_info.description.blank? ? old_info.description : new_info.description,
47
+ puids: (old_info.puids + new_info.puids).uniq,
48
+ mimetypes: (old_info.mimetypes + new_info.mimetypes).uniq,
49
+ extensions: (old_info.extensions + new_info.extensions).uniq
50
+ )
51
+ end
52
+ database[format_name] = new_info
53
+ end
54
+ end
55
+
56
+ end
57
+
58
+ private
59
+
60
+ attr_reader :database
61
+
62
+ def initialize
63
+ @database = {}
64
+ format_database = Libis::Format::Config[:format_library_database]
65
+ load_formats(format_database)
66
+ end
67
+
68
+ end
69
+
70
+ end
71
+ end
data/libis-format.gemspec CHANGED
@@ -3,6 +3,7 @@
3
3
  lib = File.expand_path('../lib', __FILE__)
4
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
5
 
6
+ require 'bundler'
6
7
  require 'libis/format/version'
7
8
 
8
9
  Gem::Specification.new do |spec|
@@ -17,9 +18,9 @@ Gem::Specification.new do |spec|
17
18
 
18
19
  spec.platform = Gem::Platform::JAVA if defined?(RUBY_ENGINE) && RUBY_ENGINE == 'jruby'
19
20
 
20
- spec.files = `git ls-files -z`.split("\x0")
21
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
21
22
  spec.executables = spec.files.grep(%r{^bin/[^/]+$}) { |f| File.basename(f) }
22
- spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
23
+ # spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
23
24
  spec.require_paths = ['lib']
24
25
 
25
26
  spec.add_development_dependency 'rake', '~> 10.3'
@@ -32,10 +33,10 @@ Gem::Specification.new do |spec|
32
33
  spec.add_development_dependency 'nokogiri'
33
34
  end
34
35
 
35
- spec.add_runtime_dependency 'libis-tools', '~> 1.0'
36
+ spec.add_runtime_dependency 'libis-tools', '>= 1.0.9'
36
37
  spec.add_runtime_dependency 'os', '= 0.9.6'
37
38
  spec.add_runtime_dependency 'mini_magick', '~> 4.3'
38
39
  spec.add_runtime_dependency 'deep_dive', '~> 0.3'
39
40
  spec.add_runtime_dependency 'chromaprint', '~> 0.0.2'
40
41
  spec.add_runtime_dependency 'naturally', '~> 2.1'
41
- end
42
+ end
data/tools/PdfTool.jar CHANGED
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1,466 @@
1
+ <?xml version="1.0"?>
2
+ <!-- $Id: fop.xconf 1616312 2014-08-06 19:19:31Z gadams $ -->
3
+
4
+ <!--
5
+
6
+ This is an example configuration file for FOP.
7
+ This file contains the same settings as the default values
8
+ and will have no effect if used unchanged.
9
+
10
+ Relative config url's will be resolved relative to
11
+ the location of this file.
12
+
13
+ -->
14
+
15
+ <!-- NOTE: This is the version of the configuration -->
16
+ <fop version="1.0">
17
+
18
+ <!-- Base URL for resolving relative URLs -->
19
+ <base>.</base>
20
+
21
+ <!-- Source resolution in dpi (dots/pixels per inch) for determining the size of pixels in SVG and bitmap images, default: 72dpi -->
22
+ <source-resolution>72</source-resolution>
23
+ <!-- Target resolution in dpi (dots/pixels per inch) for specifying the target resolution for generated bitmaps, default: 72dpi -->
24
+ <target-resolution>72</target-resolution>
25
+
26
+ <!-- Default page-height and page-width, in case value is specified as auto -->
27
+ <default-page-settings height="11.00in" width="8.50in"/>
28
+
29
+ <!-- Information for specific renderers -->
30
+ <!-- Uses renderer mime type for renderers -->
31
+ <renderers>
32
+ <renderer mime="application/pdf">
33
+ <filterList>
34
+ <!-- provides compression using zlib flate (default is on) -->
35
+ <value>flate</value>
36
+
37
+ <!-- encodes binary data into printable ascii characters (default off)
38
+ This provides about a 4:5 expansion of data size -->
39
+ <!-- <value>ascii-85</value> -->
40
+
41
+ <!-- encodes binary data with hex representation (default off)
42
+ This filter is not recommended as it doubles the data size -->
43
+ <!-- <value>ascii-hex</value> -->
44
+ </filterList>
45
+
46
+ <fonts>
47
+ <!-- embedded fonts -->
48
+ <!--
49
+ This information must exactly match the font specified
50
+ in the fo file. Otherwise it will use a default font.
51
+
52
+ For example,
53
+ <fo:inline font-family="Arial" font-weight="bold" font-style="normal">
54
+ Arial-normal-normal font
55
+ </fo:inline>
56
+ for the font triplet specified by:
57
+ <font-triplet name="Arial" style="normal" weight="bold"/>
58
+
59
+ If you do not want to embed the font in the pdf document
60
+ then do not include the "embed-url" attribute.
61
+ The font will be needed where the document is viewed
62
+ for it to be displayed properly.
63
+
64
+ possible styles: normal | italic | oblique | backslant
65
+ possible weights: normal | bold | 100 | 200 | 300 | 400
66
+ | 500 | 600 | 700 | 800 | 900
67
+ (normal = 400, bold = 700)
68
+ -->
69
+
70
+ <!--
71
+ <font metrics-url="arial.xml" kerning="yes" embed-url="arial.ttf">
72
+ <font-triplet name="Arial" style="normal" weight="normal"/>
73
+ <font-triplet name="ArialMT" style="normal" weight="normal"/>
74
+ </font>
75
+ <font metrics-url="arialb.xml" kerning="yes" embed-url="arialb.ttf">
76
+ <font-triplet name="Arial" style="normal" weight="bold"/>
77
+ <font-triplet name="ArialMT" style="normal" weight="bold"/>
78
+ </font>
79
+ -->
80
+
81
+ <!-- auto-detect fonts -->
82
+ <auto-detect/>
83
+
84
+ </fonts>
85
+
86
+ <!-- This option lets you specify additional options on an XML handler -->
87
+ <!--xml-handler namespace="http://www.w3.org/2000/svg">
88
+ <stroke-text>false</stroke-text>
89
+ </xml-handler-->
90
+
91
+ </renderer>
92
+
93
+ <renderer mime="application/x-afp">
94
+ <!--
95
+ The bit depth and type of images produced
96
+ (this is the default setting)
97
+ -->
98
+ <images mode="b+w" bits-per-pixel="8"/>
99
+ <renderer-resolution>240</renderer-resolution>
100
+ <line-width-correction>2.5</line-width-correction>
101
+ <resource-group-file>resources.afp</resource-group-file>
102
+
103
+ <fonts>
104
+ <!--
105
+ Below is an example using raster font configuration using FOP builtin base-14 font metrics.
106
+ for Times Roman, Helvetica and Courier.
107
+
108
+ Depending on AFP raster and outline font availability on your installation you will
109
+ most likely need to modify the configuration provided below.
110
+
111
+ See http://xmlgraphics.apache.org/fop/trunk/output.html#afp-configuration
112
+ for details of FOP configuration for AFP
113
+ -->
114
+
115
+ <!-- Times Roman -->
116
+ <font>
117
+ <afp-font name="Times Roman" type="raster" codepage="T1V10500" encoding="Cp500">
118
+ <afp-raster-font size="6" characterset="C0N20060" base14-font="TimesRoman"/>
119
+ <afp-raster-font size="7" characterset="C0N20070" base14-font="TimesRoman"/>
120
+ <afp-raster-font size="8" characterset="C0N20080" base14-font="TimesRoman"/>
121
+ <afp-raster-font size="9" characterset="C0N20090" base14-font="TimesRoman"/>
122
+ <afp-raster-font size="10" characterset="C0N20000" base14-font="TimesRoman"/>
123
+ <afp-raster-font size="11" characterset="C0N200A0" base14-font="TimesRoman"/>
124
+ <afp-raster-font size="12" characterset="C0N200B0" base14-font="TimesRoman"/>
125
+ <afp-raster-font size="14" characterset="C0N200D0" base14-font="TimesRoman"/>
126
+ <afp-raster-font size="16" characterset="C0N200F0" base14-font="TimesRoman"/>
127
+ <afp-raster-font size="18" characterset="C0N200H0" base14-font="TimesRoman"/>
128
+ <afp-raster-font size="20" characterset="C0N200J0" base14-font="TimesRoman"/>
129
+ <afp-raster-font size="24" characterset="C0N200N0" base14-font="TimesRoman"/>
130
+ <afp-raster-font size="30" characterset="C0N200T0" base14-font="TimesRoman"/>
131
+ <afp-raster-font size="36" characterset="C0N200Z0" base14-font="TimesRoman"/>
132
+ </afp-font>
133
+ <font-triplet name="Times" style="normal" weight="normal"/>
134
+ <font-triplet name="TimesRoman" style="normal" weight="normal"/>
135
+ <font-triplet name="Times Roman" style="normal" weight="normal"/>
136
+ <font-triplet name="Times-Roman" style="normal" weight="normal"/>
137
+ <font-triplet name="Times New Roman" style="normal" weight="normal"/>
138
+ <font-triplet name="TimesNewRoman" style="normal" weight="normal"/>
139
+ <font-triplet name="serif" style="normal" weight="normal"/>
140
+ </font>
141
+
142
+ <!-- Times Roman Italic -->
143
+ <font>
144
+ <afp-font name="Times Roman Italic" type="raster" codepage="T1V10500" encoding="Cp500">
145
+ <afp-raster-font size="6" characterset="C0N30060" base14-font="TimesItalic"/>
146
+ <afp-raster-font size="7" characterset="C0N30070" base14-font="TimesItalic"/>
147
+ <afp-raster-font size="8" characterset="C0N30080" base14-font="TimesItalic"/>
148
+ <afp-raster-font size="9" characterset="C0N30090" base14-font="TimesItalic"/>
149
+ <afp-raster-font size="10" characterset="C0N30000" base14-font="TimesItalic"/>
150
+ <afp-raster-font size="11" characterset="C0N300A0" base14-font="TimesItalic"/>
151
+ <afp-raster-font size="12" characterset="C0N300B0" base14-font="TimesItalic"/>
152
+ <afp-raster-font size="14" characterset="C0N300D0" base14-font="TimesItalic"/>
153
+ <afp-raster-font size="16" characterset="C0N300F0" base14-font="TimesItalic"/>
154
+ <afp-raster-font size="18" characterset="C0N300H0" base14-font="TimesItalic"/>
155
+ <afp-raster-font size="20" characterset="C0N300J0" base14-font="TimesItalic"/>
156
+ <afp-raster-font size="24" characterset="C0N300N0" base14-font="TimesItalic"/>
157
+ <afp-raster-font size="30" characterset="C0N300T0" base14-font="TimesItalic"/>
158
+ <afp-raster-font size="36" characterset="C0N300Z0" base14-font="TimesItalic"/>
159
+ </afp-font>
160
+ <font-triplet name="Times" style="italic" weight="normal"/>
161
+ <font-triplet name="TimesRoman" style="italic" weight="normal"/>
162
+ <font-triplet name="Times Roman" style="italic" weight="normal"/>
163
+ <font-triplet name="Times-Roman" style="italic" weight="normal"/>
164
+ <font-triplet name="Times New Roman" style="italic" weight="normal"/>
165
+ <font-triplet name="TimesNewRoman" style="italic" weight="normal"/>
166
+ <font-triplet name="serif" style="italic" weight="normal"/>
167
+ </font>
168
+
169
+ <!-- Times Roman Bold -->
170
+ <font>
171
+ <afp-font name="Times Roman Bold" type="raster" codepage="T1V10500" encoding="Cp500">
172
+ <afp-raster-font size="6" characterset="C0N40060" base14-font="TimesBold"/>
173
+ <afp-raster-font size="7" characterset="C0N40070" base14-font="TimesBold"/>
174
+ <afp-raster-font size="8" characterset="C0N40080" base14-font="TimesBold"/>
175
+ <afp-raster-font size="9" characterset="C0N40090" base14-font="TimesBold"/>
176
+ <afp-raster-font size="10" characterset="C0N40000" base14-font="TimesBold"/>
177
+ <afp-raster-font size="11" characterset="C0N400A0" base14-font="TimesBold"/>
178
+ <afp-raster-font size="12" characterset="C0N400B0" base14-font="TimesBold"/>
179
+ <afp-raster-font size="14" characterset="C0N400D0" base14-font="TimesBold"/>
180
+ <afp-raster-font size="16" characterset="C0N400F0" base14-font="TimesBold"/>
181
+ <afp-raster-font size="18" characterset="C0N400H0" base14-font="TimesBold"/>
182
+ <afp-raster-font size="20" characterset="C0N400J0" base14-font="TimesBold"/>
183
+ <afp-raster-font size="24" characterset="C0N400N0" base14-font="TimesBold"/>
184
+ <afp-raster-font size="30" characterset="C0N400T0" base14-font="TimesBold"/>
185
+ <afp-raster-font size="36" characterset="C0N400Z0" base14-font="TimesBold"/>
186
+ </afp-font>
187
+ <font-triplet name="Times" style="normal" weight="bold"/>
188
+ <font-triplet name="TimesRoman" style="normal" weight="bold"/>
189
+ <font-triplet name="Times Roman" style="normal" weight="bold"/>
190
+ <font-triplet name="Times-Roman" style="normal" weight="bold"/>
191
+ <font-triplet name="Times New Roman" style="normal" weight="bold"/>
192
+ <font-triplet name="TimesNewRoman" style="normal" weight="bold"/>
193
+ <font-triplet name="serif" style="normal" weight="bold"/>
194
+ </font>
195
+
196
+ <!-- Times Roman Italic Bold -->
197
+ <font>
198
+ <afp-font name="Times Roman Italic Bold" type="raster" codepage="T1V10500" encoding="Cp500">
199
+ <afp-raster-font size="6" characterset="C0N50060" base14-font="TimesBoldItalic"/>
200
+ <afp-raster-font size="7" characterset="C0N50070" base14-font="TimesBoldItalic"/>
201
+ <afp-raster-font size="8" characterset="C0N50080" base14-font="TimesBoldItalic"/>
202
+ <afp-raster-font size="9" characterset="C0N50090" base14-font="TimesBoldItalic"/>
203
+ <afp-raster-font size="10" characterset="C0N50000" base14-font="TimesBoldItalic"/>
204
+ <afp-raster-font size="11" characterset="C0N500A0" base14-font="TimesBoldItalic"/>
205
+ <afp-raster-font size="12" characterset="C0N500B0" base14-font="TimesBoldItalic"/>
206
+ <afp-raster-font size="14" characterset="C0N500D0" base14-font="TimesBoldItalic"/>
207
+ <afp-raster-font size="16" characterset="C0N500F0" base14-font="TimesBoldItalic"/>
208
+ <afp-raster-font size="18" characterset="C0N500H0" base14-font="TimesBoldItalic"/>
209
+ <afp-raster-font size="20" characterset="C0N500J0" base14-font="TimesBoldItalic"/>
210
+ <afp-raster-font size="24" characterset="C0N500N0" base14-font="TimesBoldItalic"/>
211
+ <afp-raster-font size="30" characterset="C0N500T0" base14-font="TimesBoldItalic"/>
212
+ <afp-raster-font size="36" characterset="C0N500Z0" base14-font="TimesBoldItalic"/>
213
+ </afp-font>
214
+ <font-triplet name="Times" style="italic" weight="bold"/>
215
+ <font-triplet name="TimesRoman" style="italic" weight="bold"/>
216
+ <font-triplet name="Times Roman" style="italic" weight="bold"/>
217
+ <font-triplet name="Times-Roman" style="italic" weight="bold"/>
218
+ <font-triplet name="Times New Roman" style="italic" weight="bold"/>
219
+ <font-triplet name="TimesNewRoman" style="italic" weight="bold"/>
220
+ <font-triplet name="serif" style="italic" weight="bold"/>
221
+ </font>
222
+
223
+ <!-- Helvetica -->
224
+ <font>
225
+ <afp-font name="Helvetica" type="raster" codepage="T1V10500" encoding="Cp500">
226
+ <afp-raster-font size="6" characterset="C0H20060" base14-font="Helvetica"/>
227
+ <afp-raster-font size="7" characterset="C0H20070" base14-font="Helvetica"/>
228
+ <afp-raster-font size="8" characterset="C0H20080" base14-font="Helvetica"/>
229
+ <afp-raster-font size="9" characterset="C0H20090" base14-font="Helvetica"/>
230
+ <afp-raster-font size="10" characterset="C0H20000" base14-font="Helvetica"/>
231
+ <afp-raster-font size="11" characterset="C0H200A0" base14-font="Helvetica"/>
232
+ <afp-raster-font size="12" characterset="C0H200B0" base14-font="Helvetica"/>
233
+ <afp-raster-font size="14" characterset="C0H200D0" base14-font="Helvetica"/>
234
+ <afp-raster-font size="16" characterset="C0H200F0" base14-font="Helvetica"/>
235
+ <afp-raster-font size="18" characterset="C0H200H0" base14-font="Helvetica"/>
236
+ <afp-raster-font size="20" characterset="C0H200J0" base14-font="Helvetica"/>
237
+ <afp-raster-font size="24" characterset="C0H200N0" base14-font="Helvetica"/>
238
+ <afp-raster-font size="30" characterset="C0H200T0" base14-font="Helvetica"/>
239
+ <afp-raster-font size="36" characterset="C0H200Z0" base14-font="Helvetica"/>
240
+ </afp-font>
241
+ <font-triplet name="Helvetica" style="normal" weight="normal"/>
242
+ <font-triplet name="Arial" style="normal" weight="normal"/>
243
+ <font-triplet name="sans-serif" style="normal" weight="normal"/>
244
+ <font-triplet name="any" style="normal" weight="normal"/>
245
+ </font>
246
+
247
+ <!-- Helvetica Italic -->
248
+ <font>
249
+ <afp-font name="Helvetica Italic" type="raster" codepage="T1V10500" encoding="Cp500">
250
+ <afp-raster-font size="6" characterset="C0H30060" base14-font="HelveticaOblique"/>
251
+ <afp-raster-font size="7" characterset="C0H30070" base14-font="HelveticaOblique"/>
252
+ <afp-raster-font size="8" characterset="C0H30080" base14-font="HelveticaOblique"/>
253
+ <afp-raster-font size="9" characterset="C0H30090" base14-font="HelveticaOblique"/>
254
+ <afp-raster-font size="10" characterset="C0H30000" base14-font="HelveticaOblique"/>
255
+ <afp-raster-font size="11" characterset="C0H300A0" base14-font="HelveticaOblique"/>
256
+ <afp-raster-font size="12" characterset="C0H300B0" base14-font="HelveticaOblique"/>
257
+ <afp-raster-font size="14" characterset="C0H300D0" base14-font="HelveticaOblique"/>
258
+ <afp-raster-font size="16" characterset="C0H300F0" base14-font="HelveticaOblique"/>
259
+ <afp-raster-font size="18" characterset="C0H300H0" base14-font="HelveticaOblique"/>
260
+ <afp-raster-font size="20" characterset="C0H300J0" base14-font="HelveticaOblique"/>
261
+ <afp-raster-font size="24" characterset="C0H300N0" base14-font="HelveticaOblique"/>
262
+ <afp-raster-font size="30" characterset="C0H300T0" base14-font="HelveticaOblique"/>
263
+ <afp-raster-font size="36" characterset="C0H300Z0" base14-font="HelveticaOblique"/>
264
+ </afp-font>
265
+ <font-triplet name="Helvetica" style="italic" weight="normal"/>
266
+ <font-triplet name="Arial" style="italic" weight="normal"/>
267
+ <font-triplet name="sans-serif" style="italic" weight="normal"/>
268
+ </font>
269
+
270
+ <!-- Helvetica (Semi) Bold -->
271
+ <font>
272
+ <afp-font name="Helvetica (Semi) Bold" type="raster" codepage="T1V10500" encoding="Cp500">
273
+ <afp-raster-font size="6" characterset="C0H40060" base14-font="HelveticaBold"/>
274
+ <afp-raster-font size="7" characterset="C0H40070" base14-font="HelveticaBold"/>
275
+ <afp-raster-font size="8" characterset="C0H40080" base14-font="HelveticaBold"/>
276
+ <afp-raster-font size="9" characterset="C0H40090" base14-font="HelveticaBold"/>
277
+ <afp-raster-font size="10" characterset="C0H40000" base14-font="HelveticaBold"/>
278
+ <afp-raster-font size="11" characterset="C0H400A0" base14-font="HelveticaBold"/>
279
+ <afp-raster-font size="12" characterset="C0H400B0" base14-font="HelveticaBold"/>
280
+ <afp-raster-font size="14" characterset="C0H400D0" base14-font="HelveticaBold"/>
281
+ <afp-raster-font size="16" characterset="C0H400F0" base14-font="HelveticaBold"/>
282
+ <afp-raster-font size="18" characterset="C0H400H0" base14-font="HelveticaBold"/>
283
+ <afp-raster-font size="20" characterset="C0H400J0" base14-font="HelveticaBold"/>
284
+ <afp-raster-font size="24" characterset="C0H400N0" base14-font="HelveticaBold"/>
285
+ <afp-raster-font size="30" characterset="C0H400T0" base14-font="HelveticaBold"/>
286
+ <afp-raster-font size="36" characterset="C0H400Z0" base14-font="HelveticaBold"/>
287
+ </afp-font>
288
+ <font-triplet name="Helvetica" style="normal" weight="bold"/>
289
+ <font-triplet name="Arial" style="normal" weight="bold"/>
290
+ <font-triplet name="sans-serif" style="normal" weight="bold"/>
291
+ </font>
292
+
293
+ <!-- Helvetica Italic (Semi) Bold -->
294
+ <font>
295
+ <afp-font name="Helvetica Italic (Semi) Bold" type="raster" codepage="T1V10500" encoding="Cp500">
296
+ <afp-raster-font size="6" characterset="C0H50060" base14-font="HelveticaBoldOblique"/>
297
+ <afp-raster-font size="7" characterset="C0H50070" base14-font="HelveticaBoldOblique"/>
298
+ <afp-raster-font size="8" characterset="C0H50080" base14-font="HelveticaBoldOblique"/>
299
+ <afp-raster-font size="9" characterset="C0H50090" base14-font="HelveticaBoldOblique"/>
300
+ <afp-raster-font size="10" characterset="C0H50000" base14-font="HelveticaBoldOblique"/>
301
+ <afp-raster-font size="11" characterset="C0H500A0" base14-font="HelveticaBoldOblique"/>
302
+ <afp-raster-font size="12" characterset="C0H500B0" base14-font="HelveticaBoldOblique"/>
303
+ <afp-raster-font size="14" characterset="C0H500D0" base14-font="HelveticaBoldOblique"/>
304
+ <afp-raster-font size="16" characterset="C0H500F0" base14-font="HelveticaBoldOblique"/>
305
+ <afp-raster-font size="18" characterset="C0H500H0" base14-font="HelveticaBoldOblique"/>
306
+ <afp-raster-font size="20" characterset="C0H500J0" base14-font="HelveticaBoldOblique"/>
307
+ <afp-raster-font size="24" characterset="C0H500N0" base14-font="HelveticaBoldOblique"/>
308
+ <afp-raster-font size="30" characterset="C0H500T0" base14-font="HelveticaBoldOblique"/>
309
+ <afp-raster-font size="36" characterset="C0H500Z0" base14-font="HelveticaBoldOblique"/>
310
+ </afp-font>
311
+ <font-triplet name="Helvetica" style="italic" weight="bold"/>
312
+ <font-triplet name="Arial" style="italic" weight="bold"/>
313
+ <font-triplet name="sans-serif" style="italic" weight="bold"/>
314
+ </font>
315
+
316
+ <!-- Courier -->
317
+ <font>
318
+ <afp-font name="Courier" type="raster" codepage="T1V10500" encoding="Cp500">
319
+ <afp-raster-font size="6" characterset="C0420060" base14-font="Courier"/>
320
+ <afp-raster-font size="7" characterset="C0420070" base14-font="Courier"/>
321
+ <afp-raster-font size="8" characterset="C0420080" base14-font="Courier"/>
322
+ <afp-raster-font size="9" characterset="C0420090" base14-font="Courier"/>
323
+ <afp-raster-font size="10" characterset="C0420000" base14-font="Courier"/>
324
+ <afp-raster-font size="11" characterset="C04200A0" base14-font="Courier"/>
325
+ <afp-raster-font size="12" characterset="C04200B0" base14-font="Courier"/>
326
+ <afp-raster-font size="14" characterset="C04200D0" base14-font="Courier"/>
327
+ <afp-raster-font size="16" characterset="C04200F0" base14-font="Courier"/>
328
+ <afp-raster-font size="18" characterset="C04200H0" base14-font="Courier"/>
329
+ <afp-raster-font size="20" characterset="C04200J0" base14-font="Courier"/>
330
+ <afp-raster-font size="24" characterset="C04200N0" base14-font="Courier"/>
331
+ <afp-raster-font size="30" characterset="C04200T0" base14-font="Courier"/>
332
+ <afp-raster-font size="36" characterset="C04200Z0" base14-font="Courier"/>
333
+ </afp-font>
334
+ <font-triplet name="Courier" style="normal" weight="normal"/>
335
+ <font-triplet name="monospace" style="normal" weight="normal"/>
336
+ </font>
337
+
338
+ <!-- Courier Italic -->
339
+ <font>
340
+ <afp-font name="Courier Italic" type="raster" codepage="T1V10500" encoding="Cp500">
341
+ <afp-raster-font size="6" characterset="C0430060" base14-font="CourierOblique"/>
342
+ <afp-raster-font size="7" characterset="C0430070" base14-font="CourierOblique"/>
343
+ <afp-raster-font size="8" characterset="C0430080" base14-font="CourierOblique"/>
344
+ <afp-raster-font size="9" characterset="C0430090" base14-font="CourierOblique"/>
345
+ <afp-raster-font size="10" characterset="C0430000" base14-font="CourierOblique"/>
346
+ <afp-raster-font size="11" characterset="C04300A0" base14-font="CourierOblique"/>
347
+ <afp-raster-font size="12" characterset="C04300B0" base14-font="CourierOblique"/>
348
+ <afp-raster-font size="14" characterset="C04300D0" base14-font="CourierOblique"/>
349
+ <afp-raster-font size="16" characterset="C04300F0" base14-font="CourierOblique"/>
350
+ <afp-raster-font size="18" characterset="C04300H0" base14-font="CourierOblique"/>
351
+ <afp-raster-font size="20" characterset="C04300J0" base14-font="CourierOblique"/>
352
+ <afp-raster-font size="24" characterset="C04300N0" base14-font="CourierOblique"/>
353
+ <afp-raster-font size="30" characterset="C04300T0" base14-font="CourierOblique"/>
354
+ <afp-raster-font size="36" characterset="C04300Z0" base14-font="CourierOblique"/>
355
+ </afp-font>
356
+ <font-triplet name="Courier" style="italic" weight="normal"/>
357
+ <font-triplet name="monospace" style="italic" weight="normal"/>
358
+ </font>
359
+
360
+ <!-- Courier Bold -->
361
+ <font>
362
+ <afp-font name="Courier Bold" type="raster" codepage="T1V10500" encoding="Cp500">
363
+ <afp-raster-font size="6" characterset="C0440060" base14-font="CourierBold"/>
364
+ <afp-raster-font size="7" characterset="C0440070" base14-font="CourierBold"/>
365
+ <afp-raster-font size="8" characterset="C0440080" base14-font="CourierBold"/>
366
+ <afp-raster-font size="9" characterset="C0440090" base14-font="CourierBold"/>
367
+ <afp-raster-font size="10" characterset="C0440000" base14-font="CourierBold"/>
368
+ <afp-raster-font size="11" characterset="C04400A0" base14-font="CourierBold"/>
369
+ <afp-raster-font size="12" characterset="C04400B0" base14-font="CourierBold"/>
370
+ <afp-raster-font size="14" characterset="C04400D0" base14-font="CourierBold"/>
371
+ <afp-raster-font size="16" characterset="C04400F0" base14-font="CourierBold"/>
372
+ <afp-raster-font size="18" characterset="C04400H0" base14-font="CourierBold"/>
373
+ <afp-raster-font size="20" characterset="C04400J0" base14-font="CourierBold"/>
374
+ <afp-raster-font size="24" characterset="C04400N0" base14-font="CourierBold"/>
375
+ <afp-raster-font size="30" characterset="C04400T0" base14-font="CourierBold"/>
376
+ <afp-raster-font size="36" characterset="C04400Z0" base14-font="CourierBold"/>
377
+ </afp-font>
378
+ <font-triplet name="Courier" style="normal" weight="bold"/>
379
+ <font-triplet name="monospace" style="normal" weight="bold"/>
380
+ </font>
381
+
382
+ <!-- Courier Italic Bold -->
383
+ <font>
384
+ <afp-font name="Courier Italic Bold" type="raster" codepage="T1V10500" encoding="Cp500">
385
+ <afp-raster-font size="6" characterset="C0450060" base14-font="CourierBoldOblique"/>
386
+ <afp-raster-font size="7" characterset="C0450070" base14-font="CourierBoldOblique"/>
387
+ <afp-raster-font size="8" characterset="C0450080" base14-font="CourierBoldOblique"/>
388
+ <afp-raster-font size="9" characterset="C0450090" base14-font="CourierBoldOblique"/>
389
+ <afp-raster-font size="10" characterset="C0450000" base14-font="CourierBoldOblique"/>
390
+ <afp-raster-font size="11" characterset="C04500A0" base14-font="CourierBoldOblique"/>
391
+ <afp-raster-font size="12" characterset="C04500B0" base14-font="CourierBoldOblique"/>
392
+ <afp-raster-font size="14" characterset="C04500D0" base14-font="CourierBoldOblique"/>
393
+ <afp-raster-font size="16" characterset="C04500F0" base14-font="CourierBoldOblique"/>
394
+ <afp-raster-font size="18" characterset="C04500H0" base14-font="CourierBoldOblique"/>
395
+ <afp-raster-font size="20" characterset="C04500J0" base14-font="CourierBoldOblique"/>
396
+ <afp-raster-font size="24" characterset="C04500N0" base14-font="CourierBoldOblique"/>
397
+ <afp-raster-font size="30" characterset="C04500T0" base14-font="CourierBoldOblique"/>
398
+ <afp-raster-font size="36" characterset="C04500Z0" base14-font="CourierBoldOblique"/>
399
+ </afp-font>
400
+ <font-triplet name="Courier" style="italic" weight="bold"/>
401
+ <font-triplet name="monospace" style="italic" weight="bold"/>
402
+ </font>
403
+
404
+ <!--
405
+ Configure double-byte (CID Keyed font (Type 0)) AFP fonts with type="CIDKeyed".
406
+
407
+ example:
408
+ <font>
409
+ <afp-font type="CIDKeyed" encoding="UnicodeBigUnmarked"
410
+ codepage="T1120000" characterset="CZJHMNU"
411
+ base-uri="fonts" />
412
+ <font-triplet name="J-Heisei Mincho" style="normal" weight="normal" />
413
+ </font>
414
+ -->
415
+
416
+
417
+ </fonts>
418
+ </renderer>
419
+
420
+ <renderer mime="application/postscript">
421
+ <!-- This option forces the PS renderer to rotate landscape pages -->
422
+ <!--auto-rotate-landscape>true</auto-rotate-landscape-->
423
+
424
+ <!-- This option lets you specify additional options on an XML handler -->
425
+ <!--xml-handler namespace="http://www.w3.org/2000/svg">
426
+ <stroke-text>false</stroke-text>
427
+ </xml-handler-->
428
+ </renderer>
429
+
430
+ <renderer mime="application/vnd.hp-PCL">
431
+ </renderer>
432
+
433
+ <!-- MIF does not have a renderer
434
+ <renderer mime="application/vnd.mif">
435
+ </renderer>
436
+ -->
437
+
438
+ <renderer mime="image/svg+xml">
439
+ <format type="paginated"/>
440
+ <link value="true"/>
441
+ <strokeText value="false"/>
442
+ </renderer>
443
+
444
+ <renderer mime="application/awt">
445
+ </renderer>
446
+
447
+ <renderer mime="image/png">
448
+ <!--transparent-page-background>true</transparent-page-background-->
449
+ </renderer>
450
+
451
+ <renderer mime="image/tiff">
452
+ <!--transparent-page-background>true</transparent-page-background-->
453
+ <!--compression>CCITT T.6</compression-->
454
+ </renderer>
455
+
456
+ <renderer mime="text/xml">
457
+ </renderer>
458
+
459
+ <!-- RTF does not have a renderer
460
+ <renderer mime="text/rtf">
461
+ </renderer>
462
+ -->
463
+
464
+ </renderers>
465
+
466
+ </fop>