first of all I have to admit I'm definitely not an expext with tex stuffes ; I have found several post related to perl script not working with latex but I can't figure out what is happening on my computer.

So, I try to use pdfcrop https://www.ctan.org/pkg/pdfcrop. I downloaded the pdfrcrop.pl file but the documentation for windows was pretty blurry to me.

I have been able to run perl pdfcrop.pl and now I have :

  • MikTex\miktex\bin\x64\pdfcrop.exe
  • MikTex\scrips\pdfcrop\pdfcrop.pl
  • MikTex\tex\latex\scrips\pdfcrop\pdfcrop.pl

When I type in the command prompt:

  • pdfcrop --version, I get: pdfcrop 2012/11/02 v1.38
  • perl --version, I get This is perl 5, version 22, subversion 0 <v5.22.0> ...

Now I am using pdfcrop through knitr and I get the error message :

cropping figure/pyfig.pdf
pdfcrop: The Perl interpreter could not be found.

When I try to run directely pdfcrop in the Terminal, it stops at the second steps:

*Copy input file to temporary file
!!!Error copy failed, <No such file or directory/Access denied>

Thanks a lot for the help !

  • 2
    It is included in MikTeX. Use the package manager to install it. – cfr Jun 26 '15 at 13:26
  • when running the package manager, it says it is already installed – ClementWalter Jun 26 '15 at 16:10

You need first to install Perl support for Windows (for example https://www.activestate.com/activeperl) and after that use Miktex package manager to install pdfcrop.

Then you should be able to use command pdfcrop on Windows Powershell or Command prompt.

  • Is there a way that does not require me to make an account? – Jonas Schwarz Nov 2 '19 at 13:20
  • 1
    @JonasSchwarz use Strawberry Perl – Steve Oct 1 '20 at 23:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.