How do I install texlive-extra-utils / pdfcrop on Centos 8?
Solution 1:
texlive-extra-utils
seems to be a Debian package name. I wouldn't expect to find that name in CentOS. But a quick search shows that pdfcrop is not present in CentOS anyway. If Red Hat didn't package it for RHEL, it won't be in CentOS. On the other hand I did see it in ELN so it might make it into RHEL 9.
You could contact the package maintainers at Red Hat responsible for the package and ask that pdfcrop be packaged for RHEL 8. Try rpm -q --changelog texlive-base | less
to find an appropriate person to ask. But don't expect this to happen quickly.
You can also try backporting the texlive-base
source RPM from Fedora, which does build a package named texlive-pdfcrop
that contains pdfcrop. But then you are responsible for keeping up with any updates to the package (which based on its history seems to be several times a year). But you would also have to backport the missing dependencies and put them in your own private repo. It can be quite a bit of work. You can use Copr to deal with most of this. Just feed it all the necessary source RPMs and it will deal with making the repo and building the packages. Though I expect this to fail as well, since it seems texlive-base
has a circular dependency (on a package provided by itself). You're now in expert territory and I don't recommend going this route unless you already know how to sort out weird RPM packaging issues. Though the maintainers really ought to be made aware of the circular dependency.
You might also want to consider actually using Fedora in this case.
Solution 2:
After delving deeper into pdfcrop, I found that it is a perl script. (available here: https://www.ctan.org/tex-archive/support/pdfcrop )
I put the script on my Centos server, in /usr/bin (so that it is in the path). In running the script I found there was a missing dependency - pdftex, which is provided by texlive-pdftex. I installed the dependency and everything mostly worked. I did have to use the --ini switch in pdfcrop, which tells pdfcrop not to use formatting. However, I think this is an issue with the original pdf file, which is generated by MS Publisher and likely has odd formatting.
I hope this helps someone else.