8

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
  • 2
    It is included in MikTeX. Use the package manager to install it.
    – cfr
    Jun 26, 2015 at 13:26
  • when running the package manager, it says it is already installed Jun 26, 2015 at 16:10

2 Answers 2

4

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.

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

I recommend installing on Windows with TinyTex:

Rscript -e "tinytex::tlmgr_install('pdfcrop')"

You must log in to answer this question.

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