Is the .txt file in a FileDocument or a String?
If it’s in a FileDocument, you can read the contents of the file and return it as a String using the StringFromFile Java Action in the Community Commons module from the Marketplace.
Once you have the content as a String, you can use Mendix’s built in Document Template functionality to generate a PDF. There is a good tutorial on how to do this in the Mendix documentation.
Hope this helps.
Hii Aneesh ,
you can use print screen to pdf component , it take a layout or div to print in pdf format you can also print whole screen in pdf.\