If the first example does'nt show the correct dcoument property in Acrobat Reader, you should change first letters of the paramentes in capital letter. Instead "author" you should type "Author"...
// $pdf is the name of the pdf ducoment you created.
pdf_set_info($pdf, "Author", "Ahmed");
pdf_set_info($pdf, "Title", "PDF tutorial");
pdf_set_info($pdf, "Subject" , "PDF tutorial");
pdf_set_info($pdf, "Creator", "phpnet");