I've worked with several users who sell eBooks and use PayPal to collect payment. I created scripts that interact with PayPal and use the transaction data to deliver the PDF eBooks.
If you want to look into going the PayPal route, check out their website for info, something like Merchant Solutions or Website Solutions, especially their "Website Payments Standard". They have some extensive documentation how to implement it on your site, which they distribute as downloadable ... PDFs!