Yes, as long as the e-book is DRM-free (or you know how to crack the DRM). As the other person mentioned, applications like Calibre will do it for you automatically. Of course, the PDF will probably not look as good as a custom-crafted PDF, because e-book formats and PDF formats are meant for different uses, and most publishers manually tweak their PDFs to look their best in ways that aren't possible with automatic conversions. But if you're just wanting to be able to print out a copy of that e-book, or read it on a device that can only do PDFs, Calibre will do the job for you.