My favorite book is a little known one called “Black Holes and Timewarps: Einstein’s Outrageous Legacy” and I reference it so much that I would really like a copy that’s fully mine and searchable, but I also care about the author receiving compensation for the purchase. Where do you get your PDF copies from?
You could also buy a physical or digital copy or donate to the author directly and then still just pirate the pdf. That would be morally unquestionable imo.