TransWikia.com

PDFCrop: Is it integrated into Latex? Is it part of the graphix package? What on earth is it?

TeX - LaTeX Asked by dan1789 on March 31, 2021

I am new to Latex and this place, so I have a few very simple questions, so simple that I do not find the answers:

  1. To automatically get rid of white spaces around an image on a PDF document I would like to insert into Latex, I should use PDFcrop, right?

  2. Is PDFcrop included in the Latex basics or is it an external program?

  3. If it is part of Latex, is it part of a package? Which one?

  4. By what command do I activate the cropping (I am assuming, in the graphix environment)?

2 Answers

pdfcrop is is a command that you run to edit the pdf, you do not call it from within latex. It will be one of the commands installed when you installed tex.

But for your use case you probably do not need to edit the pdf file with pdfcrop, just display part of the original.

so for example

documentclass{article}

usepackage{graphicx}

begin{document}

fbox{includegraphics[width=5cm,clip]{duck.pdf}}



fbox{includegraphics[viewport=900 450 1200 750,width=2cm,clip]{duck.pdf}}


end{document}

Includes a complete pdf file then includes the same file just showing part of it. there is no need to use pdfcrop to crop the file.

enter image description here

PDFcrop can be useful if you need to automatically guess the cropping region based on the white space. If so just use a command such as

pdfcrop original.pdf new.pdf

to make a new pdf file, there are several options, see pdfcrop --help

Answered by David Carlisle on March 31, 2021

Instead of pdfcrop, you may want to try briss (http://briss.sourceforge.net/), which has a graphical user interface. Open the file, mark a rectangle around the image and click crop.

Answered by Engelbert Buxbaum on March 31, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP