6

I'm inserting PNG file and it's rendered enlared, somehow. Here is MWE:

\documentclass{book}
\usepackage{graphicx}
\begin{document}
\mainmatter
hello, world.
the following screenshot should be rendered in 1:1 scale, isn't it?

\begin{figure}[H]
\centering
\includegraphics{screenshot.png}
\end{figure}

\end{document}

Here is screenshot I desire to insert: http://conus.info/tmp/screenshot.png I use XeLaTeX.

And here is a result: http://conus.info/tmp/result.pdf

All I want is to insert PNG picture (screenshot) so it will be rendered in the same width/height in PDF viewed at 100%.

The size of screenshot.png is 726 pixels by 489 pixels. I want it to be exacly the same size when viewed in Acrobat Reader at 100%.

What should I do?

What are the best practices of inserting screenshots into TeX and exporting them to PDF?

  • 1 px is not equal to 1 mm on the PDF page... what do you mean exactly the same size ? – percusse Sep 12 '16 at 11:35
  • What to do to make it equal? How to insert screenshots to TeX and export to PDF? – Xenia Galinskaya Sep 12 '16 at 11:35
  • you can use \includegraphics[width=\textwidth]{screenshot} to fit in the text – percusse Sep 12 '16 at 11:37
  • I tried, than it's smaller. – Xenia Galinskaya Sep 12 '16 at 11:40
  • I mean that's how you adjust the width. What is the image final size in dimensions of length pt,cm, mm etc. ? – percusse Sep 12 '16 at 11:42
7

This question cannot have general answer for ALL monitors.

The size of the PNG image on the screen depends on the screen resolution (e.g. 110.27 PPI (pixels per inch) for my MacBook), and on Retina (220 PPI) it will be twice smaller.

And the size of image inside PDF, shown at real 100%, will be monitor-independent.

Thus solution for my monitor:

\includegraphics[scale=0.65]{screenshot.png}

will be different from yours:

\includegraphics[scale=0.75]{screenshot.png}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.