Isn't requiring an email to download an ebook one of the scenarios that GDPR states as an example of non-compliance?
I honestly haven't dived into GDPR but I don't see a problem with a website owner offering something of value (an ebook) in exchange for something else of value (an email address). Disallowing that voluntary transactions oversteps the bounds of what I view a free state to be. Would adding a second checkbox ("I'm not a resident of the EU") be a way for a site owner to still provide this to exchange to non-EU residents…
1. "we provide this book for free, but collect your e-mail to follow up once in about 1 month time with a relevant offer." ==> this might even work from a "legitimate interest" view, but thats currently not well defined
OR
2. "click here to provide consent for us collecting your email and using it for ..., ..., ..."