[Tex/LaTex] EPS Figure going out of page even with width=\paperwidth

epsfloatsgraphicswidth

I am trying to import an eps image of a flow diagram I created using Excel and exported as eps image using OpenOffice Impress. I followed the guide https://youtu.be/I4ZXTieTiAc to do this. I want to fit the image to paper width (to fit within defined paper margins), and not necessarily text width, because the journal I am submitting to uses two columns layout and I want the image to span the width of the paper minus the margins. To do this, I tried to implement the following codes:

\documentclass[12pt,letterpaper]{article}
\usepackage{graphicx}
\usepackage[letterpaper, left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}

\begin{document}

\begin{figure}
\centering
\includegraphics[width=\paperwidth, keepaspectratio]{myimage.eps}
\end{figure}

\end{document}

Above is just a testing example. In actual implementation, I am using \documentclass[journal = iecred,manuscript=article]{achemso} for document class for the journal I am submitting to. In any case, the image fails to scale, and ends up going outside the page to the right, although the image is properly fitted to the left margin. Setting width to \textwidth works, however, I want to scale it to paper width. Any ideas what might be causing the issue, and what I can do about it?

EDIT: From Displaying a wide figure in a two-column document, I realized for the result I wanted, I just had to use figure* instead of figure and use width=\textwidth. I still don't understand why width=\paperwidth would not work though.

Best Answer

You have specified

\usepackage[letterpaper, left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}

so you have 2cm left and right margin, so \paperwidth (the width of the paper or pdf viewer) is 4cm wider than \textwidth (the width of the text block between those margins)

so

\includegraphics[width=\paperwidth...

will set the image flush to the left margin but sticking 4cm into the right, which will be 2cm off the paper.