Create text file with contents of PDF

Hi!
I'm trying to extract/copy some lines of a text in a PDF and then paste them on a newly created text file. Is this even possible with Hazel and scripts?
I'm trying to extract/copy some lines of a text in a PDF and then paste them on a newly created text file. Is this even possible with Hazel and scripts?