Java Action - Ways to convert .txt file in to PDF format

Hello Experts,   I successfully consumed Java Actions. Now i’m trying to recieve  my file in .txt format and want to display that file in a PDF format. Is there any way to achieve this requirement.   Answers are much appreciated!
2 answers

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.\

Mendix Marketplace - Print Screen to PDF