Hi All,
Anyone got any idea on how to crop images in Latex?
Thanks in advance
General ⇒ How to Crop Pictures in Latex
NEW: TikZ book now 40% off at Amazon.com for a short time.

- Stefan Kottwitz
- Site Admin
- Posts: 10345
- Joined: Mon Mar 10, 2008 9:44 pm
How to Crop Pictures in Latex
Hi pankaj,
when including images by \includegraphics there are optional parameters concerning viewport and cropping, see Documentation of the Graphics bundle 4.4 Including Graphics Files.
Btw. I've sometimes used the tool pdfcrop to crop pdf files externally before including them.
Stefan
when including images by \includegraphics there are optional parameters concerning viewport and cropping, see Documentation of the Graphics bundle 4.4 Including Graphics Files.
Btw. I've sometimes used the tool pdfcrop to crop pdf files externally before including them.
Stefan
LaTeX.org admin
Re: How to Crop Pictures in Latex
Hi Stefan,
Thanks for referring to those pages. Will go through them soon.
btw i came across following commands for cropping an image at a site http://web.reed.edu/cis/help/latex/Graphics.html
\begin{figure}[htbp]
\begin{centering}
\caption{A Figure}
\includegraphics[clip=true, viewport=.0in .0in 1in 1in]{figure}
\label{subd3}
\end{centering}
\end{figure}
When i compile using these, i get an error like
! Package keyval Error: p undefined.
Anyidea on this?
n yeah pdfcrop seems to be an interesting thing.
Thanks
Pankaj
Thanks for referring to those pages. Will go through them soon.
btw i came across following commands for cropping an image at a site http://web.reed.edu/cis/help/latex/Graphics.html
\begin{figure}[htbp]
\begin{centering}
\caption{A Figure}
\includegraphics[clip=true, viewport=.0in .0in 1in 1in]{figure}
\label{subd3}
\end{centering}
\end{figure}
When i compile using these, i get an error like
! Package keyval Error: p undefined.
Anyidea on this?
n yeah pdfcrop seems to be an interesting thing.
Thanks
Pankaj
- Stefan Kottwitz
- Site Admin
- Posts: 10345
- Joined: Mon Mar 10, 2008 9:44 pm
Re: How to Crop Pictures in Latex
Hi Pankaj,
this code works for me. Perhaps the problem is caused by other code - could you show a complete example that produces this error?
Stefan
this code works for me. Perhaps the problem is caused by other code - could you show a complete example that produces this error?
Stefan
LaTeX.org admin