It would not help to change the file format to pdf because mendix file documents are stored as numbered files without file extension.
You can read and write filedocuments with Java action Core functions.
Can you give more information about the problem?
Edit: I recommend to read the original filedocument, create a new filedocument, convert the original filedocument using Core.getFileDocumentContent, Core.storeFileDocumentContent. After that delete the original filedocument.
Edit: Ad 1 Pushing to the java-action: you can do it in after commit of the filedocument. Ad 2 What happens with the uploaded file is up to you. You have to delete it manually. Ad. You can use a temporary file (Core has a method to get one). But the PDF conversion must be done by you
Okay well this is the scenario, i want to upload any document to the system and if its not a .PDF i should be able to convert the document to PDF. So i saw that mendix cannot do that but i thought of using a Java action but i can seem to find a way to push the uploaded file document to the java action