I want to transfer the text or contents of JTextArea or JEditorPane to a PDF file. Also, I want to transfer the contents of a text file (.txt and .rtf) into a PDF file. Are there any Java classes / packages available for this?