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

0
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!
asked
2 answers
1

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.
https://docs.mendix.com/appstore/modules/community-commons-function-library/#33-files

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.
https://docs.mendix.com/refguide7/how-to-create-your-own-documents/

Hope this helps.

answered
0

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

 

answered