Programmatically add PDF file to user
You first need to insert the file in the database, then assign it to your entity (a user in your case)

To insert file in the database say you have your file in a temp location. You can add it to the databse at the same time the file is moved to its final location:

// uid of user that to add the file.
$uid = $UID;

// Final file name
$filename = $FILENAME;

// Fieldname where to attach the file
$fieldname = $FIELDNAME;

// File temporary path.
$file_tmp_path = $FILE_TMP_PATH;

// Let's go!

// Load user object.
$account = user_load($uid);

// Gather file info.
$filesize  = filesize($file_tmp_path);
$mime_type = mime_content_type($file_tmp_path);

// Create file object.
$file = new stdClass;
$file-&gt;uid      = $uid;
$file-&gt;filename = &lt;desired filename&gt;;
$file-&gt;uri      = $file_tmp_path;
$file-&gt;filemime = $mime_type;
$file-&gt;filesize = $filesize;
$file-&gt;status   = FILE_STATUS_PERMANENT;

$destination .= '/' . $filename;

// Move to its final destination and add it to the database.
// file_move moves the file and is in charge of add the needed DB records.
$file = file_move($file, $destination, FILE_EXISTS_RENAME);

// Attach file to user. 
$account-&gt;{$fieldname}[LANGUAGE_NONE][0]['fid'] = $file-&gt;fid;


$user_save($account);