If it - as you say - is free it is generally not illegal. Having said that, the file format pdf in itself is no guarantee that something is free and legal - it's just a file format. There are lots of books out there that are illegal, and they are in the pdf file format. Therefore, always check copyright.