I am writing a LaTeX document on my Windows machine and I want to crop a pdf using pdfcrop. From my research I could learn that, I also have to install perl. I have downloaded and installed 64-bit ActivePerl on my computer. But that has not solved my purpose and I have receive following error

PDFCROP 1.38, 2012/11/02 - Copyright (c) 2002-2012 by Heiko Oberdiek.
!!! Error: Ghostscript exited with error code 1!

How can I solve this issue?enter image description here

1 Answer 1


I could solve the problem by installing Ghostscript.

If you are using Windows, then Perl and Ghostscript does not come along with that. If you want to crop a pdf using pdfcrop, then you have to install Perl and Ghostscript explicitly along with Tex. These softwares could be downloaded from

https://www.activestate.com/activeperl/downloads https://www.ghostscript.com/download/gsdnld.html

  • On Mac: brew install ghostscript and in ~/.bash_profile: export PATH="/usr/local/Cellar/ghostscript/9.54.0/bin:$PATH" (adjust the path to the directory) and then either open a fresh shell or run source ~/.bash_profile.
    – bersling
    Jun 30, 2021 at 19:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .