Skip to content
Snippets Groups Projects
crop_views 1.05 KiB
Newer Older
#!/bin/bash

mkdir -p cropped
#convert view1.png -crop 1100x760+100+400 cropped/view1.png
#
#convert view2a.png -crop 1100x960+100+300 cropped/view2a.png
#convert view2b.png -crop 1100x960+100+300 cropped/view2b.png
#convert view2c.png -crop 1100x960+100+300 cropped/view2c.png
#convert view2d.png -crop 1100x960+100+300 cropped/view2d.png
#convert view2e.png -crop 1100x960+100+300 cropped/view2e.png

gs -o cropped/view1.pdf -sDEVICE=pdfwrite \
  -c "[/CropBox [51 250 550 590] /PAGES pdfmark" \
  -f view1.pdf
 
gs -o cropped/view2a.pdf -sDEVICE=pdfwrite \
  -c "[/CropBox [50 175 550 675] /PAGES pdfmark" \
  -f view2a.pdf

gs -o cropped/view2b.pdf -sDEVICE=pdfwrite \
  -c "[/CropBox [50 175 550 675] /PAGES pdfmark" \
  -f view2b.pdf

gs -o cropped/view2c.pdf -sDEVICE=pdfwrite \
  -c "[/CropBox [50 175 550 675] /PAGES pdfmark" \
  -f view2c.pdf

gs -o cropped/view2d.pdf -sDEVICE=pdfwrite \
  -c "[/CropBox [50 175 550 675] /PAGES pdfmark" \
  -f view2d.pdf

gs -o cropped/view2e.pdf -sDEVICE=pdfwrite \
  -c "[/CropBox [50 175 550 675] /PAGES pdfmark" \
  -f view2e.pdf