Fixing PDF margins

LSAC, the Law School Admission Council, distributes PDF files with busted margins.
Instead of half inch margins all around the page,
they have a one inch margin at the top and no margin at the bottom
(i.e., text runs flush with the bottom of the page).

After spending a few hours trying different poorly documented CUPS command invokations,
I finally found the pdfcrop command.
It was such a frustrating experience,
I have decided to document the solution in hopes of preventing at least one other person from the same hell.

So first I ran pdfinfo on the file to get the page size:

So the page is 612 by 792.
Next we run pdfcrop to produce a file without any margins:

Now run pdfinfo on the resulting file:

Notice that the page size has shrunk from 612 by 792 to 551 by 716.
So 612 – 551 = 61 pts narrower,
and 792 – 716 = 76 pts shorter.
We can now use this knowledge along with pdfcrop‘s --margins option
to recenter the resulting document:

Voila.
You have successfully compensated for the incompetence of the institution that holds complete control over who can practice US law.

From: Fixing PDF margins

Leave a Reply