I have come across this code here(How to manipulate an externally-generated pdf figure in LateX?) that allows me to send some labels/annotations to an image in a pdf file. The pdf file is already cropped but when I compile it, I see the pdf file as a whole A4 paper with a number in the bottom.
Here is the code:
\documentclass{article}
\usepackage{graphicx}
\begin{document}
\begin{picture}(0,0)%
\put(0,0){\includegraphics[width=.4\textwidth]{Telescope_Lens.pdf}}%
\end{picture}%
\end{document}
This is the original image in the pdf file (notice how the image is cropped):

And this is the image i get when I compile (Notice the page number and how long the image has become):

Any idea what is happening here? Many thanks
articleclass use letter paper in page size. According to your settingwidth=.4\textwidth, the image is displayed properly. This is the way how it will be shown in the page. What is your expected result? – Tom May 10 '22 at 05:44articleclass will do that for you: it inserts your image into a full-size sheet of paper. Perhaps some other class (standalone?) might be more appropriate. Of course everything depends upon your final goal. – Ingmar May 10 '22 at 07:07\documentclass{standalone}and packagetikzto achieve that. – Tom May 10 '22 at 07:10articleclass was the problem. – Naif Alsalem May 10 '22 at 23:49