35.8 Merge

The merge utility allows a new output PDF to be created by combining pages (or ranges of pages) from a set of input pdfs.

$ mutool merge 
usage: mutool merge [-o output.pdf] [-O options] input.pdf [pages] [input2.pdf] [pages2] ... 
      -o -     name of PDF file to create 
      -O -     comma separated list of output options 
      input.pdf name of input file from which to copy pages 
      pages    comma separated list of page numbers and ranges 
 
PDF output options: 
      decompress: decompress all streams (except compress-fonts/images) 
      compress: compress all streams 
      compress-fonts: compress embedded fonts 
      compress-images: compress images 
      ascii: ASCII hex encode binary streams 
      pretty: pretty-print objects with indentation 
      linearize: optimize for web browsers 
      sanitize: clean up graphics commands in content streams 
      garbage: garbage collect unused objects 
      or garbage=compact: ... and compact cross reference table 
      or garbage=deduplicate: ... and remove duplicate objects