Upload a PDF file through a custom script

Hello guys,

I wanted to upload a pdf file through a custom script and then extract the pdf file data into JSON…!!

How can i do that…?? does anyone knows then please help me…!!