How to Generate and View a PDF in a Native Mobile Application in Mendix?
0
Hi everyone,I am working on a Mendix Native Mobile application and need to generate a PDF document from my application and allow the user to view it within the native app.My requirement is:Generate a PDF based on application data (for example, a service report or transaction report).Store the generated PDF as a FileDocument.Open or preview the generated PDF directly in the Native Mobile application.If viewing inside the app is not possible, open it using the device's default PDF viewer.I have looked at several examples, but most of them are for web applications. I couldn't find a complete example for Native Mobile.I would like to know:What is the recommended approach to generate a PDF in a Native Mobile app?Which Marketplace modules or Java actions should be used?How can I open or preview the generated PDF after it is created?Is there any official Mendix best practice or sample implementation for this?If anyone has implemented this before or can share an example project or documentation, I would really appreciate your help.Thank you!
asked
Harika Marpina
1 answers
0
Hi Harika,
You can generate the PDF using the Document Generation and save it as a FileDocument.
In a Native Mobile app, use the Native File Document Marketplace module to open or preview the generated PDF. If in-app preview is not supported on the device, the PDF will automatically open in the device's default PDF viewer.