I was asked recently which file format was better, ePub or PDF. (Just as well that the Kindle-only mobi format was left out! It's easy to convert from an ePub file anyway.)
Which is better depends on what purpose the file is going to serve.
A PDF file is a representation of a print document. It's brilliant at that. No matter what device I look at the file on, each page will look exactly the same as if I had the paper-and-ink copy in my hand. It's the format that designers have been sending to printers for decades, so, strictly speaking, every book you've read that was published since the turn of the century was almost certainly a PDF before it was printed. What you see when you open the file is exactly what you'd see on the printed page. Same margins, same fonts, same line height, same font size...
That's wonderful — if you've got a printer or a full-sized monitor. On a phone or a small tablet? Not so much.
ePub files — in most circumstances — organize the text not around the page but around the screen. Like a web page (which is basically all that an ePub file is), it is re-flowable, or, in web terms, responsive. The "page" breaks change with the size of the screen that the ebook is read on — or the size of the text that the reader chooses in his or her preferences. If the ePub has been well designed, the images will resize proportional to the screen/window, and the text will flow properly around them.
So if you're trying to show someone exactly what a particular physical document looked like, PDF is the way to go.
If, on the other hand, you're trying to share a document without knowing what the reader is going to be viewing the file on — and the content is more important than the appearance — stick to ePub.
Postscript: Each of those answers has a big "but" attached to it.
PDFs can't be uploaded to any of the major ebook commercial retailer sites and distributors (Amazon, Apple, Nook, Kobo, Smashwords, etc.), so if you want to sell your ebook, you'll have to create an ePub file.
If, however, the relationship of words to images is essential (as in a children's picture book, a cookbook, etc.) or the page breaks are essential, a reflowable standard ePub file won't work. At that point, if you want to sell your book through the normal channels, you need to create a "fixed format" ePub.
(The advantage to fixed-format ePub to PDFs, aside from being able to upload them to most of the major retailers, is that, if you know your way around the inside of an ePub file, you can convert them to standard, reflowable ePubs in a fairly straightforward process, instead of having to go back to the original file from which the PDF was created and convert from that.)