MacOS – Automator’s “Combine PDF Pages” action doesn’t preserve crop

automatormacospdfpreview

I'm trying to separately crop PDF's even and odd pages, by building on top of the accepted answer from How to crop odd and even pages differently in a PDF?

My Automator workflow, roughly:

  1. automatically Extract Odd & Even Pages; each output PDF filename is suffixed with "(Even Pages)" or "(Odd Pages)"
  2. pause Automator Workflow with Ask for Confirmation and manually crop each of the two output PDFs (using Rectangular Selection and Crop in Preview)
  3. select the two cropped PDFs using Get Folder Contents
  4. Combine PDF Pages with Shuffling pages option

The issue is step 4. which inevitably seems to drop any Crop from step 2. The combined PDF has no crop applied to it, even though the two even & odd input PDFs are definitely cropped.

Is this expected behaviour from Combine PDF Pages? PDF metadata and annotations do seem to get dropped, does Crop as well?

enter image description here

Best Answer

There is a package called pdfjoin which uses pdflatex to combine pdf files. You could try joining your pdf's in the following way:

pdfjoin 01.pdf 02.pdf

which will combine the files into a single pdf called 02-combined.pdf, in your current working directory.

If you don't have LaTeX installed you can follow this guide to do so.

This preserved crops for me when I tried. If you can get this working on your system, you could then maybe look at putting this together in a bash script.