Apache PDFBox library is an open source java tool for working with PDF documents, go to http://pdfbox.apache.org/ for API docs and download jar (pdfbox-app-1.8.2) from there.
- Now create a fusion web application and add jar to view controller project's library and class-path
- To convert text to pdf format, i have used an input text and bind it to bean (to get value)
- Now see the button code that converts text to pdf file format using Apache PDFBox
- now your pdf is generated in fixed path, and if user want to open it immediately , try to do this
- this code invokes File Protocol using Runtime class
- Run this application and see-