I sell my PDF eBooks on my blog and websites through paypal, so buyer were directed to my download link after payment. Is there anyway that I can code or lock my PDF, so only the actual buyer can view my PDF file? Please help, thank you!
Generally speaking, yes, it's possible to set up password protection for a PDF file. But it can be not that easy, and personally I'm not going to dive into that matter here, sorry. You should Google for it yourself, or hire a professional. There's an easier work-around too: zip your PDF into a password protected zip archive. Both ways have the same problem: unless you protect each copy manually, you'll have _same_ password for _all_ copies.
Thank you for your suggestion, and I heard some author update their ebook download links periodically to avoid pirate downloads, that might be one of the alternative.