How can I backup my email database and save them in PDF format?
If you are using chrome then you are in luck coz there is a chrome app that lets you save your emails in pdf format. Have a look at this app here: https://chrome.google.com/webstore/detail/save-emails-to-pdf/dngbhajancmfmdnmhhdknhooljkddgnk?hl=en. This was the first thing that appeared when I searched for your requirement. 

The other things that can help you backup apple mail as well as save the backed up email database in pdf format is this app here: http://mac.softpedia.com/get/Utilities/Mail-Backup-X.shtml

I hope this helps you. Thanks