In some countries (the UK I believe is one) authors are paid from a pool of money based on how many of their books are loaned by the libraries. So there is some compensation there in some countries.
HP7 represents JKR's intellectual property (IP) and while she is alive she has the right to determine how and when it will be used. Since she has not authorized an electronic edition of the books any ebook of the HP series is therefore a counterfeit and illegal on the surface. The argument that it is legal because no legitimate one exists in nature is also flawed for the same reason. The only legal way to get an HP book is to buy a paper version.
In economics the ebook is a substitute for the pbook. They can be interchanged like butter for margarine. Both serve the same purpose of providing the text of the story to be read.