FTP uses TCP sockets internally.
FTP is a higher level protocol which uses TCP sockets to read any file and split into pieces and send via sockets to destination .
At destination FTP server application will read and put these packets into a file with the same filename and save onto the filesystem.
If you are looking for transferring a file from one to another, FTP is the best solution.
If you really want to use bare sockets then probably you will be implementing a thin version of FTP.
You can make use of the below links
Implement this in your application. For data you will have to read the pdf file and send to destination.
At destination read contents and open a file with this filename and write onto that file, which will essentially result in transferring a file