Module: Cooltrainer::DistorteD::Molecule::PDF
- Defined in:
- lib/distorted/media_molecule/pdf.rb
Constant Summary collapse
- PDF_TYPE =
CHECKING::YOU::OUT['application/pdf']
- LOWER_WORLD =
Hash[ PDF_TYPE => nil, ]
- OUTER_LIMITS =
Hash[ PDF_TYPE => nil, ]
Class Method Summary collapse
-
.optimize(src, dest) ⇒ Object
TODO: Use MuPDF instead of libvips magick-based PDF loader.
Class Method Details
.optimize(src, dest) ⇒ Object
TODO: Use MuPDF instead of libvips magick-based PDF loader.
27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/distorted/media_molecule/pdf.rb', line 27 def self.optimize(src, dest) HexaPDF::Document.open(src) do |doc| doc.task( :optimize, compact: true, object_streams: :generate, xref_streams: :generate, compress_pages: false, ) doc.write(dest) end end |