How to convert pdf and doc files to plain text?

Hello,

I have to contact with a dspace and make a request to transform pdf and doc files to plain text. Since Libre office has an extension for this I would like to ask where exactly is the source code? I am an amateur developer so it is important for me to have a detailed documentation.

TO sum up: I need the source code which transforms pdf and doc to plain text and the documentation.

Try this answer for DOC to TXT. The --convert-to parm will require txt:Text as its argument.