With that said, I personally prefer buying an official book if available, so that the author can get their royalties. Many publishers even offer DRM-free ebooks.
When I can't find a pdf I like buying old editions on eBay for $10 or whatever. I find that having to browse through more info to actually find what I'm trying to reference leads to better ancillary knowledge and understanding than CTRL+Fing a pdf.