If you absolutely need a PDF file (for offline reading on a device that doesn’t support EPUB), here is the safe, legal method: