[Tex/LaTex] How to cut pdf at crop marks

cropexternal filestools

I have a PDF document, evidently produced using LaTeX, which has wide white margins and crop marks. I'd like to remove these margins and corresponding crop marks. Is there a tool to do it automatically?

EDIT
Werner suggested to use pdfpages package to include PDF's pages in a LaTeX document. I should actually include only the pages of the PDF I'd like to crop and use options to trim it. I'm waiting for an help in recognizing the most appropriate options to do so.

Best Answer

The pdfcrop utility is made to crop the white borders from a PDF.

pdfcrop in.pdf out.pdf

If you want to remove a little MORE so that the crop marks are also removed, then use the --margins option. Providing a negative margin value will cause a crop of some of your content. The margin value unit is bp. Play with the negative value to remove your tick marks and nothing else.

pdfcrop --margins -10 in.pdf out.pdf 

Edit Using OP's sample PDF follows...

Your sample PDF file works for me. I used the following command.

pdfcrop --margins -10 --verbose matC.pdf matC_cropped.pdf

This is your original file

enter image description here

And this is the cropped file

enter image description here

The pdfcrop verbose log follows

PDFCROP 1.38, 2012/11/02 - Copyright (c) 2002-2012 by Heiko Oberdiek.
* PDF header: %PDF-1.5
* Running ghostscript for BoundingBox calculation ...
GPL Ghostscript 9.04 (2011-08-05)
Copyright (C) 2011 Artifex Software, Inc.  All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Processing pages 1 through 1.
Page 1
%%BoundingBox: 3 3 205 205
* Page 1: 3 3 205 205
%%HiResBoundingBox: 3.667289 3.061336 204.622728 204.016705
* Running pdfTeX ...
This is pdfTeX, Version 3.14159265-2.6-1.40.16 (MiKTeX 2.9 64-bit)
entering extended mode
(tmp-pdfcrop-3248.tex [1 <./matC.pdf>] )
Output written on tmp-pdfcrop-3248.pdf (1 page, 24335 bytes).
Transcript written on tmp-pdfcrop-3248.log.
==> 1 page written on `matC_cropped.pdf'.

As you see, pdfcrop used ghostscript. Perhaps your ghostscript has an issue.