Skip to content

Instantly share code, notes, and snippets.

@draptik
Created June 15, 2018 00:18
Show Gist options
  • Select an option

  • Save draptik/f8d0d9e25f730717da91465dbc5967b6 to your computer and use it in GitHub Desktop.

Select an option

Save draptik/f8d0d9e25f730717da91465dbc5967b6 to your computer and use it in GitHub Desktop.

Revisions

  1. draptik created this gist Jun 15, 2018.
    39 changes: 39 additions & 0 deletions combine-pdf-pages
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,39 @@
    #!/bin/bash

    INPUT_FILE="vo_all.pdf"
    OUTPUT_FILE_BASE="vo_all_output"

    pdfjam --nup 2x3 \
    --frame true \
    --noautoscale false \
    --delta "0.2cm 0.3cm" \
    --scale 0.95 \
    ${INPUT_FILE} \
    --outfile ${OUTPUT_FILE_BASE}_1.pdf

    ## Full page 2x2 landscape
    pdfjam --nup 2x2 \
    --frame false \
    --landscape \
    --delta "0.2cm 0.3cm" \
    --scale 0.95 \
    ${INPUT_FILE} \
    --outfile ${OUTPUT_FILE_BASE}_2.pdf

    ## Full page 1x3 portrait
    pdfjam --nup 1x3 \
    --frame false \
    --delta "0.2cm 0.3cm" \
    --scale 0.95 \
    ${INPUT_FILE} \
    --outfile ${OUTPUT_FILE_BASE}_3.pdf

    ## Full page 4x4 landscape
    pdfjam --nup 4x4 \
    --frame false \
    --landscape \
    --delta "0.2cm 0.3cm" \
    --scale 0.95 \
    ${INPUT_FILE} \
    --outfile ${OUTPUT_FILE_BASE}_4.pdf