I want to include the display of my terminal in a beamer presentation. Simply taking a screenshot, however, produces a fairly low-resolution png that looks poor in the presentation. I would like it if I could somehow create a PDF of the terminal display, so the image looks crisp and clean in the presentation. As a note, I'm viewing a file in VIM, which applies very nice syntax highlighting that I'd like to preserve. This is why I don't just copy and paste the text to a word processor and save as PDF. Is there any way to achieve what I want?
I would try writing the syntax-highlighted code as an HTML file, using the Vim Syntax->Convert to HTML menu option. Then open the HTML in a browser and print to a PDF file. You can of course edit the HTML if you want to show just a section of the code, or use pdfcrop to isolate the region of interest.
Whatever you're using to take the screenshot is betraying you. Use a different software package for it (I prefer
scrot on Linux), or use the OS-builtin screenshot keys.
I've done this exact same thing in the past. Fortunately, the resolution of my monitor is higher than that of the projector I was using (1920x1200 vs ~1200x800), so a screen shot of Konsole worked well for me..
If the resolution of the projector is higher than your monitor though, you could increase the font size of vim / the terminal, before taking the screen shot. Then you won't have too few pixels, but too many. Scaling down is easier than scaling up.
You also didn't mention what Desktop Environment you are using, but in KDE, when I press Print Screen, I have an option of saving an image of the active application window (see screen print of the screen print window, below). I was hoping that even if an application window goes off the edges of the display, the whole application window could be saved, but that doesn't seem to be the case. (Btw, in Windows - I know, wrong website - you can press Alt+Print Screen to take a screen shot of the application window, if say, you're using vim over PuTTy).
You don't want a screenshot, you want a text grab. Highlight the text in the window and paste it into your presentation using a fixed-width terminal font and it will scale perfectly for you. If you have strange ascii art characters in the original software display, you'll want to perfectly match fonts so the codes work out.
Untested: this may work for you: https://www.dokuwiki.org/plugin:xtermrtf