How to add a pdf file manually as part of the mendix project.
0
We have a usecase wherein we want to add a pdf document as a part of our mendix application. We want to show a help document that is in pdf format and that has to be part of mendix application. We tried keeping the file in <projectdirectory>/resources folder and then tried to access it via GetResourcePath java action. This works fine in the local environment but when we push the changes to mendix cloud environment, then it is not able to locate that pdf file. Please refer to another forum which suggested to put the file in the resources folder. https://community.mendix.com/link/questions/105225
Maybe a silly question, but what kind of slashes do you use in the file path? Do you account for linux vs windows differences?
Can you show the entire code where you read the file?
answered
Andrej Gajduk
0
An alternate approach which I would suggest is as below
Create an entity which is having a generalization System.FileDocument (You can name it as ‘PDFDocument’)
Have an admin page for the administrator to upload a single PDF document using this entity.
Retrieve and show this Help file on the page which you want to show. Restrict the access to the normal user only to download the file.