Now stores record of pdf in database.